<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Pain in the Nib</title>
	<atom:link href="http://www.red-sweater.com/blog/137/pain-in-the-nib/feed" rel="self" type="application/rss+xml" />
	<link>http://www.red-sweater.com/blog/137/pain-in-the-nib</link>
	<description>Mac &#38; Technology Writings by Daniel Jalkut</description>
	<pubDate>Fri,  8 Aug 2008 00:53:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-7496</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Fri, 16 Jun 2006 21:15:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-7496</guid>
		<description>Wow that's great! In that case, you guys should definitely complain more often :)</description>
		<content:encoded><![CDATA[<p>Wow that&#8217;s great! In that case, you guys should definitely complain more often :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Schwieb</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-7495</link>
		<dc:creator>Schwieb</dc:creator>
		<pubDate>Fri, 16 Jun 2006 20:53:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-7495</guid>
		<description>You can thank the Microsoft Ireland localization team for this partial feature add.  :)  I *begged* Apple on their behalf for a way to edit nibs in some scriptable fashion so that we don't have to launch IB just to resize a control.  Yep, it would preferably let us manipulate any and all properties of the items, but Apple didn't go that far.  Perhaps in Xcode 2.4 or whatever is next...</description>
		<content:encoded><![CDATA[<p>You can thank the Microsoft Ireland localization team for this partial feature add.  :)  I *begged* Apple on their behalf for a way to edit nibs in some scriptable fashion so that we don&#8217;t have to launch IB just to resize a control.  Yep, it would preferably let us manipulate any and all properties of the items, but Apple didn&#8217;t go that far.  Perhaps in Xcode 2.4 or whatever is next&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6358</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Mon, 05 Jun 2006 19:46:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6358</guid>
		<description>Wow - very interesting point, Jon.  I will have to play with that a bit, but you're right: the bundle should give you access to ensure that whatever accessor you wish was there ... is there!</description>
		<content:encoded><![CDATA[<p>Wow - very interesting point, Jon.  I will have to play with that a bit, but you&#8217;re right: the bundle should give you access to ensure that whatever accessor you wish was there &#8230; is there!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Hess</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6357</link>
		<dc:creator>Jon Hess</dc:creator>
		<pubDate>Mon, 05 Jun 2006 19:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6357</guid>
		<description>Daniel: Great write up.

There's a very subtle, yet powerful, aspect to this feature. In addition to the import and export actions, nibtool also supports a "--bundle pathToMyBundle" argument. When nibtool encounters this argument, it loads "pathToMyBundle" before loading the specified document. With objective-c categories, this really opens the door for things like customized layout validation.

Imagine a bundle that defined a category method on NSView like the following

/// Composed in comment window, YMMV.
@implementation NSView(GeometryValidation)
- (BOOL)isClippedBySuperview {
     return [self superview] &#38;&#38; NSIntersectsRect([self frame], [[self superview] bounds]);
}
@end

Now, with this simple input plist, you can easily construct a script to preform basic layout validation.
{
     NSView = (clippedBySuperview); 
}

I'm sure there are many more interesting combinations of the --export and --bundle arguments.</description>
		<content:encoded><![CDATA[<p>Daniel: Great write up.</p>
<p>There&#8217;s a very subtle, yet powerful, aspect to this feature. In addition to the import and export actions, nibtool also supports a &#8220;&#8211;bundle pathToMyBundle&#8221; argument. When nibtool encounters this argument, it loads &#8220;pathToMyBundle&#8221; before loading the specified document. With objective-c categories, this really opens the door for things like customized layout validation.</p>
<p>Imagine a bundle that defined a category method on NSView like the following</p>
<p>/// Composed in comment window, YMMV.<br />
@implementation NSView(GeometryValidation)<br />
- (BOOL)isClippedBySuperview {<br />
     return [self superview] &amp;&amp; NSIntersectsRect([self frame], [[self superview] bounds]);<br />
}<br />
@end</p>
<p>Now, with this simple input plist, you can easily construct a script to preform basic layout validation.<br />
{<br />
     NSView = (clippedBySuperview);<br />
}</p>
<p>I&#8217;m sure there are many more interesting combinations of the &#8211;export and &#8211;bundle arguments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay Samani</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6103</link>
		<dc:creator>Sanjay Samani</dc:creator>
		<pubDate>Tue, 30 May 2006 22:49:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6103</guid>
		<description>There seems to be growing concern in the blogosphere about the shortcomings of XCode and IB as compared to Cocoa.  I completely agree that the criticism is justified and whilst finding work arounds like this is fantastic, it doesn't get around the key issues, e.g., XCode's workspace is just not as configurable and polished as Project Builders was, IB has not developed over the last few years and greate features like Bindings are poorly supported by its graphical goodness.  I think most attendees at WWDC will be looking forward to big steps forward in Xcode and IB and are probably less concerned about new features in Cocoa (as opposed to big Cocoa bug fixes and improved documentation).</description>
		<content:encoded><![CDATA[<p>There seems to be growing concern in the blogosphere about the shortcomings of XCode and IB as compared to Cocoa.  I completely agree that the criticism is justified and whilst finding work arounds like this is fantastic, it doesn&#8217;t get around the key issues, e.g., XCode&#8217;s workspace is just not as configurable and polished as Project Builders was, IB has not developed over the last few years and greate features like Bindings are poorly supported by its graphical goodness.  I think most attendees at WWDC will be looking forward to big steps forward in Xcode and IB and are probably less concerned about new features in Cocoa (as opposed to big Cocoa bug fixes and improved documentation).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6045</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Mon, 29 May 2006 04:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6045</guid>
		<description>Cameron: Glad you liked it!  Thanks for the feedback.

Jonathan: Thanks I will have to keep your code in mind if I end up doing more elaborate tricks with plist-generation.  Mark Rowe pointed out to me that the entire plist construction line can be reduced to just this line if I use plistlib:

plist = plistlib.Plist(**{sys.argv[2]: [sys.argv[3]]})

I think that's a pretty awesome example of why I should start learning more about Python :)</description>
		<content:encoded><![CDATA[<p>Cameron: Glad you liked it!  Thanks for the feedback.</p>
<p>Jonathan: Thanks I will have to keep your code in mind if I end up doing more elaborate tricks with plist-generation.  Mark Rowe pointed out to me that the entire plist construction line can be reduced to just this line if I use plistlib:</p>
<p>plist = plistlib.Plist(**{sys.argv[2]: [sys.argv[3]]})</p>
<p>I think that&#8217;s a pretty awesome example of why I should start learning more about Python :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wight</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6041</link>
		<dc:creator>Jonathan Wight</dc:creator>
		<pubDate>Mon, 29 May 2006 03:33:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6041</guid>
		<description>Hey Daniel, you're probably fine with your code as-is but if you want construct a plist from python instead of hard coding it I have some code at http://svn.toxicsoftware.com/public/trunk/Python/Utilities/PropertyList.py that can read/write Apple XML format plists. Even easier you can just import plistlib (included with the system).</description>
		<content:encoded><![CDATA[<p>Hey Daniel, you&#8217;re probably fine with your code as-is but if you want construct a plist from python instead of hard coding it I have some code at <a href="http://svn.toxicsoftware.com/public/trunk/Python/Utilities/PropertyList.py" rel="nofollow">http://svn.toxicsoftware.com/public/trunk/Python/Utilities/PropertyList.py</a> that can read/write Apple XML format plists. Even easier you can just import plistlib (included with the system).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cameron Hayne</title>
		<link>http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6037</link>
		<dc:creator>Cameron Hayne</dc:creator>
		<pubDate>Mon, 29 May 2006 02:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/137/pain-in-the-nib#comment-6037</guid>
		<description>Excellent summary of the new capabilities. It is now much clearer what this tool can do - you saved me a bunch of time trying to figure it out myself. 
Thanks.</description>
		<content:encoded><![CDATA[<p>Excellent summary of the new capabilities. It is now much clearer what this tool can do - you saved me a bunch of time trying to figure it out myself.<br />
Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.255 seconds -->
