Alex da Franca wrote:
Am 30.06.2005 um 16:53 schrieb Brennan Young:
Here's an interesting one.
it is a FOL, that director can't intercept (?) events, which are
generated from xtras.
it is the same with MUI callbacks for example.
any error fails gracefully (??) and must be handled by the "owner" of
the event, which is the xtra.
Hi Brennan, hi Alex,
thanx for the info. A workaround would be to let the callback create a
timeout object (see code below which does succesfully throw an error).
So, I wonder, maybe it would be a good habit to ALWAYS use
1ms-timout-objects for xtra callbacks? What do you think?
Valentin
-- throws an error
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
put "DONE"
err = xmlparser.getError()
if voidP (err) or err = "" then -- parse successful?
timeOut("timer1").new(1, #foo, me)
end if
end
on foo me
timeOut("timer1").forget()
l = xmlparser.makelist()
put l[0] -- deliberate error (index out of range)
alert "This never happens"
end
[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!]