• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
crash when using notification center and self
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crash when using notification center and self


  • Subject: crash when using notification center and self
  • From: "Tyler Riddle" <email@hidden>
  • Date: Mon, 5 Jun 2006 23:01:53 -0700

I am a brand new Cocoa programmer running into a little trouble with
the notification system. In short,

[[NSNotificationCenter defaultCenter]
postNotificationName:@"MBModelStateChanged" object:nil userInfo:info];

does not crash but

[[NSNotificationCenter defaultCenter]
postNotificationName:@"MBModelStateChanged" object:self
userInfo:info];

results in a SIGSEGV

My model is going to post notifications which the controller picks up
- I'm calling that code from the model and I have multiple models so I
need to be able to pay attention to only the right one at the right
time.

Is it wrong to pass "self" as the object when posting a notification?

Thanks for your help.

Tyler Riddle
--
Quote: "You need only reflect that one of the best ways to get
yourself a reputation as a dangerous citizen these days is to go about
repeating the very phrases which our founding fathers used in the
struggle for independence."--Charles Austin Beard
Web site: http://tylerriddle.com
AIM: The Masta Spice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: crash when using notification center and self
      • From: Bill Bumgarner <email@hidden>
    • Re: crash when using notification center and self
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: stringWithContentsOfURL: usedEncoding: error:
  • Next by Date: Re: Fastest way to "ExpandAll" in NSOutlineView
  • Previous by thread: Re: Fastest way to "ExpandAll" in NSOutlineView
  • Next by thread: Re: crash when using notification center and self
  • Index(es):
    • Date
    • Thread