objective c - Interface Builder doesn't show IBActions -
the problem
i have class (appcontroller
) 2 outlets , 2 actions.
2 outlets picked interface builder , connected fine.
2 actions, though, not present in hud window appearing when ctrl+clicking appcontroller object in interface builder, nor show in library->classes->appcontroller->actions.
appcontroller.h
#import <cocoa/cocoa.h> @interface appcontroller : nsobject { iboutlet nswindow *newdownloadsheet; iboutlet nsbox *downloadsbox; nsstring *sourcefileurl; nsstring *destinationfilename; nsmutablearray *downloads; } - (ibaction)newdocument; // new download - respond file->new, delegates shownewdownloadsheet: - (ibaction)shownewdownloadsheet (id)sender; @end
in .m file defined (although afaik interface builder doesn't @ .m files). also, code compiles fine (without warnings) , 'run', can't because can't connect ibactions.
system information
mac os x 10.6 – yes, know it's old. computer too, can't upgrade.
xcode 3.2.6
interface builder 3.2.6
why not duplicate
i find 2 other questions on over same problem, none of answers worked me.
- why doesn't ib see ibaction? answers suggest
- reload relevant class file manually (file->read class file...). tried, didn't work.
- add
...: (id)sender;
. can see, 1 of actions has this, 1 doesn't, yet neither shows up. - set file's owner correctly. isn't relevant problem since don't try connect file's owner object, separately added object identity correctly set appcontroller. plus outlets do show up.
- ibaction doesn't show in interface builder answer same 1.2.
- (ibaction)shownewdownloadsheet (id)sender;
incorrect, should be
- (ibaction)shownewdownloadsheet: (id)sender;
notice missing ":".
Comments
Post a Comment