Highlighted

Checkboxes are set randomly

Advocate ,
Nov 03, 2017

Copy link to clipboard

Copied

Dear all,

I'm fighting with randomly set check boxes in a particular dialogue:

$.writeln ("PaletteDocSettings1 -- IsDebug=" + settings.IsDebug + " Verbose=" + settings.Verbose + " EvalFeedback=" + settings.EvalFeedback);
    wPalDS.p0.tabS.g1.pDbg.cbDebug = wPalDS.p0.tabS.g1.pDbg.add('checkbox',undefined,goTxt.wPalDSp0tabSg1pDbgcbDebug);
    wPalDS.p0.tabS.g1.pDbg.cbDebug.preferredSize.height = 20;
    wPalDS.p0.tabS.g1.pDbg.cbDebug.value = settings.IsDebug;

    wPalDS.p0.tabS.g1.pDbg.cbVerbose = wPalDS.p0.tabS.g1.pDbg.add('checkbox',undefined,goTxt.wPalDSp0tabSg1pDbgcbVerbose);
    wPalDS.p0.tabS.g1.pDbg.cbVerbose.preferredSize.height = 20;
    wPalDS.p0.tabS.g1.pDbg.cbVerbose.value = settings.Verbose;
   
    wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback = wPalDS.p0.tabS.g1.pDbg.add('checkbox',undefined,goTxt.wPalDSp0tabSg1pDbgcbEvalFeedback);
    wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback.preferredSize.height = 20;
    wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback.value = settings.EvalFeedback;
$.writeln ("PaletteDocSettings2 -- IsDebug=" + wPalDS.p0.tabS.g1.pDbg.cbDebug.value + " Verbose=" + wPalDS.p0.tabS.g1.pDbg.cbVerbose.value + " EvalFeedback=" + wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback.value);

The first write reports:

   PaletteDocSettings1 -- IsDebug=false Verbose=false EvalFeedback=false

The second write reports:

   PaletteDocSettings2 -- IsDebug=true Verbose=true EvalFeedback=false

What has changed the settings for the first two check boxes?

Any ideas?

Checking the type of settings.IsDebug gives an answer: string

So I have to look further where this comes from, because settings.EvalFeedback is reported as boolean.

=> dirty programming (oh this weak typing!), forgot at a number of places to convert to boolean…

TOPICS
Scripting

Views

140

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Checkboxes are set randomly

Advocate ,
Nov 03, 2017

Copy link to clipboard

Copied

Dear all,

I'm fighting with randomly set check boxes in a particular dialogue:

$.writeln ("PaletteDocSettings1 -- IsDebug=" + settings.IsDebug + " Verbose=" + settings.Verbose + " EvalFeedback=" + settings.EvalFeedback);
    wPalDS.p0.tabS.g1.pDbg.cbDebug = wPalDS.p0.tabS.g1.pDbg.add('checkbox',undefined,goTxt.wPalDSp0tabSg1pDbgcbDebug);
    wPalDS.p0.tabS.g1.pDbg.cbDebug.preferredSize.height = 20;
    wPalDS.p0.tabS.g1.pDbg.cbDebug.value = settings.IsDebug;

    wPalDS.p0.tabS.g1.pDbg.cbVerbose = wPalDS.p0.tabS.g1.pDbg.add('checkbox',undefined,goTxt.wPalDSp0tabSg1pDbgcbVerbose);
    wPalDS.p0.tabS.g1.pDbg.cbVerbose.preferredSize.height = 20;
    wPalDS.p0.tabS.g1.pDbg.cbVerbose.value = settings.Verbose;
   
    wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback = wPalDS.p0.tabS.g1.pDbg.add('checkbox',undefined,goTxt.wPalDSp0tabSg1pDbgcbEvalFeedback);
    wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback.preferredSize.height = 20;
    wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback.value = settings.EvalFeedback;
$.writeln ("PaletteDocSettings2 -- IsDebug=" + wPalDS.p0.tabS.g1.pDbg.cbDebug.value + " Verbose=" + wPalDS.p0.tabS.g1.pDbg.cbVerbose.value + " EvalFeedback=" + wPalDS.p0.tabS.g1.pDbg.cbEvalFeedback.value);

The first write reports:

   PaletteDocSettings1 -- IsDebug=false Verbose=false EvalFeedback=false

The second write reports:

   PaletteDocSettings2 -- IsDebug=true Verbose=true EvalFeedback=false

What has changed the settings for the first two check boxes?

Any ideas?

Checking the type of settings.IsDebug gives an answer: string

So I have to look further where this comes from, because settings.EvalFeedback is reported as boolean.

=> dirty programming (oh this weak typing!), forgot at a number of places to convert to boolean…

TOPICS
Scripting

Views

141

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 03, 2017 0
Advocate ,
Nov 03, 2017

Copy link to clipboard

Copied

Checking the type of settings.IsDebug gives an answer: string

So I have to look further where this comes from, because settings.EvalFeedback is reported as boolean.

=> dirty programming (oh this weak typing!), forgot at a number of places to convert to boolean…

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2017 0