How to use -optionDescriptionsForBinding: ?

2009-04-30 Thread Pierre Molinaro
Hi, I am trying to programmatically enumerate all available bindings and their options for a given class. It works fine, except - optionDescriptionsForBinding: that allways returns an empty array of options, for any binding. The routine I have written is: static void enumerateBindingsForC

Get confused with initWithData:encoding:

2008-09-02 Thread Pierre Molinaro
Hello, I do not understand what I am doing wrong ; running the following snippet: NSMutableData * d = [NSMutableData dataWithCapacity:10] ; const unsigned char data = 0xC0 ; // U+00CO is À [d appendBytes:& data length:1] ; NSLog (@"d: %@", d) ; NSString * so

Re: How does bind:toObject:withKeyPath:options: work?

2008-04-17 Thread Pierre Molinaro
Hi, It seems that -willChangeValueForKey and -didChangeValueForKey of NSArrayController are called on arrangedObjects change. I think you can use of a class that inherits from NSArrayController where theses methods are redefined to send manually change notifications: - (void) willChang

Re: Intercepting retain/release of object

2008-03-19 Thread Pierre Molinaro
The retain method should return self object : - (id) retain { unsigned int count = [self retainCount] + 1; NSLog(@"RETAIN: retain count after retain is: %i", count); return [super retain] ; } After calling [super release], the current object may not exist any more; try: