Right now am in hospital so I can not try, but I look for a solution of the following:
When I use getprop, setprop (win32-api) that allows to attach 4 bytes as a named property to anything that has a windows-handle I.e. hWnd, and my script causes a Runtime-Error, it leads to total crash of thinbasic since the properties are still attached to the automatically destroyed windows objects. Is there a way to either trap the RTE that would allow to use propRemove before the error is shown or could there be an udt-element similar to _Create or _Destroy that would get called in case of an RTE to all existing udts allowing to unbind hooks, attached properties, imagelists, icons etc. Just like
Type tExample
X as Long
Function _Create()
End Function
Function _Destroy()
End Function
Function _RTEexit()
' here either a link to destroy or steps
' that have to be done in case
' of forced exit through Runtime-Error
End function
Thinkeable also as with a callback that is attached to a control that we had a directive - not udt'related as
#InCaseOfRTE
' do what has to be done
#EndCaseOfRTE
Bookmarks