[TIP] Grabbing all methods from First Responder
[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