Re: adding to my UI
Re: adding to my UI
- Subject: Re: adding to my UI
- From: Robert Tillyard <email@hidden>
- Date: Mon, 9 Feb 2004 02:50:19 +0000
On 9 Feb 2004, at 2:32 am, Laurent Daudelin wrote:
on 08/02/04 20:59, pmcurry at email@hidden wrote:
I'm working on small tutorial type projects trying to learn Cocoa and
Obj-C.
After I create my UI in InterfaceBuilder and start coding in XCode, I
discover I need to add a new target/action. I'll write the method to
act as my target and open up InterfaceBuilder. I can't connect the
widget to the target until I do a 'write files'. This causes me to go
thru a whole merge operation to get InterfaceBuilder to recognize the
target so I can connect it. I thought doing a 'read files' would work
but it doesn't.
Is there an easier way to do this? What am I doing wrong?
Add the new outlet to the header of your class. You can just duplicate
one
of the outlet there that starts with "IBOutlet". Save the modified
file.
At this point I normally double click my .nib to get Interface Builder
to come up then drag the .h file into the window with the Instances tab
and the file is re-read for you. The vie changes to "Classes" but just
click back on "Instances".
Then, go back to IB. Double-click your instance to switch from the
"Instances" to the "Classes" tab in your document window. Make sure
your
class is selected in the class browser. Then, from the "Classes" menu,
select "Read <your class>.h". That should do the trick.
-Laurent.
Regards, Rob.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.