Re: Subclassing
Quote from Forum Archives on February 22, 2010, 12:19 amPosted by: artlythere <artlythere@...>
Found it , didn't see NSCell up there, thought it would be a
NSControl...under NSView.What's the best way to add outlets/destionations/actions/methods to
pre-existing classes? I am worried that my interim work will get
written over if IB or XCode re-generates the files when you do such
by the IB interface?On Feb 18, 2010, at 5:23 PM, Ross Tulloch wrote:
>
> It's just the Interface Builder UI getting in your way.
>
> 1) Click your "nib" document window. Probably called something like
> "MainMenu.xib - English".
> 2) Go to the "View" menu and select "as List".
> 3) Use the twist down arrows to navigate to your slider. If you use
> the twist down on your slider you'll see the NSSliderCell inside
> it. Click it.
> 4) In the Inspector window, you can type in the name of your
> NSSliderCell subclass in the "Identity Inspector's" "Class" field
> (Command-6).
>
> That'll do it. Using Interface Builder in "as List" mode is always
> the way to go (IMHO).
>
>
> R.
>
>> From: Robert Covington <[email protected]>
>> Date: 8 February 2010 3:38:33 PM
>> To: [email protected]
>> Subject: Subclassing
>>
>>
>> I am trying to subclass NSSlider, then NSSliderCell so I can
>> create my own slider.
>>
>> However, while one can subclass NSSliderCell, that doesn't show up
>> in the Custom Classes tab of IB's Inspector, only a subclass of
>> NSSlider does.
>>
>> So I am confused how to go about this, when it appears you have to
>> subclass NSSlider to use NSSliderCell...(where you override
>> drawKnob and others)
>>
>> I can substantiate the subclass of NSSlider, but not apparently
>> the one for NSSliderCell.
>>
>> r
>> c
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
Posted by: artlythere <artlythere@...>
NSControl...under NSView.
What's the best way to add outlets/destionations/actions/methods to
pre-existing classes? I am worried that my interim work will get
written over if IB or XCode re-generates the files when you do such
by the IB interface?
On Feb 18, 2010, at 5:23 PM, Ross Tulloch wrote:
>
> It's just the Interface Builder UI getting in your way.
>
> 1) Click your "nib" document window. Probably called something like
> "MainMenu.xib - English".
> 2) Go to the "View" menu and select "as List".
> 3) Use the twist down arrows to navigate to your slider. If you use
> the twist down on your slider you'll see the NSSliderCell inside
> it. Click it.
> 4) In the Inspector window, you can type in the name of your
> NSSliderCell subclass in the "Identity Inspector's" "Class" field
> (Command-6).
>
> That'll do it. Using Interface Builder in "as List" mode is always
> the way to go (IMHO).
>
>
> R.
>
>> From: Robert Covington <[email protected]>
>> Date: 8 February 2010 3:38:33 PM
>> To: [email protected]
>> Subject: Subclassing
>>
>>
>> I am trying to subclass NSSlider, then NSSliderCell so I can
>> create my own slider.
>>
>> However, while one can subclass NSSliderCell, that doesn't show up
>> in the Custom Classes tab of IB's Inspector, only a subclass of
>> NSSlider does.
>>
>> So I am confused how to go about this, when it appears you have to
>> subclass NSSlider to use NSSliderCell...(where you override
>> drawKnob and others)
>>
>> I can substantiate the subclass of NSSlider, but not apparently
>> the one for NSSliderCell.
>>
>> r
>> c
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>