• 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
Re: are there any custom IB Palettes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: are there any custom IB Palettes?


  • Subject: Re: are there any custom IB Palettes?
  • From: Wade Tregaskis <email@hidden>
  • Date: Sat, 28 Feb 2004 17:49:15 +1100

Sorry for digging up an old topic, but I've finally gotten around to looking at this again, and am having trouble with it still.

I recently wrote an IB palette for a few custom NSView subclasses, and found it extremely difficult to do properly. In particular, one subclass would invoke authorisation functions as part of it's normal operation, which of course you don't want it doing in IB, but there's no apparent way to differentiate between an instance in IB and in the final app.

This is easy.

If you look in the IBApplicationAdditions.h header file in the InterfaceBuilder framework you will notice this IB protocol which the Application object in IB responds to

- (BOOL)isTestingInterface;

So if NSApp responds to selector isTestingInterface you are in Interface Builder, if isTestingInterface returns yes, you are testing the interface.

What exactly do you mean by 'NSApp'? NSApplication never responds to 'isTestingInterface', even when in IB, and it's not obvious from the InterfaceBuilder framework headers exactly what object is supposed to. I've fiddled around and probed various avenues without any success. So far as I can tell, nothing implements the 'IB' protocol as defined in InterfaceBuilder/IBApplicationAdditions.h.

Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >are there any custom IB Palettes? (From: ayyapu <email@hidden>)
 >Re: are there any custom IB Palettes? (From: Vince DeMarco <email@hidden>)

  • Prev by Date: Error messages
  • Next by Date: Re: are there any custom IB Palettes?
  • Previous by thread: Re: are there any custom IB Palettes?
  • Next by thread: Re: are there any custom IB Palettes?
  • Index(es):
    • Date
    • Thread