Hi Roger;

 

So, to link corelib.swc into my application, you’d supply the path to corelib as an argument to the –library-path option? Here’s the command-line I’m using:

 

mxmlc -actionscript-classpath=D:\PerforceDepot\galiano\Galiano.Tobias_Patton\Client\classes -library-path D:\PerforceDepot\galiano\Galiano.Tobias_Patton\tools\compiler\Flex2b2\frameworks\libs\ D:\PerforceDepot\galiano\Galiano.Tobias_Patton\Client\oem\corelib\bin\corelib.swc  -- D:\PerforceDepot\galiano\Galiano.Tobias_Patton\Client\DashboardJobsView\DashboardJobsView.mxml

 

This compiles, but I get the following runtime error when I launch my application:

 

Error: Key outOfBounds was not found in resource bundle SharedResources

            at mx.resource::ResourceBundle/getObject()

            at mx.resource::ResourceBundle/getString()

            at mx.collections::ListCollectionView$/::loadResources()

            at mx.managers::SystemManager$/registerInitCallback()

            at mx.collections::ListCollectionView$cinit()

            at global$init()

            at global$init()

            at _DashboardJobsView_FlexInit$/init()

            at mx.managers::SystemManager/::frameEndHandler()

 

This used  to work in Beta 1.

 

If I remove the reference to corelib.swc from the command line (and comment out any code that depends on corelib), I can compile and run the application.

 

Can you suggest what might be wrong with the way I’m building the application?


Thanks.

 

Tobias.

 

BTW: The reason flex-config.xml couldn’t be found was that I was running mxmlc with ‘java –jar mxmlc.jar’

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Roger Gonzalez
Sent: Wednesday, March 22, 2006 8:09 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2.0: mxmlc question

 

library-path makes SWCs available for resolving class dependencies.  This is normally what you want.

include-libraries forces all symbols in the SWCs to be included in the application, whether they are needed or not.

 

 

I don't know why you'd get that error unless you're not using mxmlc or Flex Builder.  By default, the compiler tries to load flex-config.xml out of ${flexlib}, which for mxmlc.exe is relative to the bin directory, and I suspect is set explicitly by Flex Builder.

 

I don't know what the "does not use a config file by default" means.  mxmlc certainly loads a flex-config.xml file by default.  I'm not positive what Flex Builder does, though.

 

In beta 2, you should be able to use -load-config+=otherfile.xml to overlay your config on top of the default config.

 

In other words, the config file isn't required, but there are some default settings that are trying to load it.  Something about your setup sounds broken.

 

-rg

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tobias Patton
Sent: Wednesday, March 22, 2006 4:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2.0: mxmlc question

Can someone explain the difference between the “-include-libraries” and “-library-path” compiler options?

The documentation states that “-include-libraries” is commonly used to link in an .swc file containing localized resources. But what about .swc file containing other .swc files used by the application? The documentation for “-library-path” implies that this option should be used to link in custom components. What is the difference? When I add a library in Flex Builder, does this translate to an “-include-libraries” option of a “-library-path” option?

Also, the documentation states that the Flex compilers do not use a config file by default. However, unless I specify the “-load-config” option, I get the error: defaults: Error: unable to open './flex-config.xml'. Is this flag required or not?

Thanks.

Tobias.

Creo Inc., a subsidiary of Kodak

Tobias Patton | Software Developer | Tel: +1.604.451.2700 ext: 5148 | mailto:[EMAIL PROTECTED] | http://www.creo.com




--
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




Reply via email to