A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] CellRenderer Bug With Flash CS6?

  1. #1
    Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    93

    resolved [RESOLVED] CellRenderer Bug With Flash CS6?

    currently im having a major issue with a datagrid and displaying data using even a blank cell renderer.....

    opening flash i can create a generic datagrid with data and apply a generic cellrenderer and it goes whacky. Maybe im doing something wrong?

    this is the root cause....

    genericDataGrid.setStyle ("cellRenderer", new CellRenderer);



    outputs this....

    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display:isplayObjectContainer/removeChild()
    at fl.controls:ataGrid/drawList()
    at fl.controls:ataGrid/draw()
    at fl.core::UIComponent/callLaterDispatcher()
    Cannot display source code at this location.


    many thanks
    -Russ

  2. #2

  3. #3
    Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    93
    Thank you rachel, i ended up having this work using your reference. It ended up that I had to refer to the renderer as a string instead of the actual cell renderer object variable name. Also another thing to note... adding it to stage and invoking it will invoke a null child exception so i ended up using the event.complete instead.

    this.addEventListener(Event.COMPLETE, setGridStyle);

    private function setGridStyle(e:Event):void
    {
    this.getColumnAt(0).cellRenderer = "Renderer";
    //do other stuff
    }

  4. #4
    Member
    Join Date
    Aug 2012
    Posts
    55
    that's worth noting for future reference, thanks! glad you got it working

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