"Robert Tweed" <[EMAIL PROTECTED]> wrote

> Actually, I do think it undermines Lingo's credibility,
> to a greater or
> lesser extent, depending on how you look at it. As you
> can probably tell, I
> like to know how things work, so when I write some code
> I know it's going to
> do what I expect it to do. I don't like lots of things
> being left undefined,
> just because the Macromedia engineers are too lazy to
> address what is
> clearly a bug, so they do a Microsoft a re-label it as
> a feature.
> 
> Sorry, but in this case it's not acceptable, and it can
> seriously complicate
> what should otherwise be simple code. Scripting
> languages are for exactly
> that - writing simple elegant code that reads easily.
> They are not for
> writing mammoth chunks of code that explicitly work
> around every possible
> bug-causing case - the language itself is by design,
> supposed to negate the
> need for all that.

This kind of issue would be solved if Macromedia gave us decent exception
handling, so that we could stay in the scope of any anticipated errors when and
where they happened without being catapulted into the nebulous world of
alerthook, which pops the entire call stack. (Does anyone ever use the
alertHook?)

Here's how it might look

try

  c = myObject.count()-- type of myObject may be xtra instance

on error e

  if e = "handler not found in object" then
    -- whatever
  end if

end try

This would certainly be faster than taking myObject to string before doing
stuff, because the exception would simply not occur in many cases.

Stick that in your wishlist and smoke it.

Brennan
[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