objective c - How to access objects from different classes in Cocoa Programming -
i have nstextfield subclass (called "txtfield1" , used custom class text field in interface builder) , able access nscombobox object present in interface builder class.
this code: txtfield1.h:
#import <cocoa/cocoa.h> @interface txtfield1 : nstextfield @end
txtfield.m:
#import "txtfield1.h" @implementation txtfield1 -(void)mousedown:(nsevent *)theevent { here able write like: [combobox sethidden:yes]; } @end
i able set access combobox sethidden property, in mousedown event. can please tell me how that? have tried different solutions found on internet didn't obtain @ all! appreciated.
here lot of ways, , answers here, :
update label through button different view
xcode - update viewcontroller label text different view
set label on view stored nsdate
edit:
-(void)mousedown:(nsevent *)theevent { here able write like: [combobox sethidden:yes]; /* use shared instance of combobox here , make hidden. also, can use binding make hidden */ }
Comments
Post a Comment