uBasic @default statement ignored? - Script Writing - CHDK Forum

uBasic @default statement ignored?

  • 4 Replies
  • 4279 Views
*

Offline zeno

  • *****
  • 891
uBasic @default statement ignored?
« on: 24 / March / 2008, 07:09:38 »
Advertisements
I'm using Allbest build 37. It seems that the @default statement in a script is not executed properly if the script has run previously with different values. In other words, editing a script to change the defaults and then loading it into the camera does not work - the camera just uses values that were last used (not necessarily the 'old' defaults - just whatever values were in effect when the script was last run).

To get the default statement to execute properly it's necessary to load a different script and then load the changed one. Is this a bug or is it meant to work this way :-)
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: uBasic @default statement ignored?
« Reply #1 on: 24 / March / 2008, 07:43:42 »
Deleted
« Last Edit: 22 / April / 2008, 14:57:32 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline zeno

  • *****
  • 891
Re: uBasic @default statement ignored?
« Reply #2 on: 24 / March / 2008, 08:26:27 »
I partly agree with what you say Barney, but I think if you reload a script and it's been edited since you last ran it, then you might expect the changes to be accepted. As far as I can tell, logic changes are accepted, but changes to the @default statement are not.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: uBasic @default statement ignored?
« Reply #3 on: 24 / March / 2008, 08:57:07 »
A "revert to default settings" item wouldn't be a bad thing to have in the script menu. Although some might say it would take valuable space along with the remote settings making the menu too cluttered, and it would be quite unnecessary if merely reloading the same script would clear the changes.

Meanwhile, to get back to the script's defaults, you can load some other script and after that load your newly modified script, since the settings are remembered for only the most recent script (or is there a way to save them for other scripts as well? This is actually something I'd like to see, maybe in the form of a "save defaults to script" option ... I know we'll be getting a file editor some day to partially solve this by another means completely).

Meanwhile (unless I'm mistaken about losing script settings on loading a different script), I'd vote for the settings to be always cleared when a script is loaded from the script file browser, even when the loaded script has the same name as the currently loaded script.

Retaining settings for the current script on power-off is another thing completely, it's a great thing to have.

Re: uBasic @default statement ignored?
« Reply #4 on: 24 / March / 2008, 09:14:21 »
Deleted
« Last Edit: 22 / April / 2008, 14:57:51 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

 

Related Topics


SimplePortal © 2008-2014, SimplePortal