PxPlus User Forum

Twitter Twitter Twitter

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.

Topics - Peter.Higgins

Pages: [1] 2 3
Language / "*web/ftp;send"
« on: May 16, 2022, 03:47:30 PM »
I have a password with $ special character and passing this as a argument doesn't work.
Any suggestions appreciated.
Tried adding single quotes around pswd and url encoding the $ but this doesn't work.

Programming / Read Data to a memory File or just use a switch?
« on: January 20, 2022, 02:33:11 PM »
Curious which is the best way to tackle the need to convert a EDI SAC code into one of 4 classification codes like frt or tax in an object.  This could be used 1 times to 2000 times per instantiation with the high occurring during peak load periods. 

I know Read Data with DATA lines is relatively "Old fashioned" but given the Standards in play and limited maintenance usage of the object it makes a lot of sense where as a maintenance file with FMs does not.

So considering DATA lines on instantiation writing to a memory file for a method, or a method with a switch case with @ 60 cases.  Which is better, or are there better ways?
PS: Since the switch only has 4 outputs, I have a version that has only 4 cases. 

Programming / Passing Array{all} to an object in NEW()
« on: November 22, 2021, 06:46:22 PM »
I want to short cut opening a massive array structure in numerous objects by opening it in a main program and passing it via the new instantiation command as an parameter argument.  Thought I'd seen it here, but not finding it now.  Is it necessary to do this through a method or am I doing something wrong?  Getting sent to delete on an error 46 before the escape line immediately after on_create:  This is in Version 2017 so perhaps I'm pre versioning code?
Thanks for any help.

Nomads / _PropList$
« on: June 14, 2021, 01:35:21 PM »
Looking for a way to reduce the color application overhead post grid load. 

Have considered Pseudo Multi-Properties and Multi-Property Access and feel the most maintainable way will be to set the basic four properties and assign any number of location colors in one shot rather than build a massive command string and massive value string.

grd'Row.Colno.BackColor.TextColor.$= (repeating string)
grd'_PropValues$= (repeating string)

Wondering if this is currently possible or something that we could look forward to? 

Nomads / Using %Nomads'Timeout for Dynamic Refresh
« on: June 07, 2021, 07:30:55 PM »
I have setup a panel to refresh based on a drop box selection and set %Nomads'Timeout in the drop box event.
In On_Exit I trapped the timeout and issue a reload.  At this point everything is great, but issuing a return just completes the panel shutdown.  Having done this in the past, I believe I am missing something simple and important like a preinput or resetting the %NOMADS'Timeout.  The latter doesn't work btw.

Wish List / Key function addition
« on: June 06, 2021, 07:20:37 PM »
Key function allows a key string to be generated when explicitly stated:
SELECT .... FROM <fileno> BEGIN KEY(<fileno>, KEY=S1$:S2$:S3$)

It would be quite useful for this to also work indirectly as in: 
K$=KEY(<fileno>, KEY=str$,sep=$3E$)
where string is s1Value$:s2Value$:s3Value$

Currently I am building a string for the whole command and executing it to get the key from object parameters.

Nomads / Object Dependency question
« on: June 04, 2021, 05:10:25 PM »
I have been using business logic objects that instantiate other objects "FOR OBJECT" .  As it is convenient, I occasionally make the internal object handles available as properties with SET ERR rather than opening two instances. 
Now I'm wondering if the shutdown of these objects used outside the container object might be responsible for the occasional segment fault I get in testing? 

Nomads / Object dependency For Windows
« on: June 03, 2021, 11:45:48 AM »
I am curious if instantiating an object in the pre-display "FOR WINDOW" will garbage collect the object,  or if this must be done in POST-DISPLAY after window creation.   Thinking I've tested in v17 and it only worked in POST-DISPLAY.

Programming / Composite Strings & BBx® Templates in objects
« on: January 27, 2021, 03:35:38 PM »
I've used Composite Strings & BBx® Templates in objects to keep record data separate for many years with SAGE and INFOR code.  I find  with pxplus Ver 2017 this does not work and guessing it may have only worked in the forked versions.

When a template or iolist is used to DIM the record variable's "Structure" it loads the record and explodes the internal IOLIST variables but not as record prefixed variables. I have tested this many ways without any change.
How can I keep different records with random matching field names separate in objects?

4760 dim AR1: "CUST_DIV:C(2),CUST_CODE:C(8)"
4760 dim AR1$:iol(AR1:*)

4770 READ DATA FROM objar1'readrecord$(shipto$),REC=ar1$ TO IOL=objar1'iolist$
4770 AR1$=objar1'readrecord$(shipto$)


Language / Error handler Object handling.
« on: January 14, 2021, 02:53:54 PM »
Looking to add an object manager to programs and the error handler so it can drop them.

At first I thought *master might work, but not in *nix from the results I get. 

I also was thinking there was a newish object manager utility to keep object references in, but all I can find that is useful is the *obj/collection.pvc which leaves a lot of coding to implement everywhere else.

Am I missing one somewhere?

Nomads / Changing the Screen_ID$ property of a Nomads Object
« on: December 29, 2020, 02:22:53 PM »
I am exploring if the same object nomads program can be used to display both a dialog and a child window (suffixed with a "C").  Will the process() method accept an parameter in Object Nomads because the below seems to be using the Dialog? 

Error #88: Invalid/unknown property name

Nomads / cmd_str$="End" not working in object nomads issue
« on: December 18, 2020, 01:26:13 PM »
Occasionally I see this issue and cannot remember how it was solved. 


On a new object nomads Dialogue panel copied from a template panel and modified, the Cmd_Str$="End" will run the ON_EXIT and ON_DELETE logic, but the panel hangs there active.  Using a tested program structure template so both procedures have return values of 1.  Using Developer package windx to connect to a Centos system.   Using a bunch of objects but moving them around between on_delete and on_exit makes no difference.  Putting an extra Cmd_Str$="End" in the on_exit does nothing either. 

I think the solution last time was to delete the nomads entry and re-create the panel.   
This panel is very large and complex to reenter manually.

Any ideas why this is happening?
After exporting and reimporting and still no joy, I realized the template had lost the local return flags so ON_EXIT and ON_DELETE were returning 0.   :-[

Language / Object Function Dynamic Parameter Question
« on: November 27, 2020, 12:13:56 PM »
Hello List,

I am considering a generic Object Key function that returns the padded value for any index of a file set in object instantiation without the overhead of using dictionary objects.  Thanks for the Key() tip Mike.   

There are examples of fully variable parameters here, but I could swear I've seen mixed versions that have the variable portion at the end.  I have been unable to find this in the forum or by searching the documentation. 
I guess the easy answer is directions to dynamic parameters in the documentation.

Assuming by value will work in a compiled iolist variable and the STATIC ckeyIolist$ is
ckeyIolist$=CPL("IOLIST (param1$), (param2$),(param3$),(param4$)")
this is how I think it probably could work. 

 FUNCTION KeyFmt$(KeyNo,*)KEY_FMT ! Where * is the fields of the key.
 Pt$=STK(PROPERTIES);  IF NOT(MSK(pt$,"[Nn][Ss]+")) then EXIT 36
 ENTER (KeyNo),iol=ckeyIolist$,err=*next
 ! Format into key

Programming / Iolist for internal keys
« on: November 21, 2020, 02:21:32 PM »
Is there a way in 2017 or later to write an IOlist for an internal mulitple field key so that the leading fields are padded with nuls?  LEN & CHR do not seem to have that ability.

Programming / Question on key padding
« on: September 16, 2020, 11:22:56 AM »

From working with multiple keys I've learned that external keyed File keys are space padded and internal keyed Files keys are null padded.  Will the FIB "Extended Key Attributes" byte "Null character for NULL keys" affect the key padding or is this only for determining whether to write the key or not?

$0001$ Unique key
$0002$ Convert segment to uppercase
$0004$ Convert segment to lowercase
$0008$ Convert using translate table
$0010$ Swap byte order
$0020$ Primary key allows duplicates
$0040$ Don't add key if the segment is null
$0100$ Don't add key if all segments are null
$0200$ Binary auto-increment key
$0400$ Ignore data after $00$
$0800$ Zero-filled auto-increment
$1000$ Space-filled auto-increment

(8,1) Null character for NULL keys ((6,2)=$0040$ or $0100$)

Pages: [1] 2 3