objective c - NSConcreteNotification is received, but not defined? -
I am writing preference for my app which registers it to launch on login ( LSSharedItemList
API). All goes well and my app toggles its presence in the user's login items on the checkbox state. Now I want to solve another problem when the user actually removes the app from "login items" in "code.accounts.prefPane" .
By using the notification watcher, I think the Distributed Notification Center Com.apple.loginItemsListDidChnage
(note the typo) notification, so I'm the only selector for that selection That is the IBAction
) which handles the checkbox in the preferences window (which in fact registers the app to login with the [UN] object.)
The problem occurs when I send the action I try to compare the class of A which turns my app into a login item. I use the NSConcreteNotification
class by using [sender details]
and [sender class]
, but as soon as I can compare it with I try - Code Breaks is saying that no such class has been defined:
If ([[Sender class] is aquoto: [NSCConputation class]]) {...}
If I try to compare the sender to NSNotification
then the entry in that branch Does not interest.
Maybe I'm missing some essential knowledge on the information distributed in Mac OS X
Mac OS X 10.6.2 is running
< Div class = "post-text" itemprop = "text"> nsccongot notification
is a private sub-class of the abstract code NSNotification
, then use -isKindOfClass:
:
if ([sender isKindOfClass: [NSNotification class]]} {...}
Comments
Post a Comment