Well, I've demystified it, sorta.

My previous results were from the timeline.

Here are the results from a simple class:

Just a simple class that is instantiated.
228 bytes

Same but with import statements in the class file.
228 bytes

Same but with variable assignments in the class.
47.9 KB

Variable assignments with no imports.
47.9 KB

That is probably what everyone is expecting to see and how the docs define 
the behaviour. When we talk timeline, you can chuck that.

Interesting difference. I don't know why it would matter but that's the 
behaviour I'm seeing.


Derek Vadneau

----- Original Message ----- 
From: "Ian Thomas" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, May 25, 2006 3:47 PM
Subject: Re: [Flashcoders] OOP 101: Is import really necessary?


Hi Derek,
  That's really interesting - and goes against everything I'd expect.
Particularly when your other results have kind of proved the opposite
(and I've certainly proved the opposite before with ClassFinder
situations). A couple of other tests might prove illuminating...

- Is the same true of non-Macromedia classes? (i.e. have they hacked
something specifically for those? I'd doubt it, but you never know)

- How does it behave when you do something like:
import mx.controls.Button;
var a:String="mx";
trace(_global[a]['controls']['Button']);

In other words, is the compiler doing some cunning reduction on the
string literals and actually working out that you're using the class?
Again, I doubt it, but you never know!

You have me mystified. :-D

I'd test it myself, but have to rush off now to put up a tent in about
10cm of muddy water in a field somewhere in the middle of the UK. If
nothings come to light by the beginning of next week, I'll have
another look. :-)

Cheers,
  Ian


_______________________________________________
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