开发者

Can't get a simple toolbar functioning!

开发者 https://www.devze.com 2023-03-10 03:23 出处:网络
Extreme Objective-C/Cocoa noob. Trying to follow Apple-eze about how to create a toolbar via interface builder but it\'s not working.(XCode4)

Extreme Objective-C/Cocoa noob.

Trying to follow Apple-eze about how to create a toolbar via interface builder but it's not working. (XCode4)

Tossed the bar into the window in IB, arranged the possibles and the default set of items. I set the images for the 'imag开发者_开发百科e toolbar items', labels, palette labels, tags, priorities. In XCode under identifier it says 'Auto-generated'. Checked 'Autovalidates'.

Created a class. Added the IBAction and that's where understanding fails. Apple's "Creating a Toolbar in Interface Builder" document winds up with a short "Setting the Target, Action, and Toolbar delegate" section where nothing jibes. My action appears nowhere in "Received Actions". The example code I've seen does a lot of this programatically.


  • Is the class that handles the toolbar action declared as the nib file's owner?
  • If not, are the methods in a class in the Responder chain? (probably not, but worth asking)
  • Have you managed to set a delegate for the toolbar?
0

精彩评论

暂无评论...
验证码 换一张
取 消