> So  is there a  maximum number of concurrent MIAWs at any one time?
> 
I've never seen a maximum number documented. There probably is a
theoretical maximum, but I suspect you would run out of memory long
before you reach that number.

> What number is considered too many?
> 
There are two answers--technical and aesthetic. The answer to both is
"it depends."

Take the technical limitations of your target platform into
account--amount of RAM, OS, and the like. Check the free RAM (the
freeBytes) before and after, and you'll know how much memory a MIAW
takes up.

You're kind of in uncharted territory here--I don't think many of us use
a whole lot of MIAWs concurrently. I'd be interested to hear the results
of your tests.

>  Don't MIAWs of irregular shapes take up more memory?
> 
Good question--don't know. Maybe you can tell us ^_^

> In designing this for the client, we shouldn't clutter the screen with
> too 
> many MIAWs?
> 
There's your aesthetic question. How much is too much? How many children
is too many? You're a designer, so you're probably in a better position
to answer that than I. Generally speaking, though, it is preferable to
avoid window clutter.

Again, that depends a lot on the program. I can see a lot of MIAWs if,
say, you were doing a video conferencing system.

> Yes,  by using the tell command.  But  why it is not advisable to do
> this?
> 
I'm jumping in late, so I'm not sure of the context of this question.
But I remember that you were having memory problems.

Here's probably the most common error (and its solution): a MIAW cannot
close itself, nor can it tell the stage to close it directly. Let's say
you have a MIAW called "Howdy". These two methods of closing the MIAW
will give you serious memory problems:

-- the following code is in the MIAW "Howdy"
window("Howdy").forget()

tell the stage
  window("Howdy").forget()
end tell

Both of these are problematic because you are making a call to a
function, forget. Any time you call a function, when it finishes, it
returns control to the caller--in this case the MIAW. But you've
disposed of the MIAW, so the caller no longer exists, and the return
goes who-knows-where (your mileage may vary).

The only reliable way to close a MIAW is to have a variable you set,
then let the stage close the MIAW. E.g.:

-- code on the stage
global gMiawClose

on prepareMovie
  gMiawClose = FALSE
end

-- code in a frame script
on exitFrame
  if gMiawClose = TRUE then
    window("Howdy").forget()
    gMiawClose = FALSE
  end if
end

-- code in your MIAW
on readyToClose
  tell the stage
    gMiawClose = TRUE
  end tell
end

I actually use a bit more complex system using timeout objects, but
that's a subject for another e-mail. Gotta work now ^_^

Cordially

Kerry Thompson
[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!]

Reply via email to