Menu

Show posts

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.

Show posts Menu

Messages - James Zukowski

#1
Wish List / Documentation Update for READ DATA
December 04, 2024, 11:07:59 AM
I had a small problem loading data out of a variable into discrete variables with READ DATA. Based on the current documentation, I should be able to:

READ DATA FROM var$,sep=Sep$,err=Bad_Data to iol=My_IOL$

Whenever I type that in, though, I get a syntax error. I was finally able to get it to enter and run properly with:

READ DATA FROM var$,sep=Sep$ to iol=My_IOL$,err=Bad_Data

Could someone update the documentation to present this properly, please?

Thank you!!
#2
Language / Re: RGB Listbox Colors
November 15, 2024, 03:17:07 PM
Yes, I understand that. But what I'm looking at is the snip you included. Immediately before the RGB, there's the code for the COLOR, and before that, there's a comma. Where's that coming from...?
#3
Language / Re: RGB Listbox Colors
November 15, 2024, 03:10:25 PM
I've attached my process. I also noticed in your sample that there's a "0," at the beginning of your statement. It acts like there's a quote immediately after the list_box ID, putting the rest of the line in as the contents. Also, confirming that your field separator has been reset to $01$ in the definition (from the standard SEP).
#4
Language / Re: RGB Listbox Colors
November 15, 2024, 02:20:42 PM
What type of list_box are you using? I tried with a Report View and it works fine with a variety of colors, using both RGB: and #xxxxxx formats.
#5
Nomads / Re: Left-Justify BUTTON Text
November 07, 2024, 02:00:22 PM
In the online manual, the entry for the BUTTON directive includes the option for a FNT= specification, with details in the 'FONT' mnemonic. For things to work, it seems you also have to include OPT="A" and use the '4D' mnemonic. E.g.:

print '4D',
B_ID=100
button B_ID,@(10,5,10,3)="Click Here",opt="A",fnt=",,R"

While you can specify the justification when creating the button, it seems you can't change it, though you can retrieve and change other font attributes:

F$=B_ID'Font$
B_ID'Font$="Courier New,-18,B"

Overall, to left-justify the text, all you need to include when manually creating a button is to include the OPT="A". Not sure what you can do with old NOMADS...
#6
Nomads / Re: Left-Justify BUTTON Text
November 07, 2024, 09:59:08 AM
In NOMADS, on the Font/Clr tab, you can select whether the text is Left/Center/Right justified.
#7
Language / Re: 'window' behavior
October 29, 2024, 11:59:53 AM
It's been a LONG time since I worked in text-only (typically use WindX). Is it necessary that it be a child window?
#8
Nomads / Re: SHOW CONTROL
October 21, 2024, 04:27:32 PM
Actually, I (and NOMADS) use Fonted Text for the prompts for the different fields. Works fine there.
#9
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.
#10
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:

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:

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!
#11
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.
#12
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:
if pos(_EOM$=$020D$)=0 then return ! Only accept double-clicks and ENTERs
#13
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.
#14
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]

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!
#15
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...