Skip navigation.
 
mlRe: Conditionally modifying NIBs?
FROM : Mike Fischer
DATE : Sun May 18 15:48:48 2008

Am 18.05.2008 um 11:14 schrieb Uli Kusterer:

> Am 14.05.2008 um 19:37 schrieb Mike Fischer:

>> Given the recent/ongoing discussion about bypassing Interface 
>> Builder I have one question/issue for which IB does not seem to 
>> provide any solution. Interface Builder and NIBs are nice and have 
>> many advantages but I am missing a way to build different versions 
>> of nib files depending on Project targets/settings. I'm wondering 
>> how others handle this?

>
>
> I generally split up the NIB into several NIBs. That way, I can 
> load the master NIB containing the window, and then load the sub-
> NIBs using NSViewController depending on which version of the app 
> is built.


Thanks! That is basically the advice I got from Jon Hess and David 
Wilson. It transfers some of the burden to runtime but I guess this 
is generally the best way to get this done. It also seems to have 
other advantages like less complex nibs and better support for 
version control (svn).


> I also have some view classes not unlike Javas GridBag and similar 
> that arrange their subviews and, when used as a window's content 
> view, can resize the window to fit their contents. Comes in very 
> handy for all sorts of dynamic view arrangements, including using 
> bindings to show/hide non-applicable parts and having the window 
> magically re-layout in response to that. Though in that case I 
> often just embed the views in an NSView that have to be shown/
> hidden together, without loading them from separate NIBs.


Yes, I can see how that would help. I guess I'll be keeping that in 
mind when constructing and adding to my personal library of reusable 
classes.


Mike
--
Mike Fischer        Softwareentwicklung, EDV-Beratung
                                    Schulung, Vertrieb
Web: <http://homepage.mac.com/mike_fischer/index.html>
Note:                I read this list in digest mode!
          Send me a private copy for faster responses.

Related mailsAuthorDate
mlConditionally modifying NIBs? Mike Fischer May 14, 19:37
mlRe: Conditionally modifying NIBs? David Wilson May 14, 20:11
mlRe: Conditionally modifying NIBs? Mike Fischer May 14, 20:32
mlRe: Conditionally modifying NIBs? Hamish Allan May 15, 00:07
mlRe: Conditionally modifying NIBs? Mike Fischer May 15, 00:25
mlRe: Conditionally modifying NIBs? Hamish Allan May 15, 01:10
mlRe: Conditionally modifying NIBs? Jonathan Hess May 15, 02:20
mlRe: Conditionally modifying NIBs? Mike Fischer May 15, 13:25
mlRe: Conditionally modifying NIBs? Mike Fischer May 15, 13:26
mlRe: Conditionally modifying NIBs? Jonathan Hess May 15, 22:36
mlRe: Conditionally modifying NIBs? Uli Kusterer May 18, 11:14
mlRe: Conditionally modifying NIBs? Mike Fischer May 18, 15:48