We don't use FrameworkClasses to solve this issue. That simply helps generate the SWC or shared RSL SWF. When you link from the SWF, if you don't have a dependency on one of those classes, the linker will not link it in. Just like .LIB files and MSVC linkers. The tool chain/runtime is more like MSVC in that way than Java. We don't have class loaders.
An internet search should have hit this issue, I think it comes up once or twice a year. My colleagues will tell you that I swear at the computer too, and pound my desk and flop on the ground and cry. You should try the latter two, they kinda feel good sometimes. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of djhatrick Sent: Wednesday, July 30, 2008 1:56 PM To: [email protected] Subject: [flexcoders] Re: Flex woes, wo-iz-o, i hate it (sometimes) Funny, ha ha, that would be quite a site... Ok, One of my flex-team peeps, Andy, came to tell me the same thing you said, I understand that now. FrameworkClasses is really interesting how flex solves loading the core files from the framework in the same manner. I followed the same manner and it works fine for my needs. eh, I guess some of my frustration come from not "understanding" why things fail... and i am totally bull-headed, I sometimes cuss at my computer, and try and fail rather than come up with another solution because I want to know why, and how to avoid the trap in the future... internal class FrameworkClasses { import mx.binding.ArrayElementWatcher; ArrayElementWatcher; import mx.binding.BindabilityInfo; BindabilityInfo; import mx.binding.EvalBindingResponder; EvalBindingResponder; etc... } --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Classes take up room in the SWF, so we only put in classes we know you > need otherwise your SWF would always be 1MB or more. > > > > getDefinitionByName is a roll call. If you aren't in the room, you > won't answer. > > > > A fully dynamic system would have to fetch a module that has the class > in it, sort of like a JAR file. The XML would have the name of the > module or you'd look it up in some other database. > > > > I kinda wanted to see video of your computer hitting a taxi cab. > > > > -Alex > > > > ________________________________ > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of djhatrick > Sent: Wednesday, July 30, 2008 1:32 PM > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: Flex woes, wo-iz-o, i hate it (sometimes) > > > > Alex, > > Say for instance, you want to create this instance, from a class name > defined in XML, and make it "totally dynamic", using this work-around > does not solve that problem. > > This function should really be improved, or, at least the > documentation should really be supplemented to explain more in detail > why this works for the flash namespace, and not the flex name space ( > or my own classes) > > Thanks for your time and quick response. > > Patrick > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" <aharui@> wrote: > > > > Some way you have to create a dependency on VBox to actually get it > > linked into the SWF, otherwise it isn't there to be found. One way is > > to use the shared RSL, but otherwise, you have to actually use the > class > > somewhere. In import statement doesn't actually create a link > > dependency, it simply says what the fully qualified name is when you > > just use VBox. > > > > > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of djhatrick > > Sent: Wednesday, July 30, 2008 1:17 PM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Flex woes, wo-iz-o, i hate it (sometimes) > > > > > > > > I am having one of those days where i want to throw this computer off > > the 30th floor of midtown Manhattan onto a taxi-cab's hood, and leave > > for the day never come back. > > > > This is the problem, I can't get, "getDefinitionByName" to work right, > > what a load of horse pucky... Sorry for being so salty, but if you are > > a developer and you have tried to use this function, it must have > > given you the same type of error, if it hasn't it will... > > > > I've tried classes with variables and public classes and the whole > > nine-yards, it always gives me this stupid error. > > > > Any suggestions, that don't require me to lose life or limb? > > > > Thanks, > > Patrick > > > > import mx.containers.VBox; > > import flash.utils.getDefinitionByName; > > private function init():void > > { > > var ClassReference:Class = > > getDefinitionByName("mx.containers.VBox") as Class; // throws error > > > > //var ClassReference:Class = > > getDefinitionByName("flash.display.Sprite") as Class; // works > > var instance:Object = new ClassReference(); > > > > // addChild(DisplayObject(instance)); > > } > > > > ReferenceError: Error #1065: Variable VBox is not defined. > > at global/flash.utils::getDefinitionByName() > > at TotalBullshitIHavetodoThisTest/init() > > >

