I created this xdialog box using a modified dialog box action script. It worked great last night and I used it several times over 3-4 hours. However, after 4 hours of sleeping, I opened my app back up and am now getting the following screens when I press the button to fire the xdialog box.
As you can see form the 4 different screen captures of the very same xdialog box (ran in the same session) that it is now producing very random results and is no longer showing table values...however there are some really pretty colors being displayed!
here is the xbasic for the dialog box:
I am just confused as to why the code ran yesterday and not today!
Thanks
Tony
As you can see form the 4 different screen captures of the very same xdialog box (ran in the same session) that it is now producing very random results and is no longer showing table values...however there are some really pretty colors being displayed!
here is the xbasic for the dialog box:
Code:
'Date Created: 22-Jul-2008 11:07:39 PM 'Last Updated: 22-Jul-2008 11:59:00 PM 'Created By : Tony 'Updated By : Tony 'Execute inline Xbasic code. dim vteam_id as c vteam_id=team_id.value dim xDlgHeader as p xDlgHeader.HeadingText = "Manage "+alltrim(team_name.value)+" Positions" xDlgHeader.Image = "Team" xDlgHeader.BodyText = <<%str% Please add or delete the positions for your new team below... %str% 'Create an XDialog dialog box to prompt for parameters. DIM SHARED vPositions_List as C DIM SHARED varC_result as C heading_string = "Positions List" ok_button_label = "&OK" cancel_button_label = "&Close" DIM vPositions_List_rl_def as C vPositions_List_rl_def = "kl=team pos,{keylist_build(\"H=.05,1:40[Positions]\",''+Team_pos_id,left(''+Team_pos,40))}{Team_id = Var->vteam_id}" varC_result = ui_dlg_box("Manage Positions",<<%dlg% {stretch=width} {XdialogTitleSection=60,8xDlgHeader}; {region} {Region} {text=55,1:heading_string}; {Endregion}; {Region} [%@vPositions_List_rl_def%.60,20vPositions_List]; <%B=T;T= Delete Position;I=$$edit.delete%!vDlt_Pos_btn_button_click > <%B=T;T= Add Position;I=a5_checkpoint_add%!vAdd_Pos_btn_button_click >; {Endregion}; {Region} ; {Endregion}; {line=1,0}; <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>; {endregion}; %dlg%,<<%code% if a_dlg_button = "vDlt_Pos_btn_button_click" then button_xbasic = <<%code_string% if a5_get_records_in_query("cl_team", "pos_id = "+quote(vpositions_list))>0 then dim message as c message= <<%str% This position cannot be deleted because it is still assigned to athletes. It must be unassigned before it can be removed. %str% msgbox("Cannot Delete Position",message) else dim t as p t=table.open("team_pos",FILE_RW_SHARED) query.description = "delete pos" query.order = "" query.filter = "Team_pos_id = VAR->vPositions_List" query.options = "" t.query_create() t.change_begin() t.delete() t.change_end() query.filter = ".T." t.query_create() t.close() vPositions_List_rl_def = "kl=team pos,{keylist_build(\"H=.05,1:40[Positions]\",''+Team_pos_id,left(''+Team_pos,40))}{Team_id = Var->vteam_id}" end if %code_string% evaluate_template(button_xbasic) a_dlg_button = "" end if if a_dlg_button = "vAdd_Pos_btn_button_click" then button_xbasic = <<%code_string% 'Prompt for text and store result in a variable called 'vNewPositionName'. dim prmpt_title as c dim prmpt_prompt as c dim prmpt_default as c prmpt_title = "New Position Name" prmpt_prompt = "" prmpt_default = "" DIM SHARED vNewPositionName AS C vNewPositionName = ui_get_text(prmpt_title,prmpt_prompt,prmpt_default) dim t as p t=table.open("team_pos",FILE_RW_SHARED) t.enter_begin() t.TEAM_ID= team_id.value t.TEAM_POS=vNewPositionName t.enter_end() t.close() vPositions_List_rl_def = "kl=team pos,{keylist_build(\"H=.05,1:40[Positions]\",''+Team_pos_id,left(''+Team_pos,40))}{Team_id = Var->vteam_id}" %code_string% evaluate_template(button_xbasic) a_dlg_button = "" end if %code%)
Thanks
Tony
Comment