Re: Sending messages to nil -- anyway to detect this?
Re: Sending messages to nil -- anyway to detect this?
- Subject: Re: Sending messages to nil -- anyway to detect this?
- From: "David W. Halliday" <email@hidden>
- Date: Wed, 20 Jun 2001 00:29:09 -0500
- Organization: Latin AmeriCom, formerly Latino Online
Michael P. Rogers wrote:
>
Is there a mechanism in Objective-C to detect when a message has been
>
sent to a nil pointer? There are times when it'd be handy if the
>
run-time system flagged it as an error.
>
>
TIA,
>
>
Michael
>
...
Well, you can always do an "assert", or any other testing within your
own code. (This has the finest degree of granularity anyway.)
It seems to be that there once was some kind of runtime or compile
time modification one could do to this behavior (causing an exception, or
something), but I don't recall now, even if such is still available.
David email@hidden