On 16.08.2011, at 00:31, Dale Miller wrote:
> It looks like Apple's current answer is to programatically create the custom 
> elements. I find this interesting considering the roasting I took some time 
> back when I wrote in about a problem I was having programatically creating a 
> custom element. I remember a lot of dogmatic evangelism about always using 
> IB. Everyone was more concerned with converting the sinner than in finding 
> the problem, which, by the way, was a finger-check.

 You don't need to *create* them programmatically. All that's needed is 
dragging in a custom view, setting its custom class to your class.

 You may have to configure them programmatically, but if your custom class is 
similar enough to an existing class, you may get away without that. E.g. I 
wrote an NSButton subclass where you could specify the custom image to use for 
drawing the actual button body (which is different from the *content* image 
used) in its alternate title.

 Is it as pretty as having an integrated IBPlugin? No, but I need to get work 
done. I have a lot of custom UI, and most of it can be approximated by 
splitting it up into buttons and image views, with a few labels (of my own 
custom NSTextField subclass, so it can draw with shadow, bezel and vertically 
centered) in between.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

_______________________________________________

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