Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notification Manager Callback Argument How ?



 On Nov 9, 2005, at 9:17 AM, Matthias Schmidt wrote:

 how can I pass an argument (in this case an IconRef) to a callback
 method of the notification manager ?
 if i try to abuse one of the fields of the NMRec the thing is
 crashing.

I wrote:

That's what the nmRefCon field is for.

Laurence Harris <email@hidden> wrote:

The icon is ignored in Mac OS X if I recall correctly.

The icon was in the nmIcon field, not nmRefCon. Anyway Mr. Schmidt did not say what he wanted to use an IconRef for, so I did not assume that he was trying to display an icon in an Apple menu.



Matthias Schmidt wrote:

Anyway I tried to abuse that field and pass my argument through that to
the callback, but it caused a crash, when the callback routine was
called. (Why it causes a crash, when we don't need that field anymore?)

This is not an abuse, the documentation says that nmRefCon is for use by your application. I think there must be some other reason for the crash. For instance maybe the IconRef is no longer valid when the response callback is called.


--
  James W. Walker, ScriptPerfection Enterprises, Inc.
  <http://www.write-brain.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Notification Manager Callback Argument How ? (From: Laurence Harris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.