Re: Global Access Controls ?
Re: Global Access Controls ?
- Subject: Re: Global Access Controls ?
- From: Greg Hulands <email@hidden>
- Date: Fri, 25 Apr 2003 10:33:15 +1000
Another way to go about it so that the coupling of the modules is less
is to use notifications. So MyClass could listen for
ChangeTheDamnTextField notification and get the notification object
which could be the string to set it to. Then any class can post the
notification and set the string value of the text field.
Greg
On Friday, April 25, 2003, at 10:06 AM, Chad Eckles wrote:
Hello I have a control that i want to define only onece and i want to
be
able to use it in other classes without having to redefine it over an
over
an over again how can i do this ?
E.g
I have MyClass with a Defined NSTextField and in MyClass2 i want to be
able
to access that NSTextField with out having to redefine it ?
/* MyClass */
#import <Cocoa/Cocoa.h>
@interface MyClass : NSObject
{
IBOutlet NSTextField *txtName;
}
@end
/* MyClass2 */
#import <Cocoa/Cocoa.h>
@interface MyClass2 : NSObject
{
}
-(void)awakeFromNib
{
[txtName setStringValue:@"Helllo"];
}
@end
_______________________________________________
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.
_______________________________________________
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.