You may be a "simple flash developer", but if you're going to
mix-n-match flex and flash, you need to become a guru.  :-)

Rats, I didn't display the version in the tool?  Argh!  But actually you
can see the results of the version comparison by looking at source of
__Packages.mx.core.UIObject in the report (and in the tool).  The
__Packages version is the actual class definition, the undecorated
version is the visual sprite.

The things to note from the SWCs are the timestamps of
__Packages.mx.core.UIObject in your custom component SWC and the
timestamp of __Packages.mx.core.UIObject in mx.swc.  The report will
tell you which won, but its sometimes interesting to poke through and
see "why" it won.

-Roger

Roger Gonzalez
mailto:[EMAIL PROTECTED]
 

> -----Original Message-----
> From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of eerkmans
> Sent: Tuesday, May 03, 2005 1:21 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: SWC generates server error
> 
> wow, this is a great little tool! the article is interesting as 
> well, although quite daunting for a simple flash designer such as 
> I ;-)
> 
> one little problem: I can't find the version numbers you refer to in 
> point (3) they don't seem to be listed in the visualisation tool ?
> 
> when I spit through the xml (uck!) I find the following version 
> numbers: 
> 
> my custom component SWC: version='1114589139'
> UIComponent: version='1092182570'
> UIObject: version='1076549540'
> ComboBox: version='1097889116'
> 
> etc.
> 
> Should I manually lower the version number of my custom components??
> and how?
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "Roger Gonzalez" <[EMAIL PROTECTED]> 
> wrote:
> > Erik-
> > 
> > I suggest you try the following:
> > 
> > 1) Turn on the generate-compile-report option in your config 
> file.  This
> > will cause an <app>-report.xml file to be generated.
> > 
> > 2) Read my linker/loader article on Macromedia devnet.  Skip by 
> all that
> > boring text, but extract out the compile report tool.  (Actually,
> > reading the article might provide some insights.)
> > 
> > http://www.macromedia.com/devnet/flex/articles/link_load.html
> > 
> > 3) Use the compile report visualization tool to check the 
> dependencies
> > of your classes, and ensure that the correct version of the 
> classes are
> > being used.  (You can also read the XML file, but that's not as 
> much fun
> > as playing with dynamically generated graphs, now is it?)
> > 
> > 4) Open up your SWCs using WinZip or whatever, and look for the 
> version
> > timestamps on your core classes.  The most recent one will "win".
> > 
> > 5) Make sure you turn off themes, rsls, etc. while debugging.
> > 
> > 6) Double check your use of statics to make sure that you aren't
> > breaking "the rules".  (See my article for details.)
> > 
> > -Roger
> > 
> > Roger Gonzalez
> > mailto:[EMAIL PROTECTED]
> >  
> > 
> > > -----Original Message-----
> > > From: flexcoders@yahoogroups.com 
> > > [mailto:[EMAIL PROTECTED] On Behalf Of eerkmans
> > > Sent: Thursday, April 28, 2005 12:26 AM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Re: SWC generates server error
> > > 
> > > Thanks! About the flex classes: I already pasted the flex 
> classes 
> > > (from the file flexforflash.zip) into my flash first run 
> directory. 
> > > Do I understand correctly that this isn't enough?
> > > 
> > > Also, my SWC component is actually quite complex, it's a map 
> > > application with all kinds of graphic and animation effects, and 
> > > uses a lot of AS. (no it's not a flash intro ;-) I especially 
> like 
> > > the idea that you can still use flash to build standalone mini-
> > > applications for use in flex.
> > > 
> > > How would I go about converting my flash AS to flex, and 
> exporting 
> > > and then using all the assets in an SWC?
> > > 
> > > thanks a lot,
> > > 
> > > erik. 
> > > 
> > > --- In flexcoders@yahoogroups.com, "Roger Gonzalez" 
> <[EMAIL PROTECTED]> 
> > > wrote:
> > > > I think someone else already posted the answer.  The Flash 
> version 
> > > of
> > > > the framework classes are different than the Flex version.  
> You 
> > > need to
> > > > register the Flex version of the classes into Flash (this is
> > > > complicated, but see the docs, they're pretty extensive on 
> this).
> > > > 
> > > > All SWCs in your libpath (which includes your app directory, 
> by 
> > > default)
> > > > are merged together and resolved by versioning.  (If you unzip 
> the 
> > > SWC
> > > > and look at the catalog.xml file, you can see the version 
> numbers 
> > > on
> > > > each definition).  If there is a Flash class with a higher 
> version 
> > > than
> > > > the Flex class with the same name, you will get the behavior 
> you
> > > > describe.
> > > > 
> > > > Best practices is actually to not build the components in 
> Flash, 
> > > but
> > > > rather to just build the assets in Flash and export them in a 
> SWC.
> > > > Then, build the components in Flex and attach the assets to 
> your 
> > > Flex
> > > > components using Embed.
> > > > 
> > > > Cheers,
> > > > 
> > > > -Roger
> > > > 
> > > > Roger Gonzalez
> > > > mailto:[EMAIL PROTECTED]
> > > >  
> > > > 
> > > > > -----Original Message-----
> > > > > From: flexcoders@yahoogroups.com 
> > > > > [mailto:[EMAIL PROTECTED] On Behalf Of eerkmans
> > > > > Sent: Wednesday, April 27, 2005 12:56 AM
> > > > > To: flexcoders@yahoogroups.com
> > > > > Subject: [flexcoders] Re: SWC generates server error
> > > > > 
> > > > > 
> > > > > 
> > > > > great, thanks a lot ! the error is fixed now.
> > > > > 
> > > > > Not many people work with SWC components it seems, so if you 
> > > don't 
> > > > > mind I'm asking you this other question that I have....do 
> you 
> > > happen 
> > > > > to know why my SWC's screw up my flex interface? I've posted 
> > > this 
> > > > > problem as well:
> > > > > 
> > > > > When I place my SWC file in a custom folder instead of right 
> > > next to 
> > > > > my index.mxml, somehow all kinds of flex properties get 
> > > overwritten 
> > > > > by the SWC. (also the case with the flex button that 
> generated 
> > > > > the 'name' error)
> > > > > 
> > > > > For example, I can't use the property 'backgroundcolor' 
> anywhere 
> > > in 
> > > > > my entire flex app anymore, and borders around containers 
> aren't 
> > > > > shown anymore.
> > > > > 
> > > > > Also, comboboxes get rendered with strange squares around 
> their 
> > > round
> > > > > corners.
> > > > > 
> > > > > 
> > > > > 
> > > > > --- In flexcoders@yahoogroups.com, "Roger Gonzalez" 
> > > <[EMAIL PROTECTED]> 
> > > > > wrote:
> > > > > > > 
> > > > > > > WARNING exporter: cannot export name for init actions
> > > > > > > __anonymous.0.c:\program 
> > > > > > > files\....\user_components\TfeResetButton .swc
> > > > > > 
> > > > > > Wow, that's a pretty obscure problem.  I wrote the code, 
> and 
> > > even 
> > > > > I had
> > > > > > to go dig through the code to see what its doing!
> > > > > > 
> > > > > > This only gets triggered if the exporter sees an unnamed 
> > > sprite 
> > > > > with
> > > > > > init actions (are you using #initclip?)
> > > > > > 
> > > > > > It temporarily gives the sprite an export name (code 
> > > dependencies 
> > > > > are
> > > > > > tracked based on names, so we give the unnamed sprite a 
> unique 
> > > > > handle),
> > > > > > and then on export it warns you that its stripping out 
> that 
> > > name.  
> > > > > The
> > > > > > problem with unnamed sprites is that they don't work with 
> the 
> > > > > normal SWC
> > > > > > versioning system - if you exported two copies of that SWC 
> and 
> > > > > copied
> > > > > > them both to your libpath, it wouldn't be able to 
> determine 
> > > which 
> > > > > was
> > > > > > the newer version of your symbol, so it would end up 
> including 
> > > > > both.
> > > > > > 
> > > > > > Coming up with a coherent message to print given that the 
> > > thing its
> > > > > > complaining about is an unnamed critter deep in the bowels 
> of 
> > > a big
> > > > > > opaque file format is hard, so you got the confusing 
> message 
> > > that 
> > > > > you
> > > > > > saw.  However, it is only a warning, it shouldn't affect 
> the 
> > > > > behavior of
> > > > > > your app.
> > > > > > 
> > > > > > Note that importing code from Flash that uses #initclip is 
> > > quite
> > > > > > dangerous in Flex if the code has any class dependencies.  
> We 
> > > only 
> > > > > track
> > > > > > class-to-class deps, not codesnippet-to-class deps.
> > > > > > 
> > > > > > If you want to make the warning go away, make sure that 
> you 
> > > give 
> > > > > your
> > > > > > symbols export names.  Let me know if you need more 
> details.
> > > > > > 
> > > > > > -Roger
> > > > > > 
> > > > > > Roger Gonzalez
> > > > > > mailto:[EMAIL PROTECTED]
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > Yahoo! Groups Links
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  
> > > Yahoo! Groups Links
> > > 
> > > 
> > > 
> > >  
> > > 
> > > 
> > > 
> > >
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 


 
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/
 



Reply via email to