[javascript-dev] Re: Re: javascript + Pattr question - storing multiple values of mixed types (string/float)
Emmanuel Jourdan
c74-mailinglists at e--j.com
Fri Dec 7 14:49:40 MST 2007
- Previous message: [javascript-dev] Re: Re: javascript + Pattr question - storing multiple values of mixed types (string/float)
- Next message: [javascript-dev] Re: Re: Re: javascript + Pattr question - storing multiple values of mixed types (string/float)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7 déc. 07, at 21:56, vade wrote:
> which clearly shows us overwriting our array indices with new
> values (v[0] does not contain "list" it contains "l") This seems
> obvious now, but what/where/why is the clientwindow/storagewindow
> getting its display from? Are we expanding the array somehow?
>
> So I suppose we have to use multidimensional arrays, but I cannot
> seem to get that to work either
Silly me;-) setvalueof() receive an "array" (it's not exactly an array
but) as argument so you just need to go over the each item:
function setvalueof()
{
var index = 0;
post("recalling pattr state");
post();
// set our values
mode = arguments[index++];
minval = arguments[index++];
maxval = arguments[index++];
currentval = arguments[index++];
currenttitle = arguments[index++];
listsize = arguments[index++];
listmode = arguments[index++];
// menuitems = arguments[index++];
//resize();
debug();
}
> BTW - I tried this with notifyclients in various places and did not
> see a difference. Why does notifyclients care what function its in,
> as long as it is being called when values are changing and pattr
> needs to be informed?
notifyclients() is the method that you need to call when you want the
pattr information to be updated (thankfully, it doesn't do that
automatically each time it receive something). So when you send a
message that change one of the item of your pattr state you need to
call notifyclients(). Does that makes sense?
Cheers,
ej
- Previous message: [javascript-dev] Re: Re: javascript + Pattr question - storing multiple values of mixed types (string/float)
- Next message: [javascript-dev] Re: Re: Re: javascript + Pattr question - storing multiple values of mixed types (string/float)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
