Skip navigation.
 
mlRe: (no subject)
FROM : Mike Ferris
DATE : Sun Dec 29 19:37:27 2002

Don't know why you're having trouble with #0...

For #1, this is fairly easy.  Set an NSPopUpButtonCell as the dataCell
of the NSTableColumn you want the popup in.  For your dataSource, the
objectValue for that column should be an NSNumber that is the selected
item index for the popup.

For #2, you can create controls programmatically.  The typical
constructor for a control takes a frame rectangle as its argument.  You
then need to add the control into a view hierarchy using addSubview().

Mike


Begin forwarded message:

> From: Niko Matsakis <<email_removed>>
> Date: Sat Dec 28, 2002  1:15:47 PM US/Pacific
> To: <email_removed>
> Subject: (no subject)
>
> Since my previous question was so quickly answered, let me ask for
> some help
> in approaching my next project.  I really have three questions
> concerning
> Cocoa Java.
>
> 0. I have an NSTabView.  I call tabview.selectNextTabViewItem() or
> something
> like that and nothing happens.  Am I missing something?  I expect the
> next
> tab to appear.  This is with 10.1, by the way, as I have not yet been
> able to
> upgrade.
>
> 1. Is there a way to create a table with different types of cells,
> such as
> PopUpButtons?
>
> 2. I want to have an window to allow me to edit some of my data files
> but the
> exact fields in the file are not known until runtime.  Basically, it's
> like
> a database where the user can select the type of fields etc.  How does
> one
> go about dynamically generating widgets in a window?  The only thing I
> know
> how to do dynamically is a datasource for a table, and I think I saw
> methods
> for changing the number of rows etc.
>
> To tie 1 and 2 together: one interface I was thinking for adding
> entries to the
> database is to have a large table, but I'd like some of the columns to
> be
> popupbuttons to allow selection from only a limited set of options.
>
>
> thanks,
> niko
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.

_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
ml(no subject) Niko Matsakis Dec 28, 22:15
mlRe: (no subject) Mike Ferris Dec 29, 19:37
ml(no subject) Bruce Veazie Jan 2, 01:45