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.


Messages - Mike King

Pages: 1 [2] 3 4 ... 65
16
Programming / Re: PXPlus crashing after error 61
« on: February 15, 2024, 04:09:26 PM »
Loren

You could be facing a OS compatibility issue. There never was a version 12.50 for any version of Redhat 7.  The latest Redhat release for version 12.50 was Redhat 6.

You can see all the versions of PxPlus 12.50 at https://home.pvxplus.com/downloads/pxp1250/

If you want to run Redhat 7.9 you likely will need to use a newer PxPlus built for/on that release -- Version 14 PxPlus 2017 -- although even that release would have been made for an earlier version of Redhat 7. 

Redhat 7.9 was only released in 2020, PxPlus 12.50 was released in 2015.

17
Language / Re: Maximum Number of Columns in a Report View List Box
« on: February 14, 2024, 10:10:12 AM »
Glad to have helped.

18
Language / Re: Maximum Number of Columns in a Report View List Box
« on: February 12, 2024, 11:08:54 AM »
There is a limit imposed by Windows itself.

Check out the note at the bottom of: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.listview.columnheadercollection

Unexpected behavior can result when the combined width of all columns exceeds 32,768 pixels.

So depending on the column widths and the current user font you may be hitting this limit.

19
Webster Plus / Re: grid display using program - grid does not show
« on: February 12, 2024, 10:59:36 AM »
I tried the following with no problem:

HTML file demo.html (placed in the pages directory):

Code: [Select]
<!DOCTYPE html>
<html>
<head>
</head>
<body>
[ttl]Grid[/ttl]<br>
[form]
[grid MyGrid program="myprog;makegrid" size=auto/20 ]
[col Source=ItemCode$ ttl="ItemCode" width=30 ]
[col Source=ItemName$ ttl="Name" width=50]
[col Source=ItemType$ ttl="Type" width=5]
[/grid]
[/form]
</body>
</html>

Program file "myprog" (in the prog directory)

Code: [Select]
! myprog (placed in the prog directory)
MAKEGRID:
  enter MYGRID
  open (hfn,iol=GRIDIOL)"*memory*"
  MYGRID=lfo
  while 1
  read data iol=gridiol,end=*break
  write (MYGRID)
  wend
 !
  exit
 !
  data "item1","First Item","A"
  data "item2","Second Item","B"
  data "item3","Third Item","A"
  data "item4","Last Item","C"
!
 GRIDIOL:  iolist ITEMCODE$,ITEMNAME$,ITEMTYPE$

Rather than read from a file I used in-code DATA values to make sure there was data present.

20
Webster Plus / Re: Loading list from program carList$
« on: January 30, 2024, 11:37:50 AM »
According to the documentation:

When used on a [ list ] short code, indicates the name of a program to be performed called to return a file containing the data to be displayed.
The documentation has a minor error in that it says performed whereas it should say called.

So when you have a program=xxxxx in a list shortcode, the program should return a file handle to a keyed file with the desired contents.  Generally this would be a memory file, but id could be a *query* file or actual data file.  Something like:

Code: [Select]
MakeCarList:
 enter FileNo
 open (hfn) "*memory*"
 FileNo = lfo
 write (lfo,key="0") "Ford"
 write (lfo,key="1") "GM"
 write (lfo,key="2") "Audi"
 write (lfo,key="3") "Volvo"
 exit

The Key value will determine the sort sequence.  You will generally provide a IOLIST on the file then use the [ col ] short code to reference the desired columns. 

Normally you would have a file on your system with the car models and simply open and pass back this file then define which column/field you want displayed.

Now if you do want to use a program and a text string you could use something like:

Code: [Select]
<p>[ttl]Cars[/ttl]</p>
<p>[form]</p>
<p>[execute perform"myprog;makecarlist"][list Cars$][data rowsep=/ text=(carList$)][/list]<br />
[list Cars2$][data rowsep=/]Ford/Gm/Audi/Volvo[/data][/list]
[/form]
</p>

Use the Execute to run your program to load carlist$ and the text= option in the [ data ] short code to pass the value.  When you use the text= option, there is no [ /data ] needed.

21
Webster Plus / Re: EZWeb takes approx 20 seconds for actions
« on: January 27, 2024, 05:14:20 PM »
The fact that when the IDE is running you see a slowdown sounds like you are hitting the concurrent user count.  Note that windows users are not shared with Remote users as there is no way to know if the remote web user is the same user as the Windows user.

So, if using a 1 user license only one user can run at a time; running the IDE will consume the only user slot.

When Webster detects the user limit has been hit it stalls the process for between 10-20 seconds waiting for a user slot to free up.  Should a slot not free up it will let the process through rather than reporting the user limit error.  This is done so your end users (who could be anybody) won't see the problem that they could not fix anyway, they will just perceive a slow response time.


22
Webster Plus / Re: EZWeb takes approx 20 seconds for actions
« on: January 26, 2024, 02:42:24 PM »
Are you connecting to your own machine and if so what URL are you using? 

I have seen instances where Windows has issues with resolving localhost if you have both IPv4 and IPv6 enabled.
If using localhost try using the direct IP address of 127.0.0.1

The issue is that localhost often has two definitions -- one for IPv4 (127.0.0.1) and one for IPv6  (::1).  I have seen this get things confused as the browser first tries the ::1 address then the 127.0.0.1.

23
Programming / Re: Flash a Message
« on: January 26, 2024, 10:56:01 AM »
Jeff,

Perhaps the easiest solution if you are using Nomads is to set a timeout value to invoke code to hide/clear the message.

For example, when you display the message set %nomads'timeout to the number of seconds you want the message to remain.  The timeout will cause the system to attempt to close your panel so in the panel wrap up logic test if CTL = -1900 (panel timeout); if its a panel timeout clear the message, reset %nomads'timeout to 0, and set IGNORE_EXIT to 1. 

If you already have timeout logic in your panel you may want to set another variable as well when you display the message to indicate that the timeout is to handle clearing the message.

24
Programming / Re: How to send a POST request using *BROWSER
« on: January 24, 2024, 01:24:12 PM »
In your logic where you issue the Navigate2 call, what is happening with the resultant response?

If you simply want to submit the posted data and are planning on throwing away the response or at least not displaying it the *plus/web/request is likely all you need.

However, if you are expecting a response of a web page you wish to display so the user can continue then you likely will need to create some JavaScript and HTML to load into *browser so that it can post the data.

Alternatively you might be able to blend these so you make the request using *plus/web/request then pass the resultant response to *browser for it to display.  This may work however if the response includes things such as cookies it likely will fail.

Now all that being said, if the data is basically form fields it may be possible to simply include them in the URL.  Often applications won't care if data comes from the URL (i.e. http: //somesite.com?field=xxx&field2=yyy) or from posted data.  So if you are simply emulating the user entering fields on a form, try appending the desired data on the URL you pass to navigate2.


25
Assuming all you want to do is bleed through a solid background color and not an image or graphic, just create a multi-line and set its background color to the same as the window and pick a text color that assures the user will be able to see what they type.

PxPlus doesn't support bleeding through a background image on an input field.

26
Programming / Re: How to send a POST request using *BROWSER
« on: January 23, 2024, 04:26:15 PM »
What are you actually trying to do?

*browser will allow you to display a web page from which the user could fill in controls and have the data POSTed to a server with the results being a new/updated web page.  There's a lot of other options here if you want to learn JavaScript and use things like AJAX.

You asked how to POST data, which is what *plus/web/request will allow you do.  Basically you create the data to be POSTed then using this routine you can forward the data to a URL and receive a response for processing.

 

28
Webster Plus / Re: short code [list]
« on: January 18, 2024, 08:48:43 AM »
There are a number of ways to create HTML using PxPlus that don't require much knowledge of HTML itself.

I personally use the PxPlus HTML editor (*htmledit) if I want to design the screen myself.  It has menu options to insert Webster short odes.  Basically just start the editor and enter the short codes. No HTML coding required.

You can also use the file maintenance generator to create forms based on file definitions.  It can make general maintenance screens which you can customize or inquiry screens which provide basic layouts that you then add events to. 

Using the section and row short codes allows you to create responsive screens without much work.

29
Webster Plus / Re: short code [list]
« on: January 17, 2024, 12:48:34 PM »
I just did a test and the trailing slash is not required (although it probably should be there).

Using PxPlus 2023 the following web page worked for me with or without the trailing separator.

Code: [Select]
<!DOCTYPE html>
<html>
<head>
<meta name="author" content="Mike King" />
</head>
<body>
[ttl]Cars[/ttl]<br>
<p>[form program=myprog]</p>
[list Cars$][data rowsep=/]Ford/Gm/Audi/Volvo/[/data][/list]
<br />
[list Cars2$][data rowsep=/]Ford/Gm/Audi/Volvo[/data][/list]
[/form]
</body>
</html>

30
Language / Re: Switching an existing extended ASCII based system to UTF8
« on: January 17, 2024, 12:28:52 PM »
While PxPlus does support UTF8 there are a significant number of things you need to consider and potentially change.  Here are a few of the major issues.

Field Separator:

One of the largest issues you will face is that the default field separator used by PxPlus is hex 8A.  This dates back to the original Business Basic from MAI and has been maintained over the years to avoid clients having to rebuild their existing files and to avoid existing logic that looks for $8A$ having to change.

The first thing you should do if you are going to use UTF-8 is to change the default field separator to a character in the range of $00$ thru $1F$.  Ideally avoid tab ($09$), LF ($0a$) CR ($0D$) and ESCAPE ($1b$) as these could cause long term problems when accessing text.

Data Files:

You will also need to convert ALL existing data file which may have text requiring UTF-8.  Basically, this is any file which might contain accented characters.  Files that use standard ASCII ($00$ thru $7F$) wont need migration however their field separators will need to be reloaded.

Different length data:

When using UTF-8 data length can vary.  For example, in normal extended ASCII 6 characters takes 6 bytes.  Consider the word “garçon”, this would require 6 bytes in normal ASCII but seven in UTF8.  So, if you used this as a key to a file you would need to make sure you allocated 7 bytes for it, and if there were multiple accented characters the key size would need to be longer.

Also, in your code if you try to replace portions of string you need to consider that length of a string to display may not be the same as the length of a string in memory.  This can cause problems with existing code.

Substrings also pose a challenge.  For example, if you decided that the first 4 bytes of a name was to be used as some form of code.  If the name had a UTF code sequence that started at byte 4 and continued thru byte 5+, taking a substring would likely result in an invalid UTF8 sequence.

I short, it is doable and all the tools you need are in PxPlus but migrating an application that wasn’t originally designed to handle multi-byte character is a challenge and involves more than just a character set change and system option setting.


Pages: 1 [2] 3 4 ... 65