On Thursday, July 3, 2003, at 12:19 PM, Thomas Reed wrote:
If you want to get a pixel color, you need to access that color from
the original Picture you drew into the canvas.
Actually, that's what I was doing, and moved it to the backdrop when
the crashing started.
Well, though you didn't comment on it, I hope you read the rest of my
message, since it'll give you at least some of the details you need to
solve these problems.
I did.
BTW, you need to be more specific in the future when you say "bomb" or
"crash".
Application stops running. No exception handling can prevent it. I get
a message from the os telling me that the app has encountered a problem
and needs to close. Microsoft is kind enough to add "We are sorry for
the inconvenience"
Technically, I don't think you're seeing a crash. If your app is
quitting and telling you there was a NilObjectException, that's not
really a crash.
Nope. that's not what is happening. I have an exception handler that
never gets touched.
It's a graceful exit on an error condition. Your code could handle
the exception and keep going without crashing.
Nope, it can't in this case. That would be my preference, and how I
normally code to handle exceptions.
Further, it tells you exactly what the problem is -- in this case,
you're trying to access a property or method of an object that is
nonexistent (nil).
I have a picture that I'm trying to get a colour from. I've set it as
the backdrop of a canvas. The canvas' backdrop graphics cannot be
accessed, and the only reason I tried to do that is because the
original picture object's graphics cannot be accessed either. I now
have excessive checking for nil ( i'm checking everything )
Checking for p.grahics = nil bombs me. Bomb meaning that no exception
handler is touched - the application stops and no further code is
executed.
And, no, if I was simply trying to access something that is nil, then I
wouldn't be emailing the list. I have enough experience to know how to
check for a nil object. When I check for it being nil, I bomb ( bomb as
explained above )
So, please tell what you mean by "crash" in the future.
Noted above.
If it's an exception, say so and give the exception type.
It isn't.
If it's a hard crash of some kind (freeze, crash with the Finder
reporting the application unexpectedly quit, etc), describe it.
Above.
---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
.
|