Hello list,

There is an error I want to trap before it's spitted out to my end user
(questions at the bottom of email) :
If you try to define a DrawRect To a MIAW and that Movie in this MIAW is
opened with Write permission you get the error (this error is from window i
guess) : "Unable to open file [...filepath...] because it is already open
with write permission by another user".
Then on the next instruction to the MIAW you get the error : "Object
Expected" Or "Property not found".
Demonstration :
Global wMap, gMapWidth, gMapHeight
wMap = Window("Map1.dir")
wMap.DrawRect = Rect(0,0, gMapWidth,gMapHeight)
-- Right after the DrawRect we get the first error
wMap.Windowtype = 2
-- Then here we get the property not found
Open wMap
wMap.MoveToFront()

I manage to trap the second erreor by doing this test :
If wMap <> VOID Then
  wMap.Windowtype = 2
  Open wMap
  wMap.MoveToFront()
End If

But I still get the first error (The Write permission one)... Is there any
way to trap it before the user see it ?
I'm new to Lingo but I code since a little time now, I havent seen any Error
handling ability to Lingo (Neither "a la C++" : Try..Catch or "a la VB" : On
Error Resume Next, On Error Goto. If there is such error handling mechanism
can you point me out to an article / tutorial URL please ?

Thank in advance,

Alexis Cloutier


[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