[RESOLVED] Updating Label on List Component using custom ICellRenderer
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Updating Label on List Component using custom ICellRenderer

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    4

    resolved [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()
    .....

  2. #2
    Member
    Join Date
    Oct 2016
    Posts
    53
    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

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    4
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center

Poll by Flashkit.com