Skip navigation.
 
mlRe: [Leopard] Interface Builder - Subclassing
FROM : Chris Hanson
DATE : Sun Nov 04 02:10:47 2007

On Nov 2, 2007, at 1:34 PM, Tommy Nordgren wrote:

>     According to info during Leopard tech Talks, early 2007, Stockholm, 
> Sweden,
> Interface Builder 3 won't have code generation. Create your class in 
> Xcode, and then tell interface builder
> to parse the header file.


While this is the straightforward workflow, Interface Builder 3 does 
still support generating classes and code -- more flexibly than 
Interface Builder 2, too!

You can drag an object out of the Library window and into your IB 
document or an IB editor window, and then Get Info on it and change 
its class to anything you want.  There, you have a subclass.  You can 
generate a file for this class by choosing "Write Class Files..." from 
the File menu while in the Identity Inspector for that object.

Or you can simply select an outlet or action that you've added in the 
Identity Inspector, use the Copy command, and then go to the class's 
header file and choose Paste.  That will put a declaration for that 
outlet or action into the header.

Note that you can generate not just stub Objective-C code and headers, 
but also Python and Ruby code for PyObjC and RubyCocoa, respectively!

  -- Chris

Related mailsAuthorDate
ml[Leopard] Interface Builder - Subclassing Rick Langschultz Nov 2, 21:13
mlRe: [Leopard] Interface Builder - Subclassing Shawn Erickson Nov 2, 21:31
mlRe: [Leopard] Interface Builder - Subclassing Scott Anguish Nov 2, 21:34
mlRe: [Leopard] Interface Builder - Subclassing Tommy Nordgren Nov 2, 21:34
mlRe: [Leopard] Interface Builder - Subclassing Rick Langschultz Nov 3, 00:08
mlRe: [Leopard] Interface Builder - Subclassing Chris Hanson Nov 4, 02:10
mlRe: [Leopard] Interface Builder - Subclassing Eric Celeste Nov 4, 02:23
mlRe: [Leopard] Interface Builder - Subclassing Eric Celeste Nov 4, 02:45
mlRe: [Leopard] Interface Builder - Subclassing Chris Hanson Nov 4, 02:53
mlRe: [Leopard] Interface Builder - Subclassing Rick Langschultz Nov 4, 05:01