At 00:25 +0200 06/04/2002, Michael von Aichberger wrote:
>> ... did it all in OOP. I do not have a global anywhere.
>
>Not even globals that hold references to objects?
Nope. Nothing. No globals. Only one "movie" script and that contains
two functions I employ in a sprite naming behavior -- those functions
act like Lingo keywords and have to be present. Otherwise nothing. No
startMovie, prepareMovie, stopMovie, etc. It's all instances and
behavior props. This is very nice for a couple reasons:
1. I've pretty well isolated interface from data, meaning that my
behaviors can intercommunicate and, if some subfunction fails, my
overall program keeps running. This is good because it's a big
program that does some pretty complex stuff, and a crash would at
least be damned annoying, if not actually something that could cost
the end user a lot of work; and
2. I am able to use MIAWs with a degree of stability I have *never*
seen them achieve before. I use them all the time for editing,
dialogs, special file selection, etc. Since I don't have closeWindow
events to look for, and since I do messaging from one object to
another, even when my code rolled over in early development and
things ground to a halt, my MIAWs were all closed and disposed of
properly. Those of you who have had MIAWs mistakenly marked as being
"in use" by Director know what that means -- especially when you open
the file to update its code and find you cannot save it because it's
been falsely hooked by Director.
Probably it took me twice the time to create the OOP encapsulation
that it would have otherwise -- but man, this thing is steady, and
it's pretty darn scalable too.
--
Warren Ockrassa | http://www.nightwares.com/
Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
http://shop.osborne.com/cgi-bin/osborne/0072195622.html
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]