<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: Bindto pattrstorage slot number?</title>
		<atom:link href="http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 09:12:19 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/#post-36346</guid>
					<title><![CDATA[Bindto pattrstorage slot number?]]></title>
					<link>http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/#post-36346</link>
					<pubDate>Fri, 14 Mar 2008 05:32:05 +0000</pubDate>
					<dc:creator>Adam Murray</dc:creator>

					<description>
						<![CDATA[
						<p>I am reworking a patch to separate the logic and the UI with the pattr system. So far it is working out really well.</p>
<p>I am controlling pattrstorage remotely from my UI patch via a pattrforward. That works fine. But I&#8217;m stuck on one detail: I have a pattrstorage hierarchy and the top-level pattrstorage will change the slot numbers of my lower-level pattrstorages. I need my UI objects to update to reflect the active slot numbers. The problem is I can&#8217;t seem to get the current slot number through the pattr system. For example, I can&#8217;t access anything about a pattrstorage object through a pattrhub. I guess this is because you can&#8217;t bindto a pattrstorage.</p>
<p>Are there any tricks to make this happen? Or am I going to have to either<br />
(A) introduce an additional pattr to store the slot number, and bindto that.<br />
or<br />
(B) Do some scripting with forward and receive objects to communicate the slot number back to my UI patch?</p>
<p>
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P message 39 50 14 196617 2;<br />
#P message 18 50 14 196617 1;<br />
#P message 86 37 14 196617 2;<br />
#P message 65 37 14 196617 1;<br />
#P message 65 64 49 196617 store $1;<br />
#N vpatcher -4 229 202 357;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P newex 24 61 86 196617 pattr @name var;<br />
#X prestore 1 0 0;<br />
#P objectname var;<br />
#P newex 25 34 133 196617 pattrstorage @name preset;<br />
#X client_rect 0 0 640 240;<br />
#X storage_rect 0 0 640 240;<br />
#P objectname preset;<br />
#P pop 1;<br />
#P newobj 136 64 39 196617 p logic;<br />
#P objectname logic;<br />
#N vpatcher 206 55 673 316;<br />
#P origin 24 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P message 329 104 71 196617 getvar::name;<br />
#P message 42 45 14 196617 2;<br />
#P message 21 45 14 196617 1;<br />
#P message 103 56 14 196617 2;<br />
#P message 82 56 14 196617 1;<br />
#P message 267 103 40 196617 getvar;<br />
#P newex 322 161 73 196617 print pattrhub;<br />
#P message 167 101 84 196617 getpreset::name;<br />
#P newex 175 137 157 196617 pattrhub @patcher parent::logic;<br />
#P message 81 121 49 196617 store $1;<br />
#P newex 67 179 168 196617 pattrforward parent::logic::preset;<br />
#P window linecount 3;<br />
#P comment 161 58 100 196617 can&#8217;t remotely access anything from pattrstorage?;<br />
#P window linecount 1;<br />
#P comment 64 209 274 196617 how do I get parent::logic::preset&#8217;s slot number over here?;<br />
#P connect 11 0 2 0;<br />
#P connect 10 0 2 0;<br />
#P connect 3 0 2 0;<br />
#P connect 8 0 3 0;<br />
#P connect 9 0 3 0;<br />
#P connect 12 0 4 0;<br />
#P connect 5 0 4 0;<br />
#P connect 7 0 4 0;<br />
#P connect 4 1 6 0;<br />
#P pop 1;<br />
#P newobj 135 36 24 196617 p ui;<br />
#P objectname control;<br />
#P newex 44 96 67 196617 pattrstorage;<br />
#X client_rect 23 598 663 838;<br />
#X storage_rect 0 0 640 240;<br />
#P objectname u914000009;<br />
#P connect 7 0 0 0;<br />
#P connect 6 0 0 0;<br />
#P connect 3 0 0 0;<br />
#P connect 5 0 3 0;<br />
#P connect 4 0 3 0;<br />
#P window clipboard copycount 8;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/#post-124637</guid>
					<title><![CDATA[Re: Bindto pattrstorage slot number?]]></title>
					<link>http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/#post-124637</link>
					<pubDate>Fri, 14 Mar 2008 19:26:52 +0000</pubDate>
					<dc:creator>Jeremy Bernstein</dc:creator>

					<description>
						<![CDATA[
						<p>You can bind to pattrstorage with a pattr object, or an autopattr object. The pattrhub object, however, doesn&#8217;t see pattrstorage objects. I would probably use pattrforward, the &#8216;getcurrent&#8217; message to pattrstorage, route and a send to get that information as necessary, but your needs may require the use of other object types.</p>
<p>jb</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/#post-124638</guid>
					<title><![CDATA[Re: Bindto pattrstorage slot number?]]></title>
					<link>http://cycling74.com/forums/topic/bindto-pattrstorage-slot-number/#post-124638</link>
					<pubDate>Sat, 15 Mar 2008 00:49:32 +0000</pubDate>
					<dc:creator>Adam Murray</dc:creator>

					<description>
						<![CDATA[
						<p>Quote: Jeremy Bernstein wrote on Fri, 14 March 2008 12:26<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
> You can bind to pattrstorage with a pattr object</p>
<p>Yes, although when I interact with the pattrstorage I see   <br />
&#8220;warning: method getname called on invalid object&#8221; in the max window. Seems harmless? </p>
<p>I&#8217;d prefer to use pattrs purely for state management and not communication&#8230; </p>
<p>
> I would probably use pattrforward, the &#8216;getcurrent&#8217; message to pattrstorage, route and a send to get that information as necessary, but your needs may require the use of other object types.</p>
<p>Sounds good. Actually [route recall] -> [send] should work fine for me. Usually I avoid send/receive but it seems like the best option here (at least until a certain oo library comes out).</p>
<p>Thanks for the response.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

