Actually, I (and NOMADS) use Fonted Text for the prompts for the different fields. Works fine there.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#17
Nomads / Re: SHOW CONTROL
October 21, 2024, 08:48:46 AM
The main reason it doesn't seem to work is that it isn't really an addressable control. It's text that is on the text plane, and the *wingrp routine deals with SHOW/HIDE separately.
I find that using a multi_line is much more effective, as I can drop whatever text I want into it and it's done.
I find that using a multi_line is much more effective, as I can drop whatever text I want into it and it's done.
#18
Nomads / Re: SELECTING A LINE OR LINES FROM A LIST BOX
October 18, 2024, 09:31:59 AM
The When-Selected logic changes a bit when you move from double-click to multiple-selection. The _EOM$ values to check become $09$ for Tab and $0D$ for Enter. You may also consider including $00$ if someone simply clicks on another control on the panel (be sure to set 'Signal on Exit').
At that point, the LB$ value contains all of the selected entries, separated by the last character of LB$ (probably $00$). For efficiency, you may want to include the entry/row number in the line.
For example, if your list_box looks like:
and lines 001 and 003 are selected, when leaving the list_box, LB$ would contain:
"001"+sep+"Item A"+sep+"Description A"+$00$+"003"+sep+"Item J"+sep+"Description J"+$00$
(Note: the "sep" may be redefined when defining the list_box by setting the 'Column Separator' on the format definition panel, and can be retrieved by Sep$=LB.Ctl'Sep$)
The row separator can be identified from:
EOL$=mid(LB$,-1)
The number of rows would then be:
N_Rows=pos(EOL$=LB$,1,0)
If you want the row separators to be "!" instead of the EOL, then:
LB$=sub(LB$,EOL$,"!")
And your selection routine becomes more like:
I've gone through other gyrations in the past to make the lists look and work spiffy. While I generally use Report Views instead of Formatted lists, the process is the same.
Good luck!
At that point, the LB$ value contains all of the selected entries, separated by the last character of LB$ (probably $00$). For efficiency, you may want to include the entry/row number in the line.
For example, if your list_box looks like:
001 | | Item A | | Description A |
002 | | Item Q | | Description Q |
003 | | Item J | | Description J |
and lines 001 and 003 are selected, when leaving the list_box, LB$ would contain:
"001"+sep+"Item A"+sep+"Description A"+$00$+"003"+sep+"Item J"+sep+"Description J"+$00$
(Note: the "sep" may be redefined when defining the list_box by setting the 'Column Separator' on the format definition panel, and can be retrieved by Sep$=LB.Ctl'Sep$)
The row separator can be identified from:
EOL$=mid(LB$,-1)
The number of rows would then be:
N_Rows=pos(EOL$=LB$,1,0)
If you want the row separators to be "!" instead of the EOL, then:
LB$=sub(LB$,EOL$,"!")
And your selection routine becomes more like:
Code Select
Line_Selected:
if pos(_EOM$=$00090D$)=0 then return
EOL$=mid(LB$,-1) ! get row separator character
N_Rows=pos(EOL$=LB$,1,0) ! determine # of rows selected (if needed)
LB$=sub(LB$,EOL$,"!") ! optional to replace the row separator
... ! any other row-based logic to apply
Arg_3$=LB$ ! to return to calling program
return
I've gone through other gyrations in the past to make the lists look and work spiffy. While I generally use Report Views instead of Formatted lists, the process is the same.
Good luck!
#19
Nomads / Re: SELECTING A LINE OR LINES FROM A LIST BOX
October 17, 2024, 08:45:29 AM
Normally, I would simply set it up with the 'Multiple Selections' attribute set. That way, the user can use the standard Windows selections (click, ctrl-click, shift-click) to highlight as many as they want. Then when they tab out of the list, it triggers the selection logic and you can retrieve all of the entries at once.
#20
Nomads / Re: SELECTING A LINE OR LINES FROM A LIST BOX
October 16, 2024, 08:51:27 AM
At the beginning of your selection logic routine, check _EOM$ for $02$ to check for a double-click, and/or $0D$ for an ENTER key. This will filter out the single-click selections. Eg:
Code Select
if pos(_EOM$=$020D$)=0 then return ! Only accept double-clicks and ENTERs
#21
Web Services / Re: REST API Issue
September 26, 2024, 02:15:37 PM
Also check if there is supposed to be a space between "Basic" and the rest of it.
#22
Web Services / Re: REST API Issue
September 25, 2024, 03:55:52 PM
Taking a closer look, it seems like you're mixing header and detail information in the package contents.
I've been using the PxPlus Web Request process (see https://manual.pvxplus.com/PXPLUS/Web%20Services/Overview.htm[color=var(--body-txt-color)]) for these types of things:[/color]
where: SiteURL$ would be your URL$, RequestData$ would probably just be the Gift_Card_Number and CVV, ExtraHdr$ would contain the Accept and Authorization (without quotes), and MimeType$ would be the Content_Type (application/json). You may also want to include "Accept: application/json" in the ExtraHdr$ to identify the return format. I let PxPlus determine the method.
After the call, the returned package would be in Resp$, and any header info would be in RespHdr$.
Good luck!
I've been using the PxPlus Web Request process (see https://manual.pvxplus.com/PXPLUS/Web%20Services/Overview.htm[color=var(--body-txt-color)]) for these types of things:[/color]
Code Select
CALL "*plus/web/request",SiteURL$,RequestData$,Resp$,RespHdr$,MimeType$,"",ExtraHdr$
where: SiteURL$ would be your URL$, RequestData$ would probably just be the Gift_Card_Number and CVV, ExtraHdr$ would contain the Accept and Authorization (without quotes), and MimeType$ would be the Content_Type (application/json). You may also want to include "Accept: application/json" in the ExtraHdr$ to identify the return format. I let PxPlus determine the method.
After the call, the returned package would be in Resp$, and any header info would be in RespHdr$.
Good luck!
#23
Web Services / Re: REST API Issue
September 25, 2024, 02:46:12 PM
Seems to me that it's something the host service doesn't like. I'd suggest checking with the provider and their documentation to see what they have to say.
Unless someone else has a better idea...
Unless someone else has a better idea...
#24
Web Services / Re: REST API Issue
September 25, 2024, 02:02:44 PM
Is the auth code supposed to be Base64, or should it be plain text?
Is this a 'constant' or is it returned from a prior call (OAuth2, etc.)?
Is this a 'constant' or is it returned from a prior call (OAuth2, etc.)?
#25
General Announcements / Re: Forum Upgrade
July 11, 2024, 03:04:52 PM
Is there a way to get something like the old singular "Unread Posts" button? With this new format, it seems I get to check the Alerts as well as the Updated Tops and Unread Posts under my avatar if I want to get all of the updates since the last time I checked.
#26
Nomads / Re: numeric data in grid cells: how to round?
May 09, 2024, 03:34:19 PM
As a possibility, you could enable it before the load and disable it immediately after. That would minimize the potential crash time.
#27
Nomads / Re: numeric data in grid cells: how to round?
May 08, 2024, 08:44:49 AM
Not sure if this would apply... Have you checked out the 'RI' and 'RN' parameters?
#28
Programming / Re: Spawning a session
April 19, 2024, 11:56:58 AM
That's an interesting twist. Haven't tried that before.
How about defining the panel as a Child Dialogue (maybe with Synchro-Lock)?
How about defining the panel as a Child Dialogue (maybe with Synchro-Lock)?
#29
Language / Re: Different Listbox Row Heights with Accented Characters
April 18, 2024, 03:16:34 PM
This also seems to cause a problem with descenders, too. In the latest example, is that "Hague" or "Haque"?
Does anyone know if this is PxPlus or Windows behavior? Is there some setting I'm not setting?
Does anyone know if this is PxPlus or Windows behavior? Is there some setting I'm not setting?
#30
Language / EXTRACT not locking?
April 18, 2024, 02:32:03 PM
We encountered an interesting situation and could use some clarity and/or confirmation.
Using a Linux server (RHEL 7.9) with PxPlus v15.1 via WindX we open a test file and EXTRACT a record. In another session, open the same file and READ the record. No Error 0.
Upon closer examination, we noticed the Linux file permissions were "-rw-r--r--" and the file was "owned" by a different username. When we changed the permissions to "-rw-rw-rw-", the EXTRACT/READ above worked as expected.
So, it seems that an EXTRACT on a file where a WRITE cannot actually happen is treated as a READ, even though everything, including FIN(ch,"Extract"), suggests the EXTRACT really happened. Except it didn't.
Is this proper? Or is there something missing along the way?
Any guidance would be greatly appreciated.
Thanks!
Using a Linux server (RHEL 7.9) with PxPlus v15.1 via WindX we open a test file and EXTRACT a record. In another session, open the same file and READ the record. No Error 0.
Upon closer examination, we noticed the Linux file permissions were "-rw-r--r--" and the file was "owned" by a different username. When we changed the permissions to "-rw-rw-rw-", the EXTRACT/READ above worked as expected.
So, it seems that an EXTRACT on a file where a WRITE cannot actually happen is treated as a READ, even though everything, including FIN(ch,"Extract"), suggests the EXTRACT really happened. Except it didn't.
Is this proper? Or is there something missing along the way?
Any guidance would be greatly appreciated.
Thanks!