Previous Thread
Next Thread
Print Thread
Clickable URL text controls #28725 03 Mar 10 06:31 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
I'm having some trouble generating a clickable URL text control in LEO 3.4(2).

Here's the screen (the control of interest is the blue URL)

[Linked Image]

Here's the Properties dialog:

[Linked Image]

(I also set the font color and attributes to blue underline, which doesn't show in the above image, but that part is working fine.)

The generated code quotes the label string in the ctext parameter, but not "exitcode" string in cmd parameter.

Code
       xcall AUI, AUI_CONTROL, CTLOP_ADD, "atecfx.stcURL", "http://www.microsabio.com", 0, &
           MBF_STATIC+MBF_KBD+MBF_SHLEXC, http://www.microsabio.com, "", NUL_CSTATUS, &
           9250, 4, 10500, 42, 16711680, -2, 2, 120, "", "", "atecfx.tab_2"
It's not a major problem, but forces me to manually insert the quotes into the generated code each time I regenerate it. I'm guessing that this is just a simple glitch relating to the fact that the "ShellEx" option is not common, but perhaps there is something else going on.

I'll email you the .leo file so you can experiment with it. (No urgency on this.)

Re: Clickable URL text controls #28726 04 Mar 10 03:17 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
The EXITCODE field is a combo of standard virtual keys accepting other values and, the logic behind it for generated code is:
"if the value starts with VK, quote it else, consider the literal value, unquoted, for the CMD argument of the AUI command."
In my case, when not using VK values, I always use DEFINES for standard exitcodes (e.g. BVK_SAVE, BVK_DEL, ...) that can't be quoted so, to cover the SHELLEX case, where CMD is a command to be executed, just add the quotes to the EXITCODE value, that become (literaly) "http://www.microsabio.com".


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Clickable URL text controls #28727 08 Mar 10 10:36 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
It seemed like I tried that and found the quotes getting removed, but that was quite possibly because of some confusion in the A-Shell quoting/unquoting of comma delimited output and input. However, I just tried it now and it seems to stick, so thanks for the advice and sorry for the silly question.

Re: Clickable URL text controls #28728 08 Mar 10 12:11 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
Happens to the best of us, prof... wink


Powered by UBB.threads™ PHP Forum Software 7.7.3