Picture Disappears

Good afternoon.

I create a picture.
When I try to draw into the graphics object I get a nil exception. The graphics object is there, but the backing picture is not.
So, I (as an experiment) placed the picture in a property of a module. Same thing.

The picture is, in fact, created when I say “new Picture,” but when I get around to using it, it’s gone.

Anyone have any clues?


show your code


At the moment it’s to convoluted. But, I had an idea. I’ll make the property holding the image a computer property. I should be able to catch when it disappears. With any luck, I’m clearing it from somewhere.


I will bet that by “disappear” it is actually going out of scope… but with out knowing what you are doing it is all a guess

If done correctly, there should be nothing to “catch”… try to re-engineer it to be correct, putting band-aids will ultimately lead to the patient bleeding to death.


Yep. The picture I was using went out of scope. Found it.

What’s strange is that the graphics object attached to the picture was not nil, but the picture itself was,.

I continue.

Thank you.