Cleaning up a window with blocks

2011-09-29 Thread Eric Gorr
The intent of the following code is to implement a quick and easy way to bring up a window and provide a way to clean up after it closes. The problem is that it is crashing. I believe I am missing something obvious here and was hoping that someone could remove the blinders... - (void)

Re: Cleaning up a window with blocks

2011-09-29 Thread Thomas Davie
A quick scan over the code says that your issue is that you're referring to theObserver inside theObserver, which, when the block is constructed, as not yet been assigned the result of addObserverForName:... Bob if (*ra4 != 0xffc78948) { return false; } On 29 Sep 2011, at 17:37, Eric Gorr

Re: Cleaning up a window with blocks

2011-09-29 Thread Ken Thomases
On Sep 29, 2011, at 11:42 AM, Thomas Davie wrote: A quick scan over the code says that your issue is that you're referring to theObserver inside theObserver, which, when the block is constructed, as not yet been assigned the result of addObserverForName:... You can fix that by declaring

Re: Cleaning up a window with blocks

2011-09-29 Thread Eric Gorr
Ya, thanks. I spotted that almost immediately after I posted the message. On Sep 29, 2011, at 4:22 PM, Ken Thomases wrote: On Sep 29, 2011, at 11:42 AM, Thomas Davie wrote: A quick scan over the code says that your issue is that you're referring to theObserver inside theObserver, which,