Re: [flexcoders] Re: Compiling modules

2007-01-11 Thread Fabio Terracini

Hello Roger, you told below that they only ever get loaded once. This
loaded mean loaded in memory or loaded by transferring over the wire?

I've made tests between Modules and SWFLoader, specifically about memory
consumption. In one of them, I called loadModule() and unloadModule()
several times (loading the same module, of course), and the memory only
increases! I think this is the expected (although not the willed) behavior
(as is in the SWFLoader) since Flash Player can't really kill (and free the
memory) a DisplayObject. It would be a hard work to remove all the
references of the loaded application's objects (without talking about the
Flex framework per se) to elect they to GC.

Thanks
Fabio Terracini


On 1/9/07, Roger Gonzalez [EMAIL PROTECTED] wrote:


 The main difference between modules and applications is that modules have
lower overhead, and they only ever get loaded once, no matter how many times
you load them.

If you're using the ModuleLoader API, keep in mind that you're losing
about half the functionality of the module system.  I will assume that you
are, because otherwise it would be obvious where to expose methods.  You
might want to play around with the lower level ModuleManager API just to get
a hang of what's going on - ModuleLoader is a pretty thin veneer over the
lower API.

Basically, what you want to do is to have your module implement an
interface, say IModuleWhatever.

Have your application implement another interface, say IShellWhatever.

Now, add an event handler in the shell application such that when the
module is loaded, you get called back.

The ModuleLoader's child property will be an instance of your module
class.  You can cast it to the interface inside the shell application, and
then do something like:

IModuleWhatever(moduleLoader.child).setupStuff(IShellWhatever(app))

-rg

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Brian Holmes
*Sent:* Tuesday, January 09, 2007 8:05 AM
*To:* flexcoders@yahoogroups.com
*Subject:* RE: [flexcoders] Re: Compiling modules

  Roger,
 Would it be possible to get an example of how a shell app could
communicate or pass data to a module and vice versa. I'm  having difficulty
understanding of how to expose methods on both sides that allow for
interoperability. What I'd like to do is to load  user data in the shell
application and then add modules at runtime as needed. If they require user
information then have them look to the shell for that information so it's
always in the same place.

And Also, I can't really see any real difference between a module and
another application except for it's extremely tedious to debug the
modules?!  Couldn't the module automatically look for a debug version of the
swf if the shell is a debug version?

Thanks,
Brian


 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Roger Gonzalez
*Sent:* Monday, January 08, 2007 2:35 PM
*To:* flexcoders@yahoogroups.com
*Subject:* RE: [flexcoders] Re: Compiling modules

 I can't think of any reason why you would want to do this.

Modules are class factories, not instances.

You will create an instance of the class baked into the module, and then
the application can pass those parameters to the instance.

-rg

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *John Kirby
*Sent:* Monday, January 08, 2007 12:32 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Re: Compiling modules

 Thanks for the examples.

Question... if you are passing parameters to a module I assume your url
syntax is the same as a SWFLoader (myswf.swf?foo=bar) ... but module has
no parameter property?  How do access passed parameters to a module?

phillips1021 said the following:

 See:

http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-Modules-In-Flex-201

for a simple example.


--
*Whether you think that you can, or that you can't, you are usually right.
*
 - Henry Ford

 --
***
The information in this e-mail is confidential and intended solely for the
individual or entity to whom it is addressed. If you have received this
e-mail in error please notify the sender by return e-mail delete this e-mail
and refrain from any disclosure or action based on the information.
***

 



RE: [flexcoders] Re: Compiling modules

2007-01-11 Thread Roger Gonzalez
ModuleLoader is a kind of strange API that is really just intended to
look like SwfLoader for modules that contain a single visual component,
and hides most of the module loading infrastructure, which is all about
class factories.
 
What I mean by only loaded once is that if you have several places in
the code that call the ModuleManager.getModule(url).load() call, it
will only ever get loaded over the wire and interpreted once, subsequent
loads will just re-dispatch pseudo-load events to the new client.  In
other words, the class factory is a singleton for a given url.
 
Unloading is a totally different story.  As you note, not everything is
truly unloadable, because there may be lots of references to stuff in
the module that will keep it alive and un-GC'ed.
 
I suggest playing with the low-level API so that you understand the
backing implementation, and this should help you understand the limits
of ModuleLoader.
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Fabio Terracini
Sent: Thursday, January 11, 2007 1:43 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Compiling modules



Hello Roger, you told below that they only ever get loaded once.
This loaded mean loaded in memory or loaded by transferring over the
wire?

I've made tests between Modules and SWFLoader, specifically
about memory consumption. In one of them, I called loadModule() and
unloadModule() several times (loading the same module, of course), and
the memory only increases! I think this is the expected (although not
the willed) behavior (as is in the SWFLoader) since Flash Player can't
really kill (and free the memory) a DisplayObject. It would be a hard
work to remove all the references of the loaded application's objects
(without talking about the Flex framework per se) to elect they to GC. 

Thanks
Fabio Terracini



On 1/9/07, Roger Gonzalez [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

The main difference between modules and applications is
that modules have lower overhead, and they only ever get loaded once, no
matter how many times you load them.
 
If you're using the ModuleLoader API, keep in mind that
you're losing about half the functionality of the module system.  I will
assume that you are, because otherwise it would be obvious where to
expose methods.  You might want to play around with the lower level
ModuleManager API just to get a hang of what's going on - ModuleLoader
is a pretty thin veneer over the lower API.
 
Basically, what you want to do is to have your module
implement an interface, say IModuleWhatever.
 
Have your application implement another interface, say
IShellWhatever.
 
Now, add an event handler in the shell application such
that when the module is loaded, you get called back.
 
The ModuleLoader's child property will be an instance
of your module class.  You can cast it to the interface inside the shell
application, and then do something like:
 

IModuleWhatever(moduleLoader.child).setupStuff(IShellWhatever(app))
 
-rg




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Brian Holmes
Sent: Tuesday, January 09, 2007 8:05 AM 

To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: RE: [flexcoders] Re: Compiling modules






Roger,
 Would it be possible to get an example of how a
shell app could communicate or pass data to a module and vice versa. I'm
having difficulty understanding of how to expose methods on both sides
that allow for interoperability. What I'd like to do is to load  user
data in the shell application and then add modules at runtime as needed.
If they require user information then have them look to the shell for
that information so it's always in the same place.
 
And Also, I can't really see any real difference
between a module and another application except for it's extremely
tedious to debug the modules?!  Couldn't the module automatically look
for a debug version of the swf if the shell is a debug version? 
 
Thanks,
Brian
 



From: flexcoders@yahoogroups.com

RE: [flexcoders] Re: Compiling modules

2007-01-09 Thread Brian Holmes
Roger,
 Would it be possible to get an example of how a shell app could
communicate or pass data to a module and vice versa. I'm  having
difficulty understanding of how to expose methods on both sides that
allow for interoperability. What I'd like to do is to load  user data in
the shell application and then add modules at runtime as needed. If they
require user information then have them look to the shell for that
information so it's always in the same place.
 
And Also, I can't really see any real difference between a module and
another application except for it's extremely tedious to debug the
modules?!  Couldn't the module automatically look for a debug version of
the swf if the shell is a debug version? 
 
Thanks,
Brian
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Roger Gonzalez
Sent: Monday, January 08, 2007 2:35 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Compiling modules


I can't think of any reason why you would want to do this.
 
Modules are class factories, not instances.
 
You will create an instance of the class baked into the module, and then
the application can pass those parameters to the instance.
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of John Kirby
Sent: Monday, January 08, 2007 12:32 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Compiling modules



Thanks for the examples.

Question... if you are passing parameters to a module I assume
your url syntax is the same as a SWFLoader (myswf.swf?foo=bar) ... but
module has no parameter property?  How do access passed parameters to a
module?

phillips1021 said the following: 

See: 

http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-M
odules-In-Flex-201
http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-
Modules-In-Flex-201 

for a simple example.




-- 
Whether you think that you can, or that you can't, you are
usually right.
 - Henry Ford 




 


***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] Re: Compiling modules

2007-01-09 Thread Roger Gonzalez
The main difference between modules and applications is that modules
have lower overhead, and they only ever get loaded once, no matter how
many times you load them.
 
If you're using the ModuleLoader API, keep in mind that you're losing
about half the functionality of the module system.  I will assume that
you are, because otherwise it would be obvious where to expose methods.
You might want to play around with the lower level ModuleManager API
just to get a hang of what's going on - ModuleLoader is a pretty thin
veneer over the lower API.
 
Basically, what you want to do is to have your module implement an
interface, say IModuleWhatever.
 
Have your application implement another interface, say IShellWhatever.
 
Now, add an event handler in the shell application such that when the
module is loaded, you get called back.
 
The ModuleLoader's child property will be an instance of your module
class.  You can cast it to the interface inside the shell application,
and then do something like:
 
IModuleWhatever(moduleLoader.child).setupStuff(IShellWhatever(app))
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes
Sent: Tuesday, January 09, 2007 8:05 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Compiling modules




Roger,
 Would it be possible to get an example of how a shell app could
communicate or pass data to a module and vice versa. I'm  having
difficulty understanding of how to expose methods on both sides that
allow for interoperability. What I'd like to do is to load  user data in
the shell application and then add modules at runtime as needed. If they
require user information then have them look to the shell for that
information so it's always in the same place.
 
And Also, I can't really see any real difference between a
module and another application except for it's extremely tedious to
debug the modules?!  Couldn't the module automatically look for a debug
version of the swf if the shell is a debug version? 
 
Thanks,
Brian
 



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Roger Gonzalez
Sent: Monday, January 08, 2007 2:35 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Compiling modules


I can't think of any reason why you would want to do this.
 
Modules are class factories, not instances.
 
You will create an instance of the class baked into the module,
and then the application can pass those parameters to the instance.
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of John Kirby
Sent: Monday, January 08, 2007 12:32 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Compiling modules



Thanks for the examples.

Question... if you are passing parameters to a module I
assume your url syntax is the same as a SWFLoader (myswf.swf?foo=bar)
... but module has no parameter property?  How do access passed
parameters to a module?

phillips1021 said the following: 

See: 

http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-M
odules-In-Flex-201
http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-
Modules-In-Flex-201 

for a simple example.




-- 
Whether you think that you can, or that you can't, you
are usually right.
 - Henry Ford 









***
The information in this e-mail is confidential and intended
solely for the individual or entity to whom it is addressed. If you have
received this e-mail in error please notify the sender by return e-mail
delete this e-mail and refrain from any disclosure or action based on
the information.
*** 





 



Re: [flexcoders] Re: Compiling modules

2007-01-08 Thread Oleg Filipchuk

Exactly,
it isn't so hard to compile modules with command line, but it's all about
the general usability of Flex Builder.
Why it isn't properly documented? Or they think that one page about
compiling modules using mxmlc is enough? There is no mention about compiling
modules just inside of FB without using compiler by itself. Why usual
developers should spent hours to figure out such a simple issue.. I just
can't understand why Adobe is announcing great plans about having a pile of
Flex developers and at the same time can't handle simple documentation and
usability issue.
I really appreciate the work that has been done by Adobe engineers to
brought such a great product, but I just compare the level of documenting in
MSDN (M$)...



--
Best regards,
Oleg Filipchuk


RE: [flexcoders] Re: Compiling modules

2007-01-08 Thread Matt Horn
There is no explicit project type for modules in Flex Builder 2. To
create a module in Flex Builder, you treat the module as an MXML
application and compile it. 

There are two basic approaches:

1) One-project model: Create the modules in the same project as your
application and add them to the application list. This approach works as
long as the application and the modules share the same compiler settings
(such as library path).
To debug the application with modules, reference the debug SWF file from
source code during development, and switch to the non-debug one when you
are ready to deploy. 

2) Multiple-project model: Create a separate Flex or ActionScript
project for each module. Add a linked file to the source folder of your
shell projects that want to use it. This copies the module's SWF file
over at shell project build time. 
Alternatively you could point the module project's output folder at your
shell project's output folder, but a linked file is better.
To support debugging, point the link at the debug SWF file and change
that when you are ready to deploy, without altering source code.

My apologies for not getting this into the proper documentation. I am
currently working on a section about compiling modules with Flex Builder
that will be added to livedocs. The reality is that Flex Builder 2.0.1
does not have explicit support for modules. What you need to do (what
you have already figured out) is someone hacky.

I'll post to this list when the livedocs pages have been updated.

-matt horn
flex docs

 -Original Message-
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of phillips1021
 Sent: Monday, January 08, 2007 8:13 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Compiling modules
 
 Great question. I've run into the same problem. How do you 
 use Flex Builder to compile just the module?
 
 The only work-around I've found so far is to right-click on 
 the module name in the navigator panel and select Run As Flex 
 Application. This command will create a .swf and .html files 
 for the module and try to load it in the browser (where 
 nothing will display). 
 
 It's not the best solution and I hope someone posts a better 
 one, but it is all I've found to work so far.
 
 I did search through the Flex 2.0.1 help files but did not 
 find anything.
 
 Bruce
 
 
 
  
 


Re: [flexcoders] Re: Compiling modules

2007-01-08 Thread Oleg Filipchuk

Matt,
thank you for clearing this issue.
The Multiple-project model looks more convenient for me.
But there is a question about One-project model - it looks like we can't
have modules files in the folders as for Flex Builder it isn't possible to
treat any mxml file placed anywhere except the root as an application (at
least I do not know how).
So, thinking logically, for huge application every module should be the
separate project. It looks effective for medium size project, but is it so
convenient to have hundreds of projects for huge size projects...?
Is Flex Builder team planning to make this issue more clear? For example add
new button next to debug where will be options to compile modules (if any is
open in workspace) that would be very handy for people not preferring to
work with command line.




--
Best regards,
Oleg Filipchuk
euroPIN group j.s.c.


RE: [flexcoders] Re: Compiling modules

2007-01-08 Thread Brian Holmes
Would it be possible to post an example of how to use the mx.modules? 

I would assume that you add a mx:Module/mx:Module instead of the
Application tag and it would get compiled
And then in your shell application you use the mx:ModuleLoader tag to
point to your module.

Is this correct or am I way off. I can't get it to work either. Also, I
also assumed I could just right click on my application in
Flex Builder and select the option of New  Module. That doesn't work
either.

I've really been looking forward to modules, but after upgrading this
morning and reading your message about how to use them,
I'm nothing but extremely confused and discouraged.


Brian..



 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Horn
Sent: Monday, January 08, 2007 8:10 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Compiling modules

There is no explicit project type for modules in Flex Builder 2. To
create a module in Flex Builder, you treat the module as an MXML
application and compile it. 

There are two basic approaches:

1) One-project model: Create the modules in the same project as your
application and add them to the application list. This approach works as
long as the application and the modules share the same compiler settings
(such as library path).
To debug the application with modules, reference the debug SWF file from
source code during development, and switch to the non-debug one when you
are ready to deploy. 

2) Multiple-project model: Create a separate Flex or ActionScript
project for each module. Add a linked file to the source folder of your
shell projects that want to use it. This copies the module's SWF file
over at shell project build time. 
Alternatively you could point the module project's output folder at your
shell project's output folder, but a linked file is better.
To support debugging, point the link at the debug SWF file and change
that when you are ready to deploy, without altering source code.

My apologies for not getting this into the proper documentation. I am
currently working on a section about compiling modules with Flex Builder
that will be added to livedocs. The reality is that Flex Builder 2.0.1
does not have explicit support for modules. What you need to do (what
you have already figured out) is someone hacky.

I'll post to this list when the livedocs pages have been updated.

-matt horn
flex docs

 -Original Message-
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of phillips1021
 Sent: Monday, January 08, 2007 8:13 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Compiling modules
 
 Great question. I've run into the same problem. How do you use Flex 
 Builder to compile just the module?
 
 The only work-around I've found so far is to right-click on the module

 name in the navigator panel and select Run As Flex Application. This 
 command will create a .swf and .html files for the module and try to 
 load it in the browser (where nothing will display).
 
 It's not the best solution and I hope someone posts a better one, but 
 it is all I've found to work so far.
 
 I did search through the Flex 2.0.1 help files but did not find 
 anything.
 
 Bruce
 
 
 
  
 


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





***
The information in this e-mail is confidential and intended solely for the 
individual or entity to whom it is addressed.  If you have received this e-mail 
in error please notify the sender by return e-mail delete this e-mail and 
refrain from any disclosure or action based on the information.
***


RE: [flexcoders] Re: Compiling modules

2007-01-08 Thread Roger Gonzalez
Just make a new project.  You'll need to change the root tag from
mx:Application to mx:Module for a MXML project, or change the base
class of an ActionScript project from flash.display.Sprite to
mx.modules.ModuleBase because FlexBuilder doesn't know about modules
directly.
 
(There is some odd asymmetry in the FB project structure in that you can
add a new MXML Application (which could be a module) to a MXML project
- its a many-to-one relationship, but you can't add a new AS Application
to an AS project, its always one-to-one.)
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of phillips1021
Sent: Monday, January 08, 2007 5:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Compiling modules



Great question. I've run into the same problem. How do you use
Flex
Builder to compile just the module?

The only work-around I've found so far is to right-click on the
module
name in the navigator panel and select Run As Flex Application.
This
command will create a .swf and .html files for the module and
try to
load it in the browser (where nothing will display). 

It's not the best solution and I hope someone posts a better
one, but
it is all I've found to work so far.

I did search through the Flex 2.0.1 help files but did not find
anything.

Bruce



 



Re: [flexcoders] Re: Compiling modules

2007-01-08 Thread John Kirby

Thanks for the examples.

Question... if you are passing parameters to a module I assume your url 
syntax is the same as a SWFLoader (myswf.swf?foo=bar) ... but module has 
no parameter property?  How do access passed parameters to a module?


phillips1021 said the following:


See:
http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-Modules-In-Flex-201 
http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-Modules-In-Flex-201


for a simple example.

 


--
/Whether you think that you can, or that you can't, you are usually right./
- Henry Ford


RE: [flexcoders] Re: Compiling modules

2007-01-08 Thread Roger Gonzalez
I can't think of any reason why you would want to do this.
 
Modules are class factories, not instances.
 
You will create an instance of the class baked into the module, and then
the application can pass those parameters to the instance.
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of John Kirby
Sent: Monday, January 08, 2007 12:32 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Compiling modules



Thanks for the examples.

Question... if you are passing parameters to a module I assume
your url syntax is the same as a SWFLoader (myswf.swf?foo=bar) ... but
module has no parameter property?  How do access passed parameters to a
module?

phillips1021 said the following: 

See: 

http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-M
odules-In-Flex-201
http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-
Modules-In-Flex-201 

for a simple example.




-- 
Whether you think that you can, or that you can't, you are
usually right.
 - Henry Ford 




 



RE: [flexcoders] Re: Compiling modules

2007-01-08 Thread Gordon Smith
I don't think you're expected to pass parameters to a module. You're
expected to call methods that it exposes.

 

- Gordon

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of John Kirby
Sent: Monday, January 08, 2007 12:32 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Compiling modules

 

Thanks for the examples.

Question... if you are passing parameters to a module I assume your url
syntax is the same as a SWFLoader (myswf.swf?foo=bar) ... but module has
no parameter property?  How do access passed parameters to a module?

phillips1021 said the following: 

See: 

http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-M
odules-In-Flex-201
http://www.brucephillips.name/blog/index.cfm/2007/1/8/Example-Of-Using-
Modules-In-Flex-201 

for a simple example.

 

-- 
Whether you think that you can, or that you can't, you are usually
right.
 - Henry Ford 

 



RE: [flexcoders] Re: Compiling modules

2007-01-08 Thread Roger Gonzalez
You just described it.  Its just a normal project.  Create a project for
your module, create a project for your application, make sure you know
what the binary path is going to be, and use that SWF path as your
ModuleLoader url.
 
Modules were functionality snuck into a dot release.  There's no tooling
support.  If we'd waited for tooling support, you'd be waiting until
Flex 3.  So, you'll have to do a bit more manually.  Its annoying, but
not particularly onerous.
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Brian Holmes
Sent: Monday, January 08, 2007 10:07 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Compiling modules



Would it be possible to post an example of how to use the
mx.modules? 

I would assume that you add a mx:Module/mx:Module instead of
the
Application tag and it would get compiled
And then in your shell application you use the mx:ModuleLoader
tag to
point to your module.

Is this correct or am I way off. I can't get it to work either.
Also, I
also assumed I could just right click on my application in
Flex Builder and select the option of New  Module. That doesn't
work
either.

I've really been looking forward to modules, but after upgrading
this
morning and reading your message about how to use them,
I'm nothing but extremely confused and discouraged.

Brian..

-Original Message-
From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
Behalf Of Matt Horn
Sent: Monday, January 08, 2007 8:10 AM
To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
Subject: RE: [flexcoders] Re: Compiling modules

There is no explicit project type for modules in Flex Builder 2.
To
create a module in Flex Builder, you treat the module as an MXML
application and compile it. 

There are two basic approaches:

1) One-project model: Create the modules in the same project as
your
application and add them to the application list. This approach
works as
long as the application and the modules share the same compiler
settings
(such as library path).
To debug the application with modules, reference the debug SWF
file from
source code during development, and switch to the non-debug one
when you
are ready to deploy. 

2) Multiple-project model: Create a separate Flex or
ActionScript
project for each module. Add a linked file to the source folder
of your
shell projects that want to use it. This copies the module's SWF
file
over at shell project build time. 
Alternatively you could point the module project's output folder
at your
shell project's output folder, but a linked file is better.
To support debugging, point the link at the debug SWF file and
change
that when you are ready to deploy, without altering source code.

My apologies for not getting this into the proper documentation.
I am
currently working on a section about compiling modules with Flex
Builder
that will be added to livedocs. The reality is that Flex Builder
2.0.1
does not have explicit support for modules. What you need to do
(what
you have already figured out) is someone hacky.

I'll post to this list when the livedocs pages have been
updated.

-matt horn
flex docs

 -Original Message-
 From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On Behalf Of phillips1021
 Sent: Monday, January 08, 2007 8:13 AM
 To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Compiling modules
 
 Great question. I've run into the same problem. How do you use
Flex 
 Builder to compile just the module?
 
 The only work-around I've found so far is to right-click on
the module

 name in the navigator panel and select Run As Flex
Application. This 
 command will create a .swf and .html files for the module and
try to 
 load it in the browser (where nothing will display).
 
 It's not the best solution and I hope someone posts a better
one, but 
 it is all I've found to work so far.
 
 I did search through the Flex 2.0.1 help files but did not
find 
 anything.
 
 Bruce