Hmmmmm. I agree, global variables are easier to find. Sarcasm aside:
'an Image, which is IDed 'myimage', I can never access it' It might be better to provide a top level method in your module to manipulate this type of data as opposed to diving down through the layers.. objects are supposed to be black boxes. That said looking inside of them should be rather hard. In my experience, 90% of the time that it becomes really hard to do something like this, it is because you need to take a step back and examine if the strategy being employed is the right one. In this case, it looks to me like you are following references down through from the loaded module which, even if you find the right path, is going to come back to haunt you if you ever make a change to that nesting. Only my 2 cents. Disregard freely, ML --- In [email protected], "Bill Lane" <[EMAIL PROTECTED]> wrote: > > I used to be tearing my hair out about these kinds of issues until I saw > a presentation > <http://onair.adobe.com/blogs/videos/2007/05/01/webdu-easy-as-mvc- archit\ > ecture-and-frameworks-for-non-believers-robin-hilliard/> on MVC . In > your example the Module would update a property within the Model and the > progressBar is bound to this property and therefore updates when the > Module updates the Model. It's a little extra work to setup but saves > sooo much time when these issues arise. > > Bill Lane > > --- In [email protected], "shawn.gibson" <shawn.gibson@> > wrote: > > > > I realize I still have a lot to learn but I have finally figured out > > the core of all my current problems (my pathetic level of programming > > skills aside): > > > > ***I can't EVER access the IDs of components when that ID is in a > > Module and that Module is loaded via ModuleLoader.*** > > > > For example, if I have a main app, in it a ModuleLoader and I have a > > bunch of Modules, all of which at SOME POINT or another will get > > loaded in to the ModuleLoader (right now with Peter Ent's method of > > Building Modular Applications as my starting architecture: > > > http://weblogs.macromedia.com/pent/archives/2007/01/building_module.cf m)\ > . > > > > If one of those Modules has a bunch of canvases, and in one canvas is > > an Image, which is IDed 'myimage', I can never access it. > > > > I have a TitleWindow component, and in it is a progressbar, the source > > of which is supposed to be myimage, but when I go > > Application.application it never shows up in the Content Assist - it > > doesn't recognize it. These things always compile fine but give me > > runtime errors everytime when I try to force it anyways, i.e., when I > > go Application.application.myimage even though myimage doesn't 'want' > > to show up and I force it there anyways. > > > > This has stopped all of my attempts to build a Flex app completely > > dead in their tracks, I can't do anything without figuring this out, > > is what it comes down to. > > > > All of these things work when I go straight from an app to referencing > > something directly loaded as a component, but Modules loaded via > > LoadModule breaks all my ability to reference IDs. > > > > I've also upped the ante to Moxie, but I don't think anything in that > > makes a difference here - the modules are noted properly in the > > Properties area. > > > > > > I would very, very much appreciate some help with this. > > > > Sincerely, > > Shawn > > >
