T. Michael Keesey wrote:
On 8/21/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:
T. Michael Keesey wrote:
On 8/21/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:

myShape.x = 500;

I hope that you meant
myshape.setX(500);

Huh?

No, that's not part of the flash.display.Shape API. And while it's
true that "x" in this context is actually not a true field, but a pair
of methods (__get__x and __set__x, not getX and setX) disguised as a
field, I think you can safely ignore that in an introductory class.
That is the problem when you have to use someone's API and it does not
follow standards.
They probably wrote it before we know the right way to do getters and
setters - or they never bothered to read up on the state of the art in
programming.

Uh, you do realize that is Adobe's own API, right?

I have been building RIAs in Flash since AS1. I am under no illusions about Macromedia. They wrote AS1without reading ECMA spec or even looking at Java. We were using Eclipse and talking about in this forum, 2 years before Macromedia adopted it. The lack of standardization in the old components and Classes is not something to emulate or teach as a good model. To be fair, they have really got a lot better once they realized that there is a strong community that uses Flash for building real applications that have to be robust and maintainable in the real world.

Ron
http://livedocs.adobe.com/flex/2/langref/flash/display/Shape.html#propertySummary

That is the "proper" way to do getters and setters in ActionScript
(2.0 and 3.0). This isn't Java.

_______________________________________________
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