Subclassing a button
Subclassing a button
- Subject: Subclassing a button
- From: Graeme Nattress <email@hidden>
- Date: Wed, 3 Jul 2002 16:02:11 -0400
*This message was transferred with a trial version of CommuniGate(tm) Pro*
I'm really new to Cocoa, so some help would be appreciated.
I'm writing a little application to hack renderman rib files. The
main code is in TCL and I've worked out how to get a Cocoa interface
to run my shell scripts. I'm working on an interface in Cocoa so as
to help me learn.
There are many options in the software and I want to present each on
a tabbed window. There are many points at which a user will want to
select a rib file, and I've written a little app in Cocoa that allows
a user to select a file when they press a button, putting the path
into a text box. I'd like to make a way that I can duplicate this
functionality throughout my app. What I've tried is to subclass
NSButton and add in my own code, and I've overroad the definition of
stringValue so that I can set the target of my button in IB to a text
field, and when I press the button, it puts a value in the right box,
which I take from the buttons's instance variable that I set up.
However, I'm not sure how to add in my code to let the user select a
file from disc.
I'm still trying to get my head around this new fangled cocoa object
oriented approach after many years of more procedural programming.
Any help appreciated.
Graeme
--
--
Graeme Nattress: Vice President R&D www.noitaminanimation.com
_______________________________________________
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.