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 - Mike King

#1
Programming / Re: Using HTML File type
February 23, 2026, 11:03:38 AM
You are very welcome.  Always happy to help.
#2
Programming / Re: Using HTML File type
February 21, 2026, 04:21:49 PM
The HTML wrapper for your output is generated by *dev/html.  Its a pretty basic program that can be modified in order to customize your output.
#3
Web Services / Re: question about *web/email
February 16, 2026, 11:35:30 AM
There are a number of reasons for your DMARC to be rejected and its possible that the client having trouble might just be more fussy.

Here is an article that highlights a number of potential DMARC issues that could be causing the problem you are having.

https://dmarc.org/2016/07/common-problems-with-dmarc-records/

Also if your application is adding custom headers to the email make sure they are correct and don't have things like an accidental trailing semi-colon on a header.  That may cause a header your email server might add to render incorrectly.
#4
Take a look at the program "*asctoprg.cnv"
#5
Language / Re: Tree_view with check_boxes
January 19, 2026, 03:29:11 PM
You need to use item states as in:

0010 BEGIN
0020 LET tv=100
0030 LIST_BOX tv,@(40,11,30,10),OPT="e|!",SEP="/"
0040 LET tv'statebitmaps$="!Emptybox|!CheckBox"
0050 LET tv'autostate=1
0060 WHILE 1
0070 READ DATA city$,prov$,END=*BREAK
0080 LET items$+="{;1}"+prov$+"/"+city$+SEP
0090 WEND
0100 LIST_BOX LOAD tv,items$
0110 ESCAPE
1000 ! 1000 - Data
1010 DATA "Toronto","Ontario"
1020 DATA "Montreal","Quebec"
1030 DATA "Calgary","Alberta"
1040 DATA "Ottawa","Ontario"
1050 DATA "Edmonton","Alberta"
1060 DATA "Winnipeg","Manitoba"
1070 DATA "Mississauga","Ontario"
1080 DATA "Vancouver","British Columbia"
1090 DATA "Brampton","Ontario"
1100 DATA "Hamilton","Ontario"
1110 DATA "Surrey","British Columbia"
1120 DATA "Quebec City","Quebec"
1130 DATA "Halifax","Nova Scotia"
1140 DATA "Laval","Quebec"
1150 DATA "London","Ontario"
1160 DATA "Markham","Ontario"
1170 DATA "Vaughan","Ontario"
1180 DATA "Gatineau","Quebec"
1190 DATA "Saskatoon","Saskatchewan"
1200 DATA "Kitchener","Ontario"
Basically you define the images to appear in front of the elements then assign a state to the elements you want to have images on. 

In the above I assigned two images (an empty check box and a checked one) then set every element with a state of 1 (the first image - emptybox). 

You can read and change each items state when they get clicked or use the Autostate property to have the control automatically change the state when clicked.

You can used the 'ItemState property to retrieve current state.
#6
One quick thought -- which WindX are you using?
 
Is it possible you are using the 32 bit WindX and trying to run a 64 bit DLL (or vice-versa)?
#7
Programming / Re: Question TLS
January 05, 2026, 09:25:05 AM
I'm sorry, but off the top of my head I cannot remember which OpenSSL was supported by version 12.5.

Generally, on Linux, PxPlus uses the OS installed version of OpenSSL however there are changes within the OpenSSL interface that limit which version can be used without code changes within the PxPlus kernel.
#8
Web Services / Re: access pxplus variable in Javascript
December 31, 2025, 09:44:11 AM
PxPlus, like PHP, runs server side thus the answer is no, you cannot directly access JavaScript variables from PxPlus.

Below is a link to the same question asked about PHP where they discuss why server side processing, like PxPlus and PHP, cannot directly access JavaScript variables.

https://stackoverflow.com/questions/2379224/how-can-i-use-a-javascript-variable-as-a-php-variable
#9
Programming / Re: Question TLS
December 28, 2025, 01:56:19 PM
While upgrading your PxPlus would likely be your best solution, you might want to consider simply using 'curl' (or 'wget') to send your requests, especially since you said curl can connect.

Obviously it would require some coding changes but invoking curl to submit the request wouldn't be all that difficult and would remove the need to update your PxPlus to a version that supports TLS1.2 or TLS1.3.
#10
Programming / Re: Working with External objects
December 10, 2025, 12:54:50 PM
I suspect your call to the export method is incorrect.

I did a search on the web and on this page found an example that appears to show the Export method wants the exportOptions to be passed, not a boolean.

    Dim wordExportOptions As New ExportOptions()
    wordExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
    wordExportOptions.ExportDestinationOptions = dfDestinationOptions
    wordExportOptions.ExportFormatType = ExportFormatType.WordForWindows
    wordExportOptions.ExportFormatOptions = Nothing
   
    rd.Export(wordExportOptions)
#11
Programming / Re: Working with External objects
December 09, 2025, 04:17:46 PM
Have you tried setting 'VAL$ of the *VARIANT object then changing its type?

->def object v,"*variant"
->v'val$="false"
->?v'val$
false
->print v'type$
S
->v'type$="B"
->print v'val
 0
->v'val$="true"
->print v'type$
S
->v'type$="B"
->print v'val$
-1
As per the docs, setting the type will cause the *VARIANT to properly convert the value.
#12
Programming / Re: Working with External objects
December 09, 2025, 10:58:24 AM
The routine may require that you explicitly pass a boolean.  If so you can likely define a *VARIANT object, set its type to boolean and value then pass that.

Here is some information on *VARIANT

https://manual.pvxplus.com/PXPLUS/Automation%20in%20PxPlus/PxPlus%20COM%20Interface%20Extensions/Overview.htm#variant
#13
Programming / Re: JSON get_num validation
November 29, 2025, 01:52:49 PM
You should just be able to disable the 'NE' and then re-enable it around the function call. That being said, I confirmed the operation of 'NE' using the following Object and test programs:

Object (with error cascading):
  def class "test"
 !
 ! Method
 !
  function method$(a$)
  enter a$
  x$=_obj'subMethod$(a$,err=CascadeErr)
  return x$
 !
 CascadeErr:
  exit err
 !
 ! Submethod
 !
  function subMethod$(a$)
  enter a$
  if a$="bad" \
   then exit 11
  return ucs(a$)
 !
  end def
Test Program:
  oTest=new("test" for program)
  set_param 'NE'=0 ! Default setting
  gosub DoTest
 !
  set_param 'NE'=1
  gosub DoTest
 !
  end
 !
 DoTest:
  print "--------",'LF',"Test with 'NE'=",prm('NE')
 !
  print oTest'method$("good")
  print otest'method$("bad",err=RptErr)
  escape ! Should not get here
 !
 RptErr:
  print "Error exit taken"
  return

When I ran this I got the following:

->run "test
--------
Test with 'NE'= 0
GOOD
Error exit taken
--------
Test with 'NE'= 1
GOOD
Error exit taken

If you remove the ERR=CascadeErr from the object the error occurs if running with 'NE' enabled:

->run "test
--------
Test with 'NE'= 0
GOOD
Error exit taken
--------
Test with 'NE'= 1
GOOD
0007 LET x$=_obj'subMethod$(a$) ! ,err=CascadeErr)
Error #11: Record not found or Duplicate key on write

I would strongly recommend you use the ERR= branch to detect if a item is missing.  The return value of a null string ("") doesn't let you know if the value is undefined versus defined explicitly in the JSON as "".
#14
Programming / Re: JSON get_num validation
November 25, 2025, 10:24:37 AM
Generally internal errors being reported by objects or subprograms should be cascaded back to the user application.

I suspect that the json object is making some form of internal call that itself is returning an error that is not being properly cascaded back to your application.  This means if the 'NE' system parameter is set your application will fail with an error inside the object.

Normally when creating an object for which you anticipate returning an error from, if you need to invoke another method, object or subprogram that can return an error, you should explicitly provide an error trap that itself invokes an EXIT ERR.  This should allow the error condition to be passed back to your application regardless of the setting of 'NE'.

For Example:

Method1:
  ENTER A$,B$
  X$=_obj'SubMethod(A$, ERR=CascadeErr)
  ...
CascadeErr:
  EXIT ERR
#15
Programming / Re: JSON get_num validation
November 23, 2025, 09:18:58 AM
Do you enable the 'NE' system parameter? 

The problem you are having sounds a lot like the error is being generated in the object and it may be assuming that the error will be cascaded back up the stack which it would be if the 'NE' parameter is not enabled.