Re: IKImageBrowserView IKImageView subclasses not getting called
On Feb 3, 2010, at 7:27 PM, Charles Burnstagger wrote: I subclass IKImageBrowserView IKImageView overriding initWithFrame: drawRect: and sending the same messages to super in both cases. I've set them as the classes for the UI objects in my IB file, and as IBOutlets in my window's window controller subclass. But when I run the code, neither of my two subclasses ever get called. What gives? Is there anything else I need to do in my subclasses? If I set the IBOutlets in the contoller subclass and class types in IB back to IKImageBrowserView IKImageView, the code seems to do the same thing as when I use my subclasses. For objects that were saved in a NIB file -initWithFrame: is usually not what's called to recreate them (there are some exceptions that I don't remember off the top of my head). Since NIBs are essentially archives most of the views stored within them are recreated via -initWithCoder: As for the drawRect: override, it was my understanding that the IK*View objects didn't do any of their drawing in drawRect: but instead were done via CALayers. I could be misinformed on this point though. Ashley ___ 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
Re: IKImageBrowserView IKImageView subclasses not getting called
On Feb 15, 2010, at 7:18 AM, Ashley Clark wrote: For objects that were saved in a NIB file -initWithFrame: is usually not what's called to recreate them (there are some exceptions that I don't remember off the top of my head). Since NIBs are essentially archives most of the views stored within them are recreated via -initWithCoder: Right. Setup code for objects from nibs should usually go in -awakeFromNib. As for the drawRect: override, it was my understanding that the IK*View objects didn't do any of their drawing in drawRect: but instead were done via CALayers. I could be misinformed on this point though. Right again, basically, although I think they use direct OpenGL for drawing. This unfortunately makes it extremely difficult to customize the display of these views, since the OpenGL surface covers up any regular drawing. I tried pretty hard to extend the image-browser a few years ago and eventually gave up. —Jens ___ 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
Re: IKImageBrowserView IKImageView subclasses not getting called
SnowLeopard introduced a bunch of new public API to make customizing easier: On the view itself: - (void) setBackgroundLayer:(CALayer *) aLayer; - (void) setForegroundLayer:(CALayer *) aLayer; extern NSString * const IKImageBrowserGroupHeaderLayer; /* CALayer */ extern NSString * const IKImageBrowserGroupFooterLayer; /* CALayer */ on the browser cell: - (CALayer *) layerForType:(NSString *) type; -- Julien On Mon, Feb 15, 2010 at 5:42 PM, Jens Alfke j...@mooseyard.com wrote: On Feb 15, 2010, at 7:18 AM, Ashley Clark wrote: For objects that were saved in a NIB file -initWithFrame: is usually not what's called to recreate them (there are some exceptions that I don't remember off the top of my head). Since NIBs are essentially archives most of the views stored within them are recreated via -initWithCoder: Right. Setup code for objects from nibs should usually go in -awakeFromNib. As for the drawRect: override, it was my understanding that the IK*View objects didn't do any of their drawing in drawRect: but instead were done via CALayers. I could be misinformed on this point though. Right again, basically, although I think they use direct OpenGL for drawing. This unfortunately makes it extremely difficult to customize the display of these views, since the OpenGL surface covers up any regular drawing. I tried pretty hard to extend the image-browser a few years ago and eventually gave up. —Jens ___ 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/jjalon%40gmail.com This email sent to jja...@gmail.com ___ 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
Re: IKImageBrowserView IKImageView subclasses not getting called
And you have an example: http://devworld.apple.com/mac/library/samplecode/ImageBrowserViewAppearance/index.html -- Julien On Mon, Feb 15, 2010 at 5:42 PM, Jens Alfke j...@mooseyard.com wrote: On Feb 15, 2010, at 7:18 AM, Ashley Clark wrote: For objects that were saved in a NIB file -initWithFrame: is usually not what's called to recreate them (there are some exceptions that I don't remember off the top of my head). Since NIBs are essentially archives most of the views stored within them are recreated via -initWithCoder: Right. Setup code for objects from nibs should usually go in -awakeFromNib. As for the drawRect: override, it was my understanding that the IK*View objects didn't do any of their drawing in drawRect: but instead were done via CALayers. I could be misinformed on this point though. Right again, basically, although I think they use direct OpenGL for drawing. This unfortunately makes it extremely difficult to customize the display of these views, since the OpenGL surface covers up any regular drawing. I tried pretty hard to extend the image-browser a few years ago and eventually gave up. —Jens ___ 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/jjalon%40gmail.com This email sent to jja...@gmail.com ___ 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
IKImageBrowserView IKImageView subclasses not getting called
I subclass IKImageBrowserView IKImageView overriding initWithFrame: drawRect: and sending the same messages to super in both cases. I've set them as the classes for the UI objects in my IB file, and as IBOutlets in my window's window controller subclass. But when I run the code, neither of my two subclasses ever get called. What gives? Is there anything else I need to do in my subclasses? If I set the IBOutlets in the contoller subclass and class types in IB back to IKImageBrowserView IKImageView, the code seems to do the same thing as when I use my subclasses. Thanks, Chuck ___ 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