Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Dynamic GUIADDMENU

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Dynamic GUIADDMENU
#13236
Posted by: Michael S 2010-03-08 22:56:18 Last edited by: Michael S 2010-03-08 22:57:19 (Total edited 1 time)
If I add menu items via the above, and I specify them as follows. I add a header via

guiaddmenu("DB2 &Source", "HEADING", 1)

then I can't get the (standard) Alt+S to kick in. I'm assuming this ISN'T what is meant by an accelerator or am I wrong ? I've tried variations, for example

guiaddmenu('DB2 &Source, , ALT "S"', 'HEADING', 1)

but can't get anything to work. I'll include a couple of scripts that indicate a general problem for me. Run guiaddmenu_problem - this reads a txt file and creates a menu heading with sub-items indicating which ODBC databases are available. Note that when you run the sript, BOTH menu headings are grayed

By the way, the "strange" character in the txt file is the § (paragrpah character)
guiaddmenu_problem.rexchange_db2_source.rexODBC_defaults.txt
Message2. Okay - I think I see what the problem is (actually, there seem to be 2)
#13237
Posted by: Michael S 2010-03-08 23:32:19
If you change the code (guiaddmenu_problem) so that it looks like this

guicreatewindow()
rc = post_create_window()
guisetctlvalue()
guisetctlplacement(,,,,,,'NORMAL')
rc = change_db2_source.rex("I")   /* This moved from post_create_window */
again:
DO FOREVER

and comment out the call to change_db2_source in post_create_window, then it almost works. Trouble is, I get an error on the call to change_db2_source
err 43.1 Could not find routine "[]"  (where [] is a simple square)
when I run the script. If, however, I step through the code it works.
Message3. Checked a bit more ...
#13238
Posted by: Michael S 2010-03-09 15:59:02
and the original append seems to be okay when the application is generated as an exe, it's only when running it via RPC that I seem to get the problem.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-4-19  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0