<?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: Obex class_new() difference between Max 4, 5 and Jitter</title>
		<atom:link href="http://cycling74.com/forums/topic/obex-class_new-difference-between-max-4-5-and-jitter/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/obex-class_new-difference-between-max-4-5-and-jitter/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 00:04:59 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/obex-class_new-difference-between-max-4-5-and-jitter/#post-39319</guid>
					<title><![CDATA[Obex class_new() difference between Max 4, 5 and Jitter]]></title>
					<link>http://cycling74.com/forums/topic/obex-class_new-difference-between-max-4-5-and-jitter/#post-39319</link>
					<pubDate>Sun, 17 Aug 2008 13:55:30 +0000</pubDate>
					<dc:creator>Thijs Koerselman</dc:creator>

					<description>
						<![CDATA[
						<p>For jitter objects, the conventional way is to use a name with underscores<br />
instead of dots in your c code. For example, in your jitter code, you call<br />
jit_class_new() with &#8220;foo_bar&#8221;, and in your max wrapper code you call<br />
jit_object_new(gensym(&#8220;foo_bar&#8221;), ..).</p>
<p>This appears to be an optional thing for Jitter objects, because if you call<br />
both jit_class_new() and jit_object_new() using &#8220;foo.bar&#8221; instead of<br />
&#8220;foo_bar&#8221;, the object will still work fine in Max.</p>
<p>I&#8217;m used to writing Jitter objects more than regular max obex objects, so I<br />
created an obex object and in my code I wrote class_new(&#8220;foo_bar&#8221;, &#8230;). Now<br />
the problem is that there appears to be a difference between Max 4 and 5 in<br />
this regard.</p>
<p>Max 4 will happily instantiate a correct working object, while Max 5 will<br />
give you a pink box without inlets or outlets and no error messages<br />
whatsoever.</p>
<p>I found that Max5 will only instantiate the object if you call class_new()<br />
with &#8220;foo.bar&#8221; instead of &#8220;foo_bar&#8221;, i.e. the same name as the object on<br />
disk / bundle executable.</p>
<p>While chasing this problem I found that Max4 appears to instantiate the obex<br />
object even if you call class_new(&#8220;some_invalid_name&#8221;, &#8230;). So I guess in<br />
Max4 this name is only stored in the object for possible identification and<br />
is not used for loading the bundle from disk.</p>
<p>This is a summary of my findings:</p>
<p>                              max4    max5<br />
jitter  &#8220;foo_bar&#8221;       ok         ok<br />
jitter  &#8220;foo.bar&#8221;        ok         ok<br />
obex &#8220;foo_bar&#8221;       ok         x<br />
obex &#8220;foo.bar&#8221;        ok         ok<br />
obex &#8220;something&#8221;   ok         x</p>
<p>I&#8217;ve only tested this on MacOS 10.5.4 with Max 4.6.3 and 5.0.4</p>
<p>It took me a very long time to figure out what the problem was. Especially<br />
since there are no error messages. The debugger made no sense to me either.</p>
<p>I now know how to get things working of course, but it would be nice if<br />
someone could give a little explanation for why this works like it does.<br />
We&#8217;re close to the release of the new sdk, so I guess this might be<br />
irrelevant soon, but I thought it might be worth reporting since it could<br />
possibly prevent people from making the same mistake.</p>
<p>Cheers,<br />
Thijs</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/obex-class_new-difference-between-max-4-5-and-jitter/#post-138262</guid>
					<title><![CDATA[Re: Obex class_new() difference between Max 4, 5 and Jitter]]></title>
					<link>http://cycling74.com/forums/topic/obex-class_new-difference-between-max-4-5-and-jitter/#post-138262</link>
					<pubDate>Tue, 19 Aug 2008 09:26:28 +0000</pubDate>
					<dc:creator>Jeremy Bernstein</dc:creator>

					<description>
						<![CDATA[
						<p>I just ran into this myself this morning. Will investigate. Thanks for the report.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

