<?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: execute a function in an object</title>
		<atom:link href="http://cycling74.com/forums/topic/execute-a-function-in-an-object/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/execute-a-function-in-an-object/feed</link>
		<description></description>
		<pubDate>Thu, 20 Jun 2013 04:11:12 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/execute-a-function-in-an-object/#post-58765</guid>
					<title><![CDATA[execute a function in an object]]></title>
					<link>http://cycling74.com/forums/topic/execute-a-function-in-an-object/#post-58765</link>
					<pubDate>Mon, 05 Sep 2011 19:39:02 +0000</pubDate>
					<dc:creator>Steve Mensink</dc:creator>

					<description>
						<![CDATA[
						<p>Hi all,</p>
<p>I&#8217;m trying to execute that I defined in an object, but instead of executing the function and returning the function variable I get a jsobject 2341234 in my outlet.</p>
<p>This is a simple example of my code:</p>
<p><code><br />
var foo = new Object;<br />
foo.execute = execFunction;</code></p>
<p>outlet(0,foo.execute);</p>
<p>function execFunction(){<br />
   return 'bar';<br />
}<br /></p>
<p>So instead of seeing &#8216;bar&#8217; in the outlet I see e.g. &#8216;jsobject 23412341&#8242;</p>
<p>I&#8217;ve also tried:</p>
<p><code><br />
foo.execute = function(){<br />
   return 'bar';<br />
}<br /></code></p>
<p>But that also doesn&#8217;t work :(</p>
<p>What am i doing wrong, or is this syntax just not compatible with Max/Msp?</p>
<p>Thanks forward!</p>
<p>Steve</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/execute-a-function-in-an-object/#post-211234</guid>
					<title><![CDATA[Re: execute a function in an object]]></title>
					<link>http://cycling74.com/forums/topic/execute-a-function-in-an-object/#post-211234</link>
					<pubDate>Mon, 05 Sep 2011 21:41:17 +0000</pubDate>
					<dc:creator>Luke Hall</dc:creator>

					<description>
						<![CDATA[
						<p>At the moment <code>foo.execute</code> refers to a function which is why you are getting the jsobject being sent from the outlet. If you actually want to <em>call</em> the function so the outlet returns &#8220;bar&#8221; then you need to do <code>outlet(0,foo.execute());</code></p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

