Scripts using ComboBox fail and crashes MS with the new version and I can't determine what is wrong from new help info. Here is an example...
Let>SLSH=/
Let>MACRO_RESULT=2
Day>the_day
Month>the_month
Year>the_year
Dialog>DG101
Caption=%DISP% SelectDate.scp
Top=250
Width=320
Left=320
Height=250
Label=DG101
Show>DG101
Let>DG101.EDIT101=%the_month%%SLSH%%the_day%%SLSH%%the_year%
ResetDialogAction>DG101
Label>ActionLoop
GetDialogAction>DG101,r
if>r=5,Update
if>r=6,Close
if>r=2,exit
Goto>ActionLoop
Label>exit
SRT>Update
Let>DG101.EDIT101=%DG101.CB101%%SLSH%%DG101.CB102%%SLSH%%DG101.CB103%
ResetDialogAction>DG101
END>Update
SRT>Close
CloseDialog>DG101
Let>MACRO_RESULT=%DG101.EDIT101%
//MessageModal>EDIT101 = %DG101.EDIT101%%CRLF%MACRORESULT = %MACRO_RESULT%
Let>r=2
END>Close
The list windows contain the variables as :
%DG101.CB101.item
What am I doing wrong?
ComboBox stopped working with 7.3.11.1
Moderators: JRL, Dorian (MJT support)
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
Hmmm... after working through numerous crashes and using the debugger, I found that the problem is with ResetDialogAction and/or the action loop. When I changed the code to that below, things worked again.
Still, the question is... what changed in the latest version that caused this?
Edit=EDIT101,4,120,121,%the_month%%SLSH%%the_day%%SLSH%%the_year%
EndDialog>DG101
Show>DG101
//Let>DG101.EDIT101=%the_month%%SLSH%%the_day%%SLSH%%the_year%
//ResetDialogAction>DG101
Label>ActionLoop
GetDialogAction>DG101,r
if>r=5,Update
if>r=6,Close
if>r=2,exit
Goto>ActionLoop
Still, the question is... what changed in the latest version that caused this?
Edit=EDIT101,4,120,121,%the_month%%SLSH%%the_day%%SLSH%%the_year%
EndDialog>DG101
Show>DG101
//Let>DG101.EDIT101=%the_month%%SLSH%%the_day%%SLSH%%the_year%
//ResetDialogAction>DG101
Label>ActionLoop
GetDialogAction>DG101,r
if>r=5,Update
if>r=6,Close
if>r=2,exit
Goto>ActionLoop
Hi,
I tried running your script. I don't get a crash at all. However, because you've used a ResetDialogAction before using GetDialogAction you overwrite your object values with their variable names. Always use a GetDialogAction before a ResetDialogAction. Your lines 27-30 should be:
Show>DG101
GetDialogAction>DG101,r
Let>DG101.EDIT101=%the_month%%SLSH%%the_day%%SLSH%%the_year%
ResetDialogAction>DG101
I tried running your script. I don't get a crash at all. However, because you've used a ResetDialogAction before using GetDialogAction you overwrite your object values with their variable names. Always use a GetDialogAction before a ResetDialogAction. Your lines 27-30 should be:
Show>DG101
GetDialogAction>DG101,r
Let>DG101.EDIT101=%the_month%%SLSH%%the_day%%SLSH%%the_year%
ResetDialogAction>DG101
MJT Net Support
[email protected]
[email protected]
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
Thanks for your help.
Perhaps the crashes are specific to my O/S (Win 2003 Server). Whenever I experience a dialog error, such as this, the only way to exit is to terminate MSched using task manager.
Thanks again... MSched is the best tool we have in our e-commerce collection; I use it daily. We have embedded MSched scripts in our job streams and have created compiled useful tools for users. I particularly like the frequent addition of new enhancements; rather than having to digest a whole new version, I can learn and implement new functionality easily.
Perhaps the crashes are specific to my O/S (Win 2003 Server). Whenever I experience a dialog error, such as this, the only way to exit is to terminate MSched using task manager.
Thanks again... MSched is the best tool we have in our e-commerce collection; I use it daily. We have embedded MSched scripts in our job streams and have created compiled useful tools for users. I particularly like the frequent addition of new enhancements; rather than having to digest a whole new version, I can learn and implement new functionality easily.