• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[TIP] Grabbing all methods from First Responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TIP] Grabbing all methods from First Responder


  • Subject: [TIP] Grabbing all methods from First Responder
  • From: Bill Bumgarner <email@hidden>
  • Date: Tue, 29 Jan 2002 09:11:02 -0500

I often find myself adding a slew of methods to First Responder and subsequently needing to copy/paste 'em into PBX to build the implementations in the various responder classes.

Copy and pasting from IB is inconveniently tedious.

Apple kindly provided a command line tool that can decompose NIB files-- nibtool. It defaults to outputting everything as UTF-16 character, but has options to output everything as UTF-8 (among others).

As such, grabbing all of the action methods in a NIB is as easy as:

nibtool -8 -x MainMenu.nib | grep Action
...
Action = "configurePBXSSHPassKeyPluginAction:";
Action = "unconfigurePBXSSHPassKeyPluginAction:";
Action = "configureSSHPassKeyLoginEnvironment:";
Action = "unconfigureSSHPassKeyLoginEnvironment:";
Action = "hide:";
Action = "unhideAllApplications:";
Action = "hideOtherApplications:";
Action = "terminate:";
...

The list will contain *all* action methods that are bound within the NIB. If you have overloaded the NIB with a boatload of instances and connections (not generally a good idea anyway), then there'll likely be a lot of extra stuff to wade through.

I haven't found an easier way, but there probably is one and this way is relatively convenient.

b.bum


  • Prev by Date: Problem with OpenGL MacTech code
  • Next by Date: Re: theoretical idea - would this work?
  • Previous by thread: RE: Problem with OpenGL MacTech code
  • Next by thread: How do I implement contextual-menu to NSTableView/NSOutlineView
  • Index(es):
    • Date
    • Thread