Hello,

I'm pretty new to the OSX and really new to Cocoa.

With the disclaimer aside....

For one my first learning projects I started to follow a tutorial that
has me making use of a nsarraycontroller in IB and using bindings to
bind an nsarraycontroller to a Employee class I created.

CLASS Employee
name
salary
-(void)giveRandomSalary

I first setup my nsarraycontroller to the Employee class and then bind
the name and salary values to an nstableview with two columns. I also
added two buttons to the window a insert and a delete button. These
are used to invoke the nsarraycontroller's add and delete methods to
add and remove Employee objects contained in nsarraycontroller.  This
all works just fine and makes sense.

What I want to do now is invoke a method on the object I have selected
in nstableview by clicking a third button labeled Random Salary which
will call the method giveRandomSalary that I created in my Employee
class. The job of this method is just to set the Salary to a random
value. My issue is how do I invoke the method for the Employee object
?  Hopefully I'm not to far off path with what I'm trying to do. Any
help would be great.

Thanks
Bob
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to