notification problem
notification problem
- Subject: notification problem
- From: Famille GOUREAU-SUIGNARD <email@hidden>
- Date: Sun, 11 Aug 2002 07:29:45 +0200
Hi,
I've got this bit of code generating an error. It has been two hours,
and I don't want to throw my i-mac through the window. Anybody has an
idea (except opening the window in order not to break it ...)
In object A :
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{
if ([[aNotification userInfo]
objectForKey:@"NSFieldEditor"]==[[cnxTiroir parentWindow] fieldEditor:0
forObject:cnxEditQuerySQL]) {
NSDictionary *dico ;
NSString *chaine = [cnxEditQuerySQL stringValue] ;
NSLog (@"") ;
NSLog (@"Entamer Query") ;
dico = [NSDictionary dictionaryWithObject:chaine
forKey:@"query"] ;
[dico retain] ;
[chaine retain] ;
[[NSNotificationCenter defaultCenter] postNotificationName:
@"ntfReloaderDataSourceStockParQuerySQL"
object:nil
userInfo:
dico] ;
}
}
in Object B :
- (void)awakeFromNib
{
[[NSNotificationCenter defaultCenter] addObserver: self
selector:
@selector(demandeReloadDataSourceStockParQuery:)
name:
@"ntfReloaderDataSourceStockParQuerySQL"
object: nil] ;
}
- (void) demandeReloadDataSourceStockParQuery: (NSNotification)
notification ;
{
SMySQLResult *result;
NSDictionary *ligne;
NSString *chaine, *chaineQuery ;
int compteurI ;
NSLog (@"") ;
NSLog
(@"ControleurTableViews.demandeReloadDataSourceStockParQuery") ;
NSLog (@" %@",[[[notification userInfo]objectForKey:@"query"]
className ]) ;
I ALWAYS GET AN ERROR IN PREVIOUS LINE
...
}
Thanks.
Camille
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.