Irv Kalb wrote:

> Wow, an entire discussion on OOP, and I'm out of the office for one
> morning.
-Sorry you missed out on all the fun!

> One quick comment.  In your original message you mentioned that there
> were five different properties that you wanted to get and/or set from
> a behavior.   What do you do with the property values you get back
> from the behavior?  Could you possibly do whatever you are doing
> inside the behavior rather than asking the behavior for the value of
> a property and operating on it outside the behavior?

-Maybe. The project is basically a digital photo album, where I can view
the image files in a folder, in fullscreen, as a list, or as thumbnails.
I can associate comments (stored in a database) with the images.

The behavior is attached to a text member which holds the names of the
files. This behavior is a master for two slave text members which hold
the date/size of the files. 

The behavior properties are things like the folder path, the current
file, total file count, & so on. Any activity in the interface, like
pressing the "view next image" button, or, in list mode, pressing the
"sort by date" button, send calls to the master behavior. In the case of
the "view next image" call, the currentFile property & the active text
line are updated, and the call is sent on to the bitmap behavior, which
updates the fileName of the bitmap member. So far, so good.

The grey zone has been all the handlers that handle the file stuff -
"open" and "save" dialogs and associated helper handlers, and handlers
which create the sorted lists, byName, byDate, bySize. I had
instinctively put these in a movie script, because they are not
"directly" related with the text sprite on stage.
However, they sometimes access the currentFile or folderPath stored in
the master behavior. I think I'm working towards eliminating most
globals, and just haven't gone all the way.

Well... now that's off my chest - thanks for your interest.

When I say the how and why of parent scripting, I mean building a sense
of when to use behaviors, and when to use parent scripting. My first
efforts all lead me to thinking, "Why don't I just use a behavior?"

Regards,
Clars

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]

Reply via email to