I have seen this sort of thing before.  Usually it is related to width and
height actually having implicit getters/setters for their implementation,
and merely referencing them (for example in a trace stmt) causes a bunch of
extra code to execute.  Unforununtely, my only resolution was to dig into
the lower level UI classes and see where it was erroring out.
I know that doesn't solve your immediate issue though, and maybe just adds
more of a headache.

On Tue, Jul 21, 2009 at 6:28 PM, <[email protected]> wrote:

> Without much code could it be as simple as adding this or parent?
>
> background.width = this.width; // Here is the ERROR
>
> background.width = parent.width; // Here is the ERROR
>
> On Jul 21, 2009 4:16pm, Robert Green <[email protected]>
> wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > I am trying to simply add a TileList component to my application.
> >
> > The error I am getting is that nasty Error: #1009:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Main Thread (Suspended: TypeError: Error #1009: Cannot access a property
> or method of a null object
> >
> > reference.)
> >
> >
> >
> >
> >
> >
> > fl.containers::BaseScrollPane/drawBackground
> >
> >
> >
> >
> >
> >
> > fl.controls::TileList/draw
> >
> >
> >
> >
> >
> >
> > fl.core::UIComponent/callLaterDispatcher
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > After review, the error occurs in the
> >
> > fl/containers/BaseScrollPane.as file on line 983. This is because the
> following
> >
> > method:
> >
> >
> >
> >
> >
> >
> >
> >
> > var
> >
> > bg:DisplayObject = background;
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > background = getDisplayObjectInstance(getStyleValue("skin")); // This
> returns a NULL
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > background.width
> >
> > = width;  // Here is the ERROR
> >
> > because I try to use a property of a NULL object.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > //---------------------------
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > I figured that
> >
> > this is something to do with the application trying to draw the TileList
> before
> >
> > its time, or something to that effect.  I have no trouble adding a
> >
> > TileList component using Flash CS3 but in this application it is complete
> as
> >
> > with NO Flash intervention nor any MXML files, therefore dragging a
> component
> >
> > to the stage is not an option.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > //----------------------------
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Has anyone run
> >
> > into a similar issue.  In the above example, I am simply using an AS file
>
> >
> > attempting to add a TileList component to the stage.  When I invoke the
> >
> > addChild(TileListComponentInstance) is when I get the above error. If I
> comment
> >
> > out this line (addChild) I will not get an error.!?!?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > HEEEEEELLLLLLLLLLPPPPPPPPPPPPPPPP!!!!
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > :/0
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Thanks,
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Rob Green
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -------------------------------------------------------------
> >
> >
> >
> >
> > To unsubscribe from this list, simply email the list with unsubscribe in
> the subject line
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > For more info, see http://www.affug.com
> >
> >
> >
> >
> > Archive @ http://www.mail-archive.com/discussion%40affug.com/
> >
> >
> >
> >
> > List hosted by FusionLink
> >
> >
> >
> >
> > -------------------------------------------------------------
> >
> >
> >
> >




-- 
Scott Talsma
CTO, echoEleven

Reply via email to