Re: xdialog stopped working
Tony,
These may help:
http://www.learn alpha.com/QuerySyntax/QuerySyntax.htm
http://www.learn alpha.com/QuerySynt...axGlossary.htm
Announcement
Collapse
The Alpha Software Forum Participation Guidelines
The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
Moderators may also rename posts and threads if they are too generic or do not property reflect the content.
Moderators may move threads if they have been posted in the incorrect forum.
Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.
The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.
Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.
Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.
Bonus TIPS for Successful Posting
Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.
When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.
The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.
When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.
A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.
If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.
When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.
Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
- Be professional in your conduct
- Be kind to others
- Be constructive when giving feedback
- Be open to new ideas and suggestions
- Stay on topic
Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
- Spam.
- Vulgar language.
- Quotes from private conversations without permission, including pricing and other sales related discussions.
- Personal attacks, insults, or subtle put-downs.
- Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
- Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
- Sexually explicit or violent material, links, or language.
- Pirated, hacked, or copyright-infringing material.
- Encouraging of others to engage in the above behaviors.
If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
- Remove the Post or Thread - the content is removed from the forum.
- Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
- Temporarily Ban the User - user is banned from forum for a period of time.
- Permanently Ban the User - user is permanently banned from the forum.
Moderators may also rename posts and threads if they are too generic or do not property reflect the content.
Moderators may move threads if they have been posted in the incorrect forum.
Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.
The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.
Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.
Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.
Bonus TIPS for Successful Posting
Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.
When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.
The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.
When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.
A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.
If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.
When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.
Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less
xdialog stopped working
Collapse
X
-
Re: xdialog stopped working
Tony,
Just got back to this, now 7:30 UK.
Glad to see Stan and Peter (both true experts) came to you rescue.
The rationale in the syntax is var->vteam_id is treated as a string rather than the actual variable value, that is why it worked when you submitted the actual team id.
I usually use s_quote() in a filter when a variable is involved as I can never remember the " and ' sequence as shown in Peter's example.
Leave a comment:
-
Re: xdialog stopped working
That fixed it!!! Thanks so much Peter.
Is there a rationale behind that syntax?
Tony
Leave a comment:
-
Re: xdialog stopped working
try this:
vPositions_List_rl_def = "kl=team pos,{keylist_build(\"H=.05,1:40[Positions]\",''+Team_pos_id,left(''+Team_pos,40))}{Team_id = '"+vteam_id+"'}"
where the last expression is (expanded for readability):
Team_id = ' " + vteam_id + " '}"
but you can't include the extra spaces in the actual code when you type it in.
Leave a comment:
-
Re: xdialog stopped working
I have a msgbox right after I set the value of the vteam_id variable to the form field value for the team id (team_id.value):
Code:dim vteam_id as c vteam_id=team_id.value msgbox("",vteam_id) 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%
However, that value does not seem to get passed to the filter expression used in the line that gets the values to populate the list box:
Code:vPositions_List_rl_def = "kl=team pos,{keylist_build(\"H=.05,1:40[Positions]\",''+Team_pos_id,left(''+Team_pos,40))}{Team_id = [COLOR="Red"]var->vteam_id[/COLOR]}"
Leave a comment:
-
Re: xdialog stopped working
Are you running the xdialog from the form? Can you check that the field object is named team_id?
Try putting this into your script:
dim vteam_id as c
ui_msg_box("team_id.value is",team_id.value)
vteam_id=team_id.value
ui_msg_box("vteam_id is",vteam_id)
This will let you know whether vteam_id is being properly initialized.
Leave a comment:
-
Re: xdialog stopped working
the variable is dim'ed as c and its value is set to the value of the form field team_id in the first two lines of the script.
Code:dim vteam_id as c vteam_id=team_id.value
So the only thing that changed was a shutdown of A5.
Leave a comment:
-
Re: xdialog stopped working
It appears that the string is not reading the value from var->vteam_id.
Alpha created this code in the action script
Leave a comment:
-
Re: xdialog stopped working
They are form fields for the form containing the button with this script.
I think I have narrowed the problem down to the filter string:
Code: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}"
T
Leave a comment:
-
Re: xdialog stopped working
Tony,
Where do team_id.value and team_name.value come from? these report as not found when I run the script.
Have to leave as is nearly 6:00 pm here, but will resume in morning
Leave a comment:
-
Re: xdialog stopped working
More info/issues.
I replaced the code to set the header title to:
Code:titletext="Manage "+alltrim(team_name.value)+" Positions" msgbox(titletext,vteam_id) dim xDlgHeader as p xDlgHeader.HeadingText = titletext xDlgHeader.Image = "Team" xDlgHeader.BodyText = <<%str%
However, when the dialog box opens, the titletext does not show the correct value. It is showing the first team in my team list on the form rather than the selected.
Once again I find this to be strange since the msgbox shows the variables and they are populated correctly, and yet the .HeadingText does not display the titletext variable correctly.
Leave a comment:
-
xdialog stopped working
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:
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
TonyTags: None
Leave a comment: