> On Oct 19, 2015, at 11:12 AM, Eric E. Dolecki <edole...@gmail.com> wrote:
> 
> I have been using NSNotificationCenter to affect objects in other classes
> to good effect. 

I don’t understand … that class is used to register notification observers and 
to post notifications. What do you mean by “affect”?

> *ViewController().someObject.hidden = true*
> 
> When I compile and run, I get a EXC_BAD_INSTRUCTION at that line.

That line doesn’t make sense to me. `ViewController()` will create a new 
ViewController instance, but you’re never assigning it to a variable or 
property, so it’s probably going to be dealloced after this line returns. So 
this doesn’t really do anything. 

> I know it exists in the ViewController scope before my line is called. 

Again, I’m not sure what that means. Especially since the ViewController object 
doesn’t exist before that line is called.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to