[flexcoders] Re: Using mxml without flex framework (Flex 2 Beta 1 and 2)

2006-03-29 Thread bussesven
Yes and if i would actually buy Flex Builder, i really would like to 
use the tool to my own needs. When making up the architecture of my 
app, i want to be able to decide

a - if i want to use the flex framework

b - if i want to use mxml or if i just want to make an actionscript 
project

And i want to be able to make those two decisions separately.



--- In flexcoders@yahoogroups.com, "Johannes Nel" <[EMAIL PROTECTED]> 
wrote:
>
> in the context of the current topic i still don't get what you mean. 
paying
> for an ide is not a problem, its to be expected.
> 
> about the topic at hand: it would have been nice if i could have used 
mxml
> to layout any type of app.
>







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




[flexcoders] Using mxml without flex framework (Flex 2 Beta 1 and 2)

2006-03-24 Thread bussesven
Hi,

in the alpha version of Flex 2 i was able to remove the framework.swc 
from a flex project and still use mxml with only my own classes. In 
beta 1 and beta 2 this doesn't work anymore, because mxmlc by default 
generates several import statements and other stuff in the generated 
classes, which leads to errors of course, since i have removed the 
framework.swc.

Even if i leave the framework.swc in, but use only my own classes, it 
doesn't work, since there is an error with the StyleManager.

I made a simple example. I have a very simple class:

package com {

import flash.util.trace;
import flash.display.Sprite;

public class Sample extends Sprite {

public var myvalue:String;

public function Sample() {
trace("Hello World!");
}   
}
}

And a very simple mxml:




It doesn't work, i get the error:

TypeError: Error #1009: null has no properties.
at 
mx.styles::StyleManager$/http://www.adobe.com/2006/flex/mx/internal::i
nitProtoChainRoots()[C:\dev\beta2
\sdk\frameworks\mx\styles\StyleManager.as:240]
at 
MyTest/http://www.adobe.com/2006/flex/mx/internal::_MyTest_StylesInit
()
at MyTest$iinit()

What is going wrong here? How can i use mxml with just my own classes 
without the flex framework?

Thanx and cheers.





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





[flexcoders] Re: Runtime Shared Libraries (flex 2)

2006-03-21 Thread bussesven
Hi Roger,

first of all, thanks for that extensive reply. Great.

Unfortunately i would like to make a pure actionscript project 
without the mxml, because i wanna basically understand, how tings are 
working on the basis, before i start developing with mxml as black-
box.

So could you perhaps also describe this "bootstrap" process or show 
me a place, where i can find it myself?

That'd be great.

thanx in advance.

Sven

--- In flexcoders@yahoogroups.com, "Roger Gonzalez" <[EMAIL PROTECTED]> 
wrote:
>
> I apologize for not being able to give the walkthrough in terms of 
Flex
> Builder; I work on the lower level, so I'm going to talk in terms 
of the
> command line.  Hopefully you'll be able to translate.  You might 
want to
> walk through it using the low level tools anyway, because its hard 
to
> tweak project settings for experimentation like this.  I'm a big 
fan of
> using ant to automate a build when you get to the point where you're
> using RSLs.
> 
> Anyway.
> 
> The key insight in this is that a SWC is a library, and contains a 
SWF
> (runtime definitions) and some additional metadata (used by the 
compiler
> for dependency tracking, among other things).  SWCs are just 
zipfiles.
> You can look inside them.
> 
> Your first step should be to figure out how to use SWCs for static
> linking, never mind RSLs.  Get a project set up to build a SWC, 
then get
> your app set up to use that SWC.
> 
> Lets say you have an app with "app.mxml", "xyzzy.as", 
and "plugh.as".
> 
> project/src/app.mxml
> project/libsrc/xyzzy.as
> project/libsrc/plugh.as
> project/lib/
> project/bin/
> 
> Normally, you might compile:
> 
> % cd project/src
> % mxmlc -o=../bin/app.swf -actionscript-classpath+=../libsrc 
app.mxml
> 
> which would pull in xyzzy and plugh via dependencies.  To convert 
this
> to use libraries, you might do:
> 
> % cd project
> % compc -actionscript-classpath+=libsrc -o=lib/mylib.swc xyzzy plugh
> 
> resulting in project/lib/mylib.swc
> 
> To rebuild your app, you'd use:
> 
> % cd project/src
> % mxmlc -o=../bin/app.swf -library-path+=../lib/mylib.swc app.mxml
> 
> We're ready to recompile our application to use the RSL.  This is a 
bit
> complex at first glance, but that is because there are three 
dimensions.
> 
> 1) Tell the compiler to not link certain classes into your 
application.
> 2) Get the RSL deployed so that it can be found and used at runtime.
> 3) Tell the compiler to generate some extra stuff that loads your 
RSL.
> 
> Lets just tackle #1 for the moment, and see where it leads us.
> 
> % cd project/src
> % mxmlc -o=../bin/app.swf -external-library-path+=../lib/mylib.swc
> app.mxml
> 
> If you run app.swf now, you'll get a RTE, because "xyzzy" 
and "plugh"
> aren't defined.  The external-library-path configuration option says
> "compile against these libraries, but leave out every definition 
that
> they define".  There's a corresponding "-externs" option, if you 
wanted
> to do it class-by-class, but its generally a lot more convenient to 
do
> it this way.
> 
> So, on to #2.  Lets get the RSL ready for use.
> 
> Converting our SWC to a RSL is easy.  Its already halfway there, you
> just need to extract out the SWF inside, since the player doesn't
> understand SWCs.
> 
> % cd project/lib
> % unzip mylib.swc library.swf
> % mv library.swf ../bin/myrsl.swf
> 
> For convenience, I just renamed and moved the library SWF file down 
so
> that its in the same directory as the application SWF.  Honestly, 
half
> the battle for RSLs is just figuring out where to deploy things.
> 
> Finally, lets recompile the application to use that RSL:
> 
> % cd project/src
> % mxmlc -o=../bin/app.swf -external-library-path+=../lib/mylib.swc
> -runtime-shared-libraries=myrsl.swf app.mxml
> 
> What this does is generate a SWF that will dynamically load the RSL
> before letting the application run.
> 
> Make sense?
> 
> (Note: there are a couple more steps involved if your main 
application
> is built in pure AS instead of MXML, because the code that does the 
RSL
> loading is actually inside your application's "bootstrap class"
> (normally a class derived from SystemManager for MXML apps).  In a 
pure
> AS app, you might not have a bootstrap class unless you go out of 
your
> way to use one.)
> 
> -rg
> 
> > -Original Message-
> > From: flexcoders@yahoogroups.com 
> > [mailto:[EMAIL PROTECTED] On Behalf Of bussesven
> > Sent: Tuesday, March 21, 2006 6:05 AM
> > To: flexcoders@yahoogr

[flexcoders] Runtime Shared Libraries (flex 2)

2006-03-21 Thread bussesven
Hi,

i have a question concerning runtime shared libraries in Flex 2. I have 
read through the documentation but i don't get it. Can someone give me 
an example on how rsl are created and used? I want to have a rsl that 
holds some classes that i want to use in several other applications.

How do i reference a class, that lies in a rsl? With the Embed tag?

thank you





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