FROM : Daniel Todd Currie
DATE : Sat Oct 16 02:31:25 2004
You may need to do this one yourself. If you don't mind having the
stepper in a separate cell from the text cell, there is an
NSStepperCell class that would give you easy stepper functionality and
perhaps just use an NSFormatter to accomplish the date formatting in an
adjacent text cell.
If you really need both parts in a single cell, you could write your
own subclass of NSCell that would include an NSStepperCell and one or
three NSTextFieldCells. I recommend looking at the ImageAndTextCell
class included in "/Developer/Examples/AppKit/DragNDropOutlineView/".
This may be a big step for a fresh Cocoa programmer, so if you have any
trouble feel free to get back to me.
-- DTC
On 2004 Oct 16, at 07:01, Daniel Morrow wrote:
> Dear cocoa list,
>
> I'm new to the Cocoa world, and so far am having a great time learning
> it and think it's pretty cool.
>
> However, I just hit a big stumbling block.
>
> My background is Carbon, and as such, I've been used to having a date
> control, like what you can see in System Preferences. Basically, 3
> text fields + an NSStepper on the end. I guess I should've researched
> whether it actually existed in Cocoa, but I just assumed that this was
> a basic control, and that it probably is in there.
>
> But here's the thing - I really, really need it. And I want to put it
> in an NSCell.
>
> See, I'm creating a window that has a list of choices. Each choice is
> prefixed with a label. There are 3 choice types. One is normal text
> field to type into. Another is a popup menu. The third choice is a
> date.
>
> Might look something like this:
>
> Some text: ________________
> Some popup: Popup choice 1
> Some date: 10 / 15 / 2004
>
> I figured out how to put the first two choices into an NSTableView,
> thanks to recent advice offered on this list. But I forgot about the
> date part. I'd really like to use a date control, as this
> functionality matches what I'm doing in other apps my company makes.
>
> So, assuming this control doesn't exist in Cocoa, I have two questions:
>
> 1) How can I create something like this from scratch (or does this
> exist already) and embed it into an NSCell?
>
> 2) How hard is it to add a Carbon control into a Cocoa window? And in
> this case, an NSCell? Is it even feasible?
>
> Thanks in advance for any help.
>
> -Dan.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>
>
DATE : Sat Oct 16 02:31:25 2004
You may need to do this one yourself. If you don't mind having the
stepper in a separate cell from the text cell, there is an
NSStepperCell class that would give you easy stepper functionality and
perhaps just use an NSFormatter to accomplish the date formatting in an
adjacent text cell.
If you really need both parts in a single cell, you could write your
own subclass of NSCell that would include an NSStepperCell and one or
three NSTextFieldCells. I recommend looking at the ImageAndTextCell
class included in "/Developer/Examples/AppKit/DragNDropOutlineView/".
This may be a big step for a fresh Cocoa programmer, so if you have any
trouble feel free to get back to me.
-- DTC
On 2004 Oct 16, at 07:01, Daniel Morrow wrote:
> Dear cocoa list,
>
> I'm new to the Cocoa world, and so far am having a great time learning
> it and think it's pretty cool.
>
> However, I just hit a big stumbling block.
>
> My background is Carbon, and as such, I've been used to having a date
> control, like what you can see in System Preferences. Basically, 3
> text fields + an NSStepper on the end. I guess I should've researched
> whether it actually existed in Cocoa, but I just assumed that this was
> a basic control, and that it probably is in there.
>
> But here's the thing - I really, really need it. And I want to put it
> in an NSCell.
>
> See, I'm creating a window that has a list of choices. Each choice is
> prefixed with a label. There are 3 choice types. One is normal text
> field to type into. Another is a popup menu. The third choice is a
> date.
>
> Might look something like this:
>
> Some text: ________________
> Some popup: Popup choice 1
> Some date: 10 / 15 / 2004
>
> I figured out how to put the first two choices into an NSTableView,
> thanks to recent advice offered on this list. But I forgot about the
> date part. I'd really like to use a date control, as this
> functionality matches what I'm doing in other apps my company makes.
>
> So, assuming this control doesn't exist in Cocoa, I have two questions:
>
> 1) How can I create something like this from scratch (or does this
> exist already) and embed it into an NSCell?
>
> 2) How hard is it to add a Carbon control into a Cocoa window? And in
> this case, an NSCell? Is it even feasible?
>
> Thanks in advance for any help.
>
> -Dan.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>
>
| Related mails | Author | Date |
|---|---|---|
| Daniel Morrow | Oct 16, 00:01 | |
| Jacob Lukas | Oct 16, 00:11 | |
| Daniel Todd Currie | Oct 16, 02:31 |






Cocoa mail archive

