Well i have been stumbling over using RSL the last few
days. Using compc, etc.
What i tried was creating an SWC wich contains all classes
needed by the framework (called TAP). I compiled them using the following sws
file in combination with compc:
<library rsl="empty.swc" />
<namespace uri="TAP" all="true" /> </library> empty.swc is a swc file containing all components used by
an empty flex application, created from a class like this:
class empty
{
var a =
mx.core.Application;
};
The part 'rsl="empty.swc"' is used so it wont compile the
classes allrdy available in the flex generated swf into the
library.
As commandline arguments i gave compc the namespace TAP and
a manifest.xml:
<?xml
version="1.0"?>
<componentPackage> <component id="fly.TAP.alertErrors" class="fly.TAP.alertErrors"/> <component id="fly.TAP.appCore" class="fly.TAP.appCore"/> <component id="fly.TAP.cfcConnector" class="fly.TAP.cfcConnector"/> <component id="fly.TAP.commonDialogManager" class="fly.TAP.commonDialogManager"/> <component id="fly.TAP.ErrorHandler" class="fly.TAP.ErrorHandler"/> <component id="fly.TAP.EventDispatcher" class="fly.TAP.EventDispatcher"/> <component id="fly.TAP.EventStructure" class="fly.TAP.EventStructure"/> <component id="fly.TAP.eventTracker" class="fly.TAP.eventTracker"/> <component id="fly.TAP.flowControl" class="fly.TAP.flowControl"/> <com....
</componentPackage> This resulted in a SWC with all TAP classes compiled into a
swf together with some flex classes the TAP framework uses and are not by
default in the flex generated swf.
In order to use the RSL in the flex application i used the
following sws:
<library url=""http://pc021:8300/_TAP/Library.swf">http://pc021:8300/_TAP/Library.swf">
<namespace uri="TAP" all="true" /> </library> This however made the application hang on a full loader saying "Initializing".
So far what i have done. I'll explain again what i
want:
I want to make a set of classes available in memory at
runtime.
These classes (AS and MXML) should be compiled into an
swf.
This swf containing these classes should not contain
the classes wich are allrdy in the flex generated
swf.
I can then in my application load this swf, and as soon
as this swf is loaded the classes in the swf are available since they reside in
the global scope.
This way i can use my framework in any flex
application.
With flash i would do that just by creating a fla. Put
in the appropreate classes (only referencing them so the compiler knows
i will use them). And then export, resulting in an swf with a library of
classes. For the classes i dont want in there i create intrinsic class
descriptions.
I cant do this with flex since some of my classes are
mxml files, containing visual
components.
Maybe u have an idea on how to solve
this.
Greetz
Erik
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin Sent: maandag 23 mei 2005 4:19 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Compiling a set of classes Would an RSL be
appropriate in this case? From:
We are planning a large application. This application
uses a framework Yahoo! Groups Links
|