Working around bug for DropObject picture being nill

How do I work around this bug in Xojo? How long will it take for Xojo to fix it? Do the Xojo even test Xojo on Windows? I really need this bug fixing or at very least a workaround.

Thanks

What is the Feedback case number for this bug, please?

Turn your break points on in your menu debug settings. When you run the debugbuild, the error should stop your program’s execution; and display the offending method or property(set/get).

Within that code, somewhere near the bottom add:

Exception err as NilObjectException

or use

Try
     'Whatever function you're using which invokes the DropObject event
Catch NilObjectException
     'Well, DropObject was nil. So do something or nothing at all
Finally
     'We failed all together, do something or nothing at all
End Try

If this is an actual Xojo bug, please provide demonstration code which duplicates this bug for a work-around.

Kind Regards

Correction:
Catch NilObjectException

Should be,
Catch err as NilObjectException

[quote=44950:@Matthew Combatti]Correction:
Catch NilObjectException

Should be,
Catch err as NilObjectException[/quote]
You do not have to do that, my friend. :wink:

The two statements are very similar, but are different in a very important way.

Catch NilObjectException

This line catches all exceptions, and stores a reference to the exception in a variable called NilObjectException.

Catch err as NilObjectException

This line catches only NilObjectExceptions, and stores a reference to the exception in a variable called err.

For example, run this code in the App.Open event of a new project.

Try #pragma BreakOnExceptions Off Dim s() As Integer s(1) = 1 Catch NilObjectException Break ' debugger will break here End Try

When the debugger breaks, you will see (in the Variables pane) that the local variable “NilObjectException” is of type OutOfBoundsException.