[Solved] Custom NSViews

2012-07-07 Thread William Squires
Thanks to Graham Cox, I can now finish this part of my 'simple' project… which grew and grew! :) ___ 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 coc

Re: Custom NSViews

2012-07-07 Thread William Squires
MacOS X (10.6 base SDK) On Jul 6, 2012, at 7:13 PM, Alex Zavatone wrote: > iOS or Mac OS? > > On Jul 6, 2012, at 7:55 PM, William Squires wrote: > >> Okay, I've got my custom NSView subclass to draw my Shape objects (or >> subclasses thereof). Each Shape inherits or overrides: >> >> -(BOOL)sh

Re: Custom NSViews

2012-07-06 Thread Jens Alfke
On Jul 6, 2012, at 4:55 PM, William Squires wrote: > How do I get my ShapeView class (the custom NSView subclass) to have the > necessary code/declarations so that IB can see that it can originate an > action, just like an NSButton or other control (i.e. Ctrl-drag from the > control to the act

Re: Custom NSViews

2012-07-06 Thread Alex Zavatone
iOS or Mac OS? On Jul 6, 2012, at 7:55 PM, William Squires wrote: > Okay, I've got my custom NSView subclass to draw my Shape objects (or > subclasses thereof). Each Shape inherits or overrides: > > -(BOOL)shapeContainsPoint:(CGPoint)thePoint; > > Now, I want to detect clicks within the view

Custom NSViews

2012-07-06 Thread William Squires
Okay, I've got my custom NSView subclass to draw my Shape objects (or subclasses thereof). Each Shape inherits or overrides: -(BOOL)shapeContainsPoint:(CGPoint)thePoint; Now, I want to detect clicks within the view and iterate over all the objects the view is responsible for, and send them

Re: custom NSViews and subviews - creating in IB

2009-05-11 Thread Erik Buck
Do you have a question ? Why don't you just create a subview with various controls in IB. Then, in code, make a copy of that object and in turn make modifications to some of the objects in that view. For example, set a text field to a value. Then, add it to a super view. You seem to kno

Re: custom NSViews and subviews - creating in IB

2009-05-11 Thread Kevin Cathey
Hi Jack, Your best bet is probably to create a new nib file that contains a top- level view which is your "subview". Then, have outlets on the File's Owner that connect to your various controls like the text field (or just use bindings). In your code, then you would instantiate this nib as

custom NSViews and subviews - creating in IB

2009-05-11 Thread Jack Carbaugh
I'm not sure if this is possible, but here goes: I would like to "create" a subview with various controls in IB. Then, in code, make a copy of that object and in turn make modifications to some of the objects in that view. For example, set a text field to a value. Then, i'd like to add it