Two responses in one....I can't post from work right now, so if you'd be so kind as to forward this for me?

Xtras, ActiveX events, Flash (which uses an Xtra)

You should set flags on events received from them and poll those flags on a regular Director event. Events n the threads that love them may also just die in the middle of executing.

It's kinda neat to watch, actually....an ActiveX message send a callback to my kiosk, and then died 100 ms or so later. So this foreign director "head" comes into the codes, starts executing, and then stops in the middle, whereas the Director process "head" was still sitting there trying to 'go to the frame'.

roymeo

At 07:53 AM 6/30/2005, Brennan Young wrote:
Here's an interesting one.

Using the XML parser Xtra and I discovered that when using the callback feature of parseURL, script errors are just ignored. The offending code just exits.

Not getting error messages is A Bad Thing when debugging, as I am sure you will appreciate. I spent enough time hunting this issue that I have decided to post about it.

Bare bones circumstances are demonstrated with this behavior:

property xmlparser

on beginsprite me

  thisURL = "http://www.w3schools.com/xml/note.xml";
  xmlparser = new(xtra "xmlparser")
  xmlparser.parseURL(thisURL, #parseDone, me)

end

on parseDone me, l

  err = xmlparser.getError()

  if voidP (err) or err = "" then -- parse successful?

    l = xmlparser.makelist()
    put l[0] -- deliberate error (index out of range)
    alert "This never happens"

  end if

end

If parseDone() calls some other handlers, this error can be even more difficult to track. The worst thing about this is that *any* script errors are ignored, regardless of kind, so this issue may rear its ugly head under many circumstances.


I suppose some of you know this already, but I post it here so that it might be of use sometime, somewhere.

I long for a proper exception handling mechanism in Lingo.

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 lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

-----------
Roy Crisman
Macromedia Director Programmer, Lingo Guru, Multimedia Producer
150 Laidley St #1
San Francisco, CA  94131-2754
(585)615-2873 cell
http://www.brokenoffcarantenna.com/
roymeo(AT)brokenoffcarantenna.com

[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to