Re: Passing an object to a custom sheet
Re: Passing an object to a custom sheet
- Subject: Re: Passing an object to a custom sheet
- From: Joanna Carter <email@hidden>
- Date: Tue, 05 Apr 2011 09:40:03 +0100
Hi Torsten
> When I want to use an Object in the "onOkButtonPressed" function, how can I set this object in instance #2? [NSBundle loadNibNamed:@"Dialog" owner:self] does not return a pointer to the instance. In opposite, when "didEndSheet" is called, I'm back in instance#1 without any knowledge about the value of NSTextfield of instance#2.
The way I would usually handle this would be to add an extra -init method, which takes the object as a parameter, to the controller class, and hold the object in a private ivar in the controller.
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden