Re: [Flashcoders] Bizare...AS3.0 packages have methods?

2005-10-31 Thread Spike
It's a method of the package.

When you create an AS 3 class you can put methods inside the package {}
block, but outside any class definitions.

I'm not sure why it works that way, but that's the way it works.

Spike

On 10/31/05, Martin Wood [EMAIL PROTECTED] wrote:

 i think its just a function declared with package scope.


 Mark Lapasa wrote:
  flash.util.trace()
 
 
 
  Is that a method of a package? Or a compiler directive?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Bizare...AS3.0 packages have methods?

2005-10-31 Thread JesterXL
Another one that looks even weird is flash.util.getTimer.  Adding camel case 
makes it weird, but in usage it's not so bad.  If you do:

import flash.util.trace;

You can then just do:

trace(normal);

In your classes.

- Original Message - 
From: Martin Wood [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, October 31, 2005 1:18 PM
Subject: Re: [Flashcoders] Bizare...AS3.0 packages have methods?


i think its just a function declared with package scope.


Mark Lapasa wrote:
 flash.util.trace()



 Is that a method of a package? Or a compiler directive?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Bizare...AS3.0 packages have methods?

2005-10-31 Thread Alias
Yeah - if I had £1 for every time I said - hmmm, I wish I could redirect all
the traces to a different function (like a screen logger) without changing
my code too much... I have at least £10. :)

Alias

On 10/31/05, Stan Vassilev [EMAIL PROTECTED] wrote:

 Well that's one thing I always wanted to do in AS2 so if it stays like
 this
 it'd be great.
 There are many functions that just perfectly without class in front of
 them
 (after you import the package).

 For example those you mentioned. When I was implementing my trace utils I
 was forced to import fmethod.debug.* and still having to type every time
 DebugUtils.log();

 now I could just make it package method and type log(); ... it's great to
 have that

 Regards, Stan Vassilev

 - Original Message -
 From: Spike [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Monday, October 31, 2005 8:49 PM
 Subject: Re: [Flashcoders] Bizare...AS3.0 packages have methods?


 It's a method of the package.

 When you create an AS 3 class you can put methods inside the package {}
 block, but outside any class definitions.

 I'm not sure why it works that way, but that's the way it works.

 Spike

 On 10/31/05, Martin Wood [EMAIL PROTECTED] wrote:
 
  i think its just a function declared with package scope.
 
 
  Mark Lapasa wrote:
   flash.util.trace()
  
  
  
   Is that a method of a package? Or a compiler directive?
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 
 Stephen Milligan
 Do you do the Badger?
 http://www.yellowbadger.com

 Do you cfeclipse? http://www.cfeclipse.org
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Bizare...AS3.0 packages have methods?

2005-10-31 Thread Mark Lapasa
:/

Something like trace should be globalized (but somehow could be overrided).
I guess I can't have everything. In MM's anti-method-globalization approach,
it seems like a whole bunch of handy methods like...

trace()
fscommand()
getTimer()
LoadVars.send()

...got kicked out of the global house and have no class of their own to call
their home. So it seems they've been squished in with package definitions.
Better than accessing static methods like DebugUtils.log() I guess.

The reason why all of this is of any concern to me is that I am attempting
to write solid AS2.0 today that has the potential to be migrated to AS3.0
tommorow. The reason why I havn't gone head first into AS3.0 is that my
present target audience is Flash Player 7.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Stan
Vassilev
Sent: Monday, October 31, 2005 2:24 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Bizare...AS3.0 packages have methods?


Well that's one thing I always wanted to do in AS2 so if it stays like this
it'd be great.
There are many functions that just perfectly without class in front of them
(after you import the package).

For example those you mentioned. When I was implementing my trace utils I
was forced to import fmethod.debug.* and still having to type every time
DebugUtils.log();

now I could just make it package method and type log();  ... it's great to
have that

Regards, Stan Vassilev

- Original Message -
From: Spike [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, October 31, 2005 8:49 PM
Subject: Re: [Flashcoders] Bizare...AS3.0 packages have methods?


It's a method of the package.

When you create an AS 3 class you can put methods inside the package {}
block, but outside any class definitions.

I'm not sure why it works that way, but that's the way it works.

Spike

On 10/31/05, Martin Wood [EMAIL PROTECTED] wrote:

 i think its just a function declared with package scope.


 Mark Lapasa wrote:
  flash.util.trace()
 
 
 
  Is that a method of a package? Or a compiler directive?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Bizare...AS3.0 packages have methods?

2005-10-31 Thread ryanm

The reason why all of this is of any concern to me is that I am attempting
to write solid AS2.0 today that has the potential to be migrated to AS3.0
tommorow. The reason why I havn't gone head first into AS3.0 is that my
present target audience is Flash Player 7.


   Easy to migrate (for the mentioned functions) in a single line of code:

import flash.util.*

   Then your trace() calls will work just like the do now.

ryanm
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders