<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating an Action PopUp Button in Leopard</title>
	<atom:link href="http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/feed/" rel="self" type="application/rss+xml" />
	<link>http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/</link>
	<description>Home Grown in Austin</description>
	<lastBuildDate>Fri, 03 Sep 2010 01:34:23 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jeff Boulter</title>
		<link>http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/comment-page-1/#comment-315</link>
		<dc:creator>Jeff Boulter</dc:creator>
		<pubDate>Tue, 06 Apr 2010 03:13:20 +0000</pubDate>
		<guid isPermaLink="false">http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/#comment-315</guid>
		<description>Thanks for the tips. With this information I was able to figure out how to create this programmatically:

		toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];

		NSPopUpButton *button = [[[NSPopUpButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 38, 23) pullsDown:YES] autorelease];
		[button setBezelStyle:NSTexturedRoundedBezelStyle];
	
		NSImage *icon = [[[NSImage alloc] initWithContentsOfFile:@&quot;image.tif&quot;]] autorelease];
		[[button cell] setArrowPosition:NSPopUpArrowAtBottom];
		[button setPreferredEdge:NSMinYEdge];
		[button setTitle:@&quot;&quot;];

		[toolbarItem setPaletteLabel:@&quot;Foo&quot;];
		[toolbarItem setToolTip:@&quot;Foo Tip&quot;];
		[toolbarItem setLabel:@&quot;Foo Label&quot;];
		
		[toolbarItem setView:button];	
		[toolbarItem setEnabled:YES];
			
		NSMenu *submenu = [[[NSMenu alloc] init] autorelease];

		NSMenuItem * iconMenuItem = [[[NSMenuItem alloc] init] autorelease];
		
		[iconMenuItem setTitle:@&quot;&quot;];
		[iconMenuItem setImage:icon];
		
		NSMenuItem* menuItem1 = [[[NSMenuItem alloc] initWithTitle: @&quot;Bar&quot; action:@selector(doBar:)
													 keyEquivalent: @&quot;&quot;] autorelease];
		NSMenuItem* menuItem2 = [[[NSMenuItem alloc] initWithTitle: @&quot;Bar 2&quot; action:@selector(doBar2:)
													  keyEquivalent: @&quot;&quot;] autorelease];
	
		[submenu addItem: iconMenuItem];
		[submenu addItem: menuItem1];
		[submenu addItem: menuItem2];
		
		[button setMenu:submenu];</description>
		<content:encoded><![CDATA[<p>Thanks for the tips. With this information I was able to figure out how to create this programmatically:</p>
<p>		toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: itemIdentifier] autorelease];</p>
<p>		NSPopUpButton *button = [[[NSPopUpButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 38, 23) pullsDown:YES] autorelease];<br />
		[button setBezelStyle:NSTexturedRoundedBezelStyle];</p>
<p>		NSImage *icon = [[[NSImage alloc] initWithContentsOfFile:@&#8221;image.tif&#8221;]] autorelease];<br />
		[[button cell] setArrowPosition:NSPopUpArrowAtBottom];<br />
		[button setPreferredEdge:NSMinYEdge];<br />
		[button setTitle:@""];</p>
<p>		[toolbarItem setPaletteLabel:@"Foo"];<br />
		[toolbarItem setToolTip:@"Foo Tip"];<br />
		[toolbarItem setLabel:@"Foo Label"];</p>
<p>		[toolbarItem setView:button];<br />
		[toolbarItem setEnabled:YES];</p>
<p>		NSMenu *submenu = [[[NSMenu alloc] init] autorelease];</p>
<p>		NSMenuItem * iconMenuItem = [[[NSMenuItem alloc] init] autorelease];</p>
<p>		[iconMenuItem setTitle:@""];<br />
		[iconMenuItem setImage:icon];</p>
<p>		NSMenuItem* menuItem1 = [[[NSMenuItem alloc] initWithTitle: @&#8221;Bar&#8221; action:@selector(doBar:)<br />
													 keyEquivalent: @&#8221;"] autorelease];<br />
		NSMenuItem* menuItem2 = [[[NSMenuItem alloc] initWithTitle: @&#8221;Bar 2&#8243; action:@selector(doBar2:)<br />
													  keyEquivalent: @&#8221;"] autorelease];</p>
<p>		[submenu addItem: iconMenuItem];<br />
		[submenu addItem: menuItem1];<br />
		[submenu addItem: menuItem2];</p>
<p>		[button setMenu:submenu];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Warren</title>
		<link>http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/comment-page-1/#comment-270</link>
		<dc:creator>Warren</dc:creator>
		<pubDate>Tue, 27 Jan 2009 11:50:17 +0000</pubDate>
		<guid isPermaLink="false">http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/#comment-270</guid>
		<description>Finally, a simple solution that actually works.  Thanks a million, great article!  I wish Apple would make that action button a standard control.</description>
		<content:encoded><![CDATA[<p>Finally, a simple solution that actually works.  Thanks a million, great article!  I wish Apple would make that action button a standard control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/comment-page-1/#comment-268</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Wed, 14 Jan 2009 03:11:55 +0000</pubDate>
		<guid isPermaLink="false">http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/#comment-268</guid>
		<description>Thanks for the tutorial.

Works as described, except IB v3.1.2 doesn&#039;t allow me to disconnect the original menu (named OtherViews) from the popup button, and I had to connect the new menu by setting the connection in reverse from the menu to the button (referencing outlet).

I end up having multiple menu connections - seems to work, but doesn&#039;t feel right. Any suggestions? Thanks again. The original menu was driving me mad.</description>
		<content:encoded><![CDATA[<p>Thanks for the tutorial.</p>
<p>Works as described, except IB v3.1.2 doesn&#8217;t allow me to disconnect the original menu (named OtherViews) from the popup button, and I had to connect the new menu by setting the connection in reverse from the menu to the button (referencing outlet).</p>
<p>I end up having multiple menu connections &#8211; seems to work, but doesn&#8217;t feel right. Any suggestions? Thanks again. The original menu was driving me mad.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/comment-page-1/#comment-168</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Sun, 20 Jul 2008 06:27:37 +0000</pubDate>
		<guid isPermaLink="false">http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/#comment-168</guid>
		<description>I love you.</description>
		<content:encoded><![CDATA[<p>I love you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Callaway</title>
		<link>http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/comment-page-1/#comment-37</link>
		<dc:creator>Pete Callaway</dc:creator>
		<pubDate>Tue, 01 Apr 2008 08:43:07 +0000</pubDate>
		<guid isPermaLink="false">http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/#comment-37</guid>
		<description>A perfect solution. Thanks.</description>
		<content:encoded><![CDATA[<p>A perfect solution. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/comment-page-1/#comment-34</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Sat, 29 Mar 2008 20:18:53 +0000</pubDate>
		<guid isPermaLink="false">http://shanecrawford.org/2008/41/creating-an-action-popup-button-in-leopard/#comment-34</guid>
		<description>I followed every step easily and it worked first go. Perfect—thanks!</description>
		<content:encoded><![CDATA[<p>I followed every step easily and it worked first go. Perfect—thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
