I repost this mail because I had problems connecting with mailing lists, sorry 
if this is someway annoying...

I created an IB plug-in with a subclass of NSView with an exposed bind of type 
NSNumber, and then I bind it to a MyNSImageView through an NSObjectController 
(this is made directly in IB).
Now, everything works fine, except that when the method setSelectedIndex: from 
MyClass is called the bound NSImageView doesn't receive any change notification.
Can anyone tell me why?

In source code of the class myclass.h:

@interface MyClass  : NSView{
        NSNumber *type;
}

-(NSNumber *)type;
-(void)setType:(NSNumber *)value;
...
@end

In source code of the class myclass.m:

@implementation MyClass

+ (void)initialize
{
   if (self == [MyClass class])
   {
       [NSObject exposeBinding:@"type"];
   }
}

-(NSNumber *)type {
        return type;
}

-(void)setType:(NSNumber *)value {
        type = value;
}:

-(void)setSelectedIndex:(NSNumber *)value {
        ...
        [self setValue:type forKey:@"type"];
}
@end

And in MyNSImageView.h:

@interface MyNSImageView : NSImageView {
        NSNumber *type;
}
-(NSNumber *)type {return type;}
-(void)setType:(NSNumber *)value {type = value;}
@end


Thank you all in advance.
Best regards,
livio. _______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to