To get an import statement in your generated code,

Create a diagram, on which you will draw the relationships between classes

Use the Aggregate or compose under Class Section in the Toolbox on the left.

When you describe a compose or aggregate relationship between 2 classes, the one that is aggregating the other will get an import statement in its generated code.

----- Original Message ----- From: "David Rorex" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, March 23, 2006 4:29 AM
Subject: Re: [Flashcoders] [OT] Sparx Enterprise Architecht generatingActionscript


On 3/22/06, jim <[EMAIL PROTECTED]> wrote:

Hi all,

I started playing with EA getting it to generate Actionscript. I need to
know how to place an import statement into a class like:

import com.something.MyClass;

I see it can handle doing this as I have reverse engineered one of my
projects and on regenerating the code the import statements are still
there
but I cannot see where it is in EA.

Any help would be great.
Jim


I don't know what Sparx EA is, but I know this about import statements:
When your movie is compiled, 'import' statements do not actually generate
any code.

The following two examples will produce exactly the same swf bytecode:

1:
import com.something.MyClass;
x = new MyClass();

2:
x = new com.something.MyClass();

So you don't really need import for anything, it is just to make the typing
easier when writing classes.

FYI: Just because you import a class, does NOT mean it will be compiled. You
actually have to reference it somewhere, either via a new statement, or
referencing it directly.

hope this helps,
-David R
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to