rules and bug of function declared in codebox ?

Jun 28, 2012 at 9:33pm

rules and bug of function declared in codebox ?

Hello,

I’m really disappointed with the declaration and use of function inside gen.
as an exemple, using more than one time some function go to strange instance bug (maybe): SomeFunction_xxxx …. error…
some other don’t compile without any error message …. only a generic compile error in max window.

Some extra doc and known bug to help me ?

Benjamin.

#39894
Jun 28, 2012 at 9:37pm

If you could post a patch, that would be really helpful. Otherwise we have no idea what you’re doing. thanks!

#140657
Jun 29, 2012 at 9:49am

Hello,

I don’t want to let my code out, so i wrote an example:

{
	"boxes" : [ 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "gen~",
				"fontsize" : 12.0,
				"numinlets" : 1,
				"patching_rect" : [ 272.0, 150.0, 38.0, 20.0 ],
				"id" : "obj-1",
				"numoutlets" : 1,
				"fontname" : "Arial",
				"outlettype" : [ "signal" ],
				"patcher" : 				{
					"fileversion" : 1,
					"appversion" : 					{
						"major" : 6,
						"minor" : 0,
						"revision" : 5
					}
,
					"rect" : [ 50.0, 94.0, 600.0, 450.0 ],
					"bgcolor" : [ 0.9, 0.9, 0.9, 1.0 ],
					"bglocked" : 0,
					"openinpresentation" : 0,
					"default_fontsize" : 12.0,
					"default_fontface" : 0,
					"default_fontname" : "Arial",
					"gridonopen" : 0,
					"gridsize" : [ 15.0, 15.0 ],
					"gridsnaponopen" : 0,
					"statusbarvisible" : 2,
					"toolbarvisible" : 1,
					"boxanimatetime" : 200,
					"imprint" : 0,
					"enablehscroll" : 1,
					"enablevscroll" : 1,
					"devicewidth" : 0.0,
					"description" : "",
					"digest" : "",
					"tags" : "",
					"title" : "untitled",
					"boxes" : [ 						{
							"box" : 							{
								"maxclass" : "codebox",
								"fontsize" : 12.0,
								"numinlets" : 1,
								"patching_rect" : [ 120.0, 92.0, 311.0, 252.0 ],
								"id" : "obj-5",
								"numoutlets" : 1,
								"fontname" : "Arial",
								"outlettype" : [ "" ],
								"code" : "osc(zemax)rn{rntHistory pos;rntoutput = pos;rntpos = (pos + 1) % zemax;rntreturn output;rn}rnrnParam ParamZeMax(0.);rnrnout1 = osc(ParamZeMax)+osc(ParamZeMax+1);"
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "in 1",
								"fontsize" : 12.0,
								"numinlets" : 0,
								"patching_rect" : [ 50.0, 14.0, 30.0, 20.0 ],
								"id" : "obj-1",
								"numoutlets" : 1,
								"fontname" : "Arial",
								"outlettype" : [ "" ]
							}

						}
, 						{
							"box" : 							{
								"maxclass" : "newobj",
								"text" : "out 1",
								"fontsize" : 12.0,
								"numinlets" : 1,
								"patching_rect" : [ 176.0, 418.0, 37.0, 20.0 ],
								"id" : "obj-4",
								"numoutlets" : 0,
								"fontname" : "Arial"
							}

						}
 ],
					"lines" : [ 						{
							"patchline" : 							{
								"source" : [ "obj-5", 0 ],
								"destination" : [ "obj-4", 0 ],
								"hidden" : 0,
								"disabled" : 0
							}

						}
 ],
					"dependency_cache" : [ 						{
							"name" : "codebox.mxo",
							"type" : "iLaX"
						}
 ]
				}

			}

		}
 ],
	"appversion" : 	{
		"major" : 6,
		"minor" : 0,
		"revision" : 5
	}

}
#140658
Jun 29, 2012 at 3:19pm

Thanks for the example. There is no error in your code. We’ve been working very hard on improving Gen. It was a bug that has already been found and squashed. When the next release somes out, this will work. Feel free to message me privately if you want me to test with the real example. Also, if you have any questions about things, particularly due to sparse documentation, please ask away.

#140659

You must be logged in to reply to this topic.