-
[RESOLVED] Updating Label on List Component using custom ICellRenderer
Hi,
I have a list component and I defined a custom ICellRenderer interface for it for a custom look and functionality. Everything works fine however I now need to be able to dynamically change the label (displayed text) for a given entry in the list. I update my data provider and try to call validateNow() to have it redraw and I get an error that drawNow is not defined in the cell renderer class. When I use a regular component (separate test fla) with no custom cell renderer and I do the same thing to update the data provider I can get it to display the new value by calling validateNow() however I can't get it to refresh/re-draw the list component with the custom ICellRenderer to reflect the new text for the label. How can I get it to re-draw the component using a custom ICellRenderer. Any help is greatly appreciated.
Here is the error:
ReferenceError: Error #1069: Property drawNow not found on ChatModuleListCell and there is no default value.
at fl.controls::SelectableList/updateRendererStyles()
at fl.controls::List/draw()
at fl.core::UIComponent/validateNow()
.....
-
i think has something to do with ordering of the styling and where you declare the new text/label.
why you not attach fla see if i or somebody help.
is easiest to see at most times
-
Thanks for the reply. I finally just decided to remove the item, update the values and then addItemAt to re- insert the item in the same spot in the list. Would of been nicer if I could of just called validate on the component but it gets the job done. Thanks for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|