Replicate custom view in code
Replicate custom view in code
- Subject: Replicate custom view in code
- From: "Craig Radnovich" <email@hidden>
- Date: Tue, 21 Feb 2006 13:57:26 -0800
Hello all,
What's the best way to replicate a view designed in Interface Builder?
I am converting an old work-related C command line program to Cocoa
for a beginning project. The program takes 1 - 5 files as input and
synthesizes them into an output file. Besides the file name, each
input needs a float value to go with it. I made a custom view in
Interface Builder that has a button for an "Open File" panel, a text
field for the filename, and a text field and slider for determining
the float. Right now, the program works but can only accept the one
input file. I'd like to implement something like e.g. the + and -
buttons in the Mail.app Rules preference. What's the best approach
for duplicating this view for adding more files when required?
Everytime I start reading documentation, I find something new that
seems promising, but not quite right:
- Subclass NSView and conform to NSCopying protocol? (Doesn't keep all
the attributes set in IB)
- Making a Nib with just that view and instantiating a new one?
- Subclass NSView and override initWithFrame? (IB already set up this
information the way I want it, without requiring this.)
- Putting the view in a one-column NSTableView? (Still have to
duplicate though.)
- Putting the controls (NSButton, NSTextField, etc.) in separate
columns in an NSTableView?
Please point me to T right FM for me to R.
Thanks in advance,
Craig
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden