I'd be interested in seeing if a template contains any logic errors like referring to an object in an onload() script that hasn't yet been initialized. These would be things that the editor wouldn't catch when coding (but potentially when loading).
Does the app or editor keep a log of such things? If so, is there a way to retrieve it?
Template Debug Messages
Re: Template Debug Messages
Hi
No not really . . .
From the manual
Also note, there is no mechanism at the time for OnLoad scripts to figure out which external variables should be evaluated first. Scripts may run even though variables have not been filled yet, i.e its own tiny script hasn't yet executed. Use variable declared internal to the script instead.
Dependencies on variables that hold constant numerical values, or arrays of constant numerical values, pose no problem as they are recognized as such during script compilation. Unfortunately strings and arrays of strings are not recognized as constants. (That's why they don't display in blue in the project browser)
Bottom line is, OnLoad scripts relying on external numerical constants should all work fine, but there can be issues when depending on more complex variables, or other scripts even.
Another way around this is to use delays and cascade your Load scripts to ensure things are right when you call them . . .
Cheers
MM
No not really . . .
From the manual
Also note, there is no mechanism at the time for OnLoad scripts to figure out which external variables should be evaluated first. Scripts may run even though variables have not been filled yet, i.e its own tiny script hasn't yet executed. Use variable declared internal to the script instead.
Dependencies on variables that hold constant numerical values, or arrays of constant numerical values, pose no problem as they are recognized as such during script compilation. Unfortunately strings and arrays of strings are not recognized as constants. (That's why they don't display in blue in the project browser)
Bottom line is, OnLoad scripts relying on external numerical constants should all work fine, but there can be issues when depending on more complex variables, or other scripts even.
Another way around this is to use delays and cascade your Load scripts to ensure things are right when you call them . . .
Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: Template Debug Messages
Somewhat relative to the topic, I had two constants on a project:
These were defined in top level project hierarchy and then a "onLoad" script was using them:
The script worked perfectly in Lemur 3.0.x - as in, upon loading, the "Meter" objects were all getting the "green" color attribute. After version 4 however, I had to manually enter the constant in the script (replace "green" with "32768") in order to work. Being that they were constants, and not strings or arrays, is this an expected behavior?
I can send the project in question if you want to troubleshoot.
Code: Select all
green=32768
red=8328968
Code: Select all
setattribute(Meter1,'color',green);
setattribute(Meter2,'color',green);
setattribute(Meter3,'color',green);
setattribute(Meter4,'color',green);
setattribute(Meter5,'color',green);
setattribute(Meter6,'color',green);
setattribute(Meter7,'color',green);
setattribute(Meter8,'color',green);
I can send the project in question if you want to troubleshoot.
Last edited by Softcore on 05 Jan 2013 09:37, edited 2 times in total.
Re: Template Debug Messages
Hi
Yes send them in to me at support and we can have a look.
Thanks for the report.
Cheers
MM
Yes send them in to me at support and we can have a look.
Thanks for the report.
Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: Template Debug Messages
that's strange. Yesterday I was using a similar code, and it worked fine with v.4.0.The script worked perfectly in Lemur 3.0.x - as in, upon loading, the "Meter" objects were all getting the "green" color attribute. After version 4 however, I had to manually enter the constant in the script (replace "green" with "32768") in order to work.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Re: Template Debug Messages
hear ya Phill...maybe something is corrupt in that specific project? because it was started on a 3.0.x version?
Here it is! Try it to see if it loads ok on your iPad....The multisliders are supposed to go green once its loaded - they go white here....Its kinda obvious its a "timing" issue (constants not loaded before the script is run) because if you un-tick the "onload" script and re-tick it, the objects turn green as expected.
Im also sending this to support as discussed.
EDIT: brianc, sorry for hi-jacking the thread
Here it is! Try it to see if it loads ok on your iPad....The multisliders are supposed to go green once its loaded - they go white here....Its kinda obvious its a "timing" issue (constants not loaded before the script is run) because if you un-tick the "onload" script and re-tick it, the objects turn green as expected.
Im also sending this to support as discussed.
EDIT: brianc, sorry for hi-jacking the thread
Last edited by Softcore on 05 Jan 2013 09:37, edited 1 time in total.
Re: Template Debug Messages
Aha! I was sure I had read that in the manual, but I wasn't able to search for it properly yesterday.Macciza wrote:Hi
From the manual
Also note, there is no mechanism at the time for OnLoad scripts to figure out which external variables should be evaluated first. Scripts may run even though variables have not been filled yet, i.e its own tiny script hasn't yet executed. Use variable declared internal to the script instead.
Dependencies on variables that hold constant numerical values, or arrays of constant numerical values, pose no problem as they are recognized as such during script compilation. Unfortunately strings and arrays of strings are not recognized as constants. (That's why they don't display in blue in the project browser)
Bottom line is, OnLoad scripts relying on external numerical constants should all work fine, but there can be issues when depending on more complex variables, or other scripts even.
Another way around this is to use delays and cascade your Load scripts to ensure things are right when you call them . . .
I've considered using OnFrame scripts that execute only on a single, early frame or time. I definitely don't like that, since that means there's all of these if statements being evaluated unnecessarily each frame. I really like that your cascade idea gives them an order. Any ideas how to get that accomplished without the expense of OnFrame scripts?