History name param within codebox


    Jul 17 2012 | 6:01 pm
    Obviously my attached example does not work, but it does work if you use the "history" object. What I am I doing wrong, or is this even possible within codebox?
    -Thanks :-)
    {
    	"boxes" : [ 		{
    			"box" : 			{
    				"maxclass" : "message",
    				"text" : "sum 0",
    				"patching_rect" : [ 44.0, 62.0, 43.0, 18.0 ],
    				"numinlets" : 2,
    				"fontsize" : 12.0,
    				"numoutlets" : 1,
    				"outlettype" : [ "" ],
    				"id" : "obj-5",
    				"fontname" : "Arial"
    			}
    
    		}
    , 		{
    			"box" : 			{
    				"maxclass" : "ezdac~",
    				"patching_rect" : [ 180.0, 107.0, 45.0, 45.0 ],
    				"numinlets" : 2,
    				"numoutlets" : 0,
    				"id" : "obj-3"
    			}
    
    		}
    , 		{
    			"box" : 			{
    				"maxclass" : "number~",
    				"patching_rect" : [ 44.0, 132.0, 122.0, 20.0 ],
    				"numinlets" : 2,
    				"sig" : 0.0,
    				"fontsize" : 12.0,
    				"numoutlets" : 2,
    				"outlettype" : [ "signal", "float" ],
    				"mode" : 2,
    				"id" : "obj-2",
    				"fontname" : "Arial"
    			}
    
    		}
    , 		{
    			"box" : 			{
    				"maxclass" : "newobj",
    				"text" : "gen~",
    				"patching_rect" : [ 44.0, 100.0, 115.0, 20.0 ],
    				"numinlets" : 1,
    				"fontsize" : 12.0,
    				"numoutlets" : 1,
    				"outlettype" : [ "signal" ],
    				"id" : "obj-1",
    				"fontname" : "Arial",
    				"patcher" : 				{
    					"fileversion" : 1,
    					"appversion" : 					{
    						"major" : 6,
    						"minor" : 0,
    						"revision" : 5
    					}
    ,
    					"rect" : [ 79.0, 119.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" : "",
    					"boxes" : [ 						{
    							"box" : 							{
    								"maxclass" : "codebox",
    								"patching_rect" : [ 96.0, 119.0, 200.0, 200.0 ],
    								"numinlets" : 1,
    								"fontsize" : 12.0,
    								"numoutlets" : 1,
    								"outlettype" : [ "" ],
    								"id" : "obj-5",
    								"fontname" : "Arial",
    								"code" : "History sum;rnout1=sum;rnsum=sum+1;"
    							}
    
    						}
    , 						{
    							"box" : 							{
    								"maxclass" : "newobj",
    								"text" : "in 1",
    								"patching_rect" : [ 50.0, 14.0, 30.0, 20.0 ],
    								"numinlets" : 0,
    								"fontsize" : 12.0,
    								"numoutlets" : 1,
    								"outlettype" : [ "" ],
    								"id" : "obj-1",
    								"fontname" : "Arial"
    							}
    
    						}
    , 						{
    							"box" : 							{
    								"maxclass" : "newobj",
    								"text" : "out 1",
    								"patching_rect" : [ 176.0, 418.0, 37.0, 20.0 ],
    								"numinlets" : 1,
    								"fontsize" : 12.0,
    								"numoutlets" : 0,
    								"id" : "obj-4",
    								"fontname" : "Arial"
    							}
    
    						}
     ],
    					"lines" : [ 						{
    							"patchline" : 							{
    								"source" : [ "obj-1", 0 ],
    								"destination" : [ "obj-5", 0 ],
    								"hidden" : 0,
    								"disabled" : 0
    							}
    
    						}
    , 						{
    							"patchline" : 							{
    								"source" : [ "obj-5", 0 ],
    								"destination" : [ "obj-4", 0 ],
    								"hidden" : 0,
    								"disabled" : 0
    							}
    
    						}
     ],
    					"dependency_cache" : [ 						{
    							"name" : "codebox.mxo",
    							"type" : "iLaX"
    						}
     ]
    				}
    
    			}
    
    		}
     ],
    	"lines" : [ 		{
    			"patchline" : 			{
    				"source" : [ "obj-1", 0 ],
    				"destination" : [ "obj-2", 0 ],
    				"hidden" : 0,
    				"disabled" : 0
    			}
    
    		}
    , 		{
    			"patchline" : 			{
    				"source" : [ "obj-5", 0 ],
    				"destination" : [ "obj-1", 0 ],
    				"hidden" : 0,
    				"disabled" : 0
    			}
    
    		}
     ],
    	"appversion" : 	{
    		"major" : 6,
    		"minor" : 0,
    		"revision" : 5
    	}
    
    }

    • Jul 17 2012 | 6:05 pm
      Sorry for all the code... how do you do the clipboard thingy?
    • Jul 18 2012 | 8:19 am
      Hi, this looks like a bug, and we're looking into it.
      To do the clipboard thing, select the objects in Max, and pick 'copy compressed' from the Edit menu.
    • Jul 18 2012 | 5:10 pm
      Thanks Graham!
    • Jul 25 2012 | 4:02 am
      This bug has been found & fixed for the next incremental update.
    • Jul 29 2012 | 8:45 pm
      That's awesome Graham, thanks!
      Do you guys send emails to us when these updates are available?
      I really enjoy your website btw... should keep me busy for a while :)