>>> -include-libraries will force entire SWCs to be linked in. (And Beta 3 will have -include, which will do it for individual definitions.)<<<
We can move our classes to external library and it will be automatically linked. The reason I've asked this question is that in "Flex Library Project", we can control which classes to include in SWC file (Properties | Flex Build Path | Classes dialog). But default "Flex Project" doesn't provide this tab, and I expect my custom classes created in this project will be automatically included to the final app SWF. But project classes/components are not included till explicitly referenced in application code. (It's possible that I missed something, and this functionality is available...). >>> A better path might be to dynamically load another SWF that contains the definitions that you want to have "soft" references to.<<< It's interesting idea. But current Flex release doesn't provide good external libraries support as for me. Some RSL initialization code is statically injected by mxlmlc to the application SWF file during compilation process ( binding initialization, remote class registration etc). It makes impossible to update library binaries without recompilation of application SWF. Each time shared library is updated, we need to recompile all applications as well. Also all dynamic classes declared in RSL must be explicitly referenced by main application,(as otherwise these classes will be loaded without initialization). For the same reason we are unable to load "unknown" library at runtime and dynamically create class without problem (I mean classes with complex UI, remoting code etc). Ideally it would be better if "compc" stored all initialization information in SWC binaries. So loader could access it at runtime and automatically initialize external library on demand. Just my 2c... -- Thanks, Vadim Melnik. > > -----Original Message----- > > From: [email protected] > > [mailto:[EMAIL PROTECTED] On Behalf Of Vadim Melnik > > Sent: Thursday, March 23, 2006 4:49 AM > > To: [email protected] > > Subject: [flexcoders] Re: Flex 2.0 b2: 'getClassByName' > > method of the 'flash.util' package > > > > Is there some special mxmlc option to prevent optimization, and > > force compiler to include all classes from classpath or at least > > imported ones (like "import MyClass;") ? I saw "-compiler.keep- all- > > type-selectors" option, described as "disables the pruning of unused > > type selectors (advanced)", but don't clearly understand it effect. > > > > -- > > Thanks, > > Vadim Melnik. > > > > --- In [email protected], "Peter Farland" <pfarland@> > > wrote: > > > > > > No, you must have a refernence to MyClass somewhere in your code in > > > order for it to be linked in to the SWF at compile time. A string > > > 'myPackage.MyClass' does not constitute a reference. This is not a > > bug - > > > the compiler must optimize what classes are actually needed to > > keep the > > > SWF size down. > > > > > > > > > -----Original Message----- > > > From: [email protected] > > [mailto:[EMAIL PROTECTED] On > > > Behalf Of tyombria > > > Sent: Wednesday, March 22, 2006 4:44 AM > > > To: [email protected] > > > Subject: [flexcoders] Flex 2.0 b2: 'getClassByName' method of the > > > 'flash.util' package > > > > > > Hi, all. > > > > > > Method 'getClassByName' works correctly only with adobe classes. > > > For example, getClassByName('flash.net.URLLoader') works fine. > > > > > > I've got a problem with my custom classes. > > > For example: > > > var myClassReference:MyClass = getClassByName ('myPackage.MyClass'); > > > I get error: > > > Error #1065: Variable MyClass is not defined. > > > > > > Class exists in classpath or in the library. > > > > > > If i put somewhere inside declaration block: var myClass:MyClass It > > > (getClassByName) works fine. > > > > > > Is it a bug? > > > > > > > > > > > > > > > > > > -- > > > Flexcoders Mailing List > > > FAQ: > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > Search Archives: > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

