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

setting label text in class

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

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -