<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to make Pop-Up Menus in Custom Quartz Composer Patches</title>
	<link>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/</link>
	<description>the floating point divide</description>
	<pubDate>Tue, 18 Nov 2008 15:13:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>

	<item>
 		<title>Comment on How to make Pop-Up Menus in Custom Quartz Composer Patches by: cwright</title>
		<link>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18624</link>
		<pubDate>Tue, 10 Jul 2007 16:29:33 +0000</pubDate>
		<guid>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18624</guid>
					<description>To generate menu items at runtime, you have to override QCIndexPort's initWithNode method.  it looks like this:

- (id)initWithNode:(id)fp8 arguments:(id)fp12;

Here's some code to do just that:

- (id)initWithNode:(id)fp8 arguments:(id)fp12
{
	NSMutableDictionary *config = [fp12 mutableCopy];
	NSMutableDictionary *attr;
	NSMutableArray *menu = [[NSMutableArray alloc] init];
	
	[config autorelease];
	[menu autorelease];
	
	attr = [config objectForKey:@&quot;attributes&quot;];
	
	[menu addObject:@&quot;foo&quot;];
	[menu addObject:@&quot;bar&quot;];
	[menu addObject:@&quot;baz&quot;];
	
	[attr setValue:menu forKey:@&quot;menu&quot;];
	
	return [super initWithNode:fp8 arguments:config];
}</description>
		<content:encoded><![CDATA[	<p>To generate menu items at runtime, you have to override QCIndexPort&#8217;s initWithNode method.  it looks like this:</p>
	<p>- (id)initWithNode:(id)fp8 arguments:(id)fp12;</p>
	<p>Here&#8217;s some code to do just that:</p>
	<p>- (id)initWithNode:(id)fp8 arguments:(id)fp12<br />
{<br />
	NSMutableDictionary *config = [fp12 mutableCopy];<br />
	NSMutableDictionary *attr;<br />
	NSMutableArray *menu = [[NSMutableArray alloc] init];</p>
	<p>	[config autorelease];<br />
	[menu autorelease];</p>
	<p>	attr = [config objectForKey:@&#8221;attributes&#8221;];</p>
	<p>	[menu addObject:@&#8221;foo&#8221;];<br />
	[menu addObject:@&#8221;bar&#8221;];<br />
	[menu addObject:@&#8221;baz&#8221;];</p>
	<p>	[attr setValue:menu forKey:@&#8221;menu&#8221;];</p>
	<p>	return [super initWithNode:fp8 arguments:config];<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How to make Pop-Up Menus in Custom Quartz Composer Patches by: cwright</title>
		<link>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18265</link>
		<pubDate>Thu, 05 Jul 2007 19:18:16 +0000</pubDate>
		<guid>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18265</guid>
					<description>Ahh, right you are.  I wasn't familiar with the Inspector window in QC :)  I thought that was the Interface Builder's Inspector guy.  My Bad :)</description>
		<content:encoded><![CDATA[	<p>Ahh, right you are.  I wasn&#8217;t familiar with the Inspector window in QC :)  I thought that was the Interface Builder&#8217;s Inspector guy.  My Bad :)
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How to make Pop-Up Menus in Custom Quartz Composer Patches by: smokris</title>
		<link>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18264</link>
		<pubDate>Thu, 05 Jul 2007 18:58:15 +0000</pubDate>
		<guid>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18264</guid>
					<description>cwright -

The screenshot in the top right corner *is* actually QC itself.

smokris</description>
		<content:encoded><![CDATA[	<p>cwright -</p>
	<p>The screenshot in the top right corner *is* actually QC itself.</p>
	<p>smokris
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on How to make Pop-Up Menus in Custom Quartz Composer Patches by: cwright</title>
		<link>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18263</link>
		<pubDate>Thu, 05 Jul 2007 18:55:24 +0000</pubDate>
		<guid>http://fdiv.net/2007/07/05/pop-up-menus-in-custom-quartz-composer-patches/#comment-18263</guid>
					<description>can you make and post a screen shot of it working within Quartz Composer itself?  Holy cow I'm so excited to give this a shot this weekend :)</description>
		<content:encoded><![CDATA[	<p>can you make and post a screen shot of it working within Quartz Composer itself?  Holy cow I&#8217;m so excited to give this a shot this weekend :)
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
