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 - Jeff Wilder

Pages: [1]
1
Thin Client/WindX / Force update when using WindX packet compression
« on: August 30, 2022, 06:34:52 PM »
Hello,
I stumbled across an unexpected behavior today and was hoping somebody on here could explain if I am doing something wrong. When the '+W' system parameter is enabled for WindX data packet compression, the UI does not appear to update as I expect it to. Specifically, I sometimes use the WAIT 0 directive to force an update of screen controls while I'm processing something. This is most commonly done for a progress bar for example. When the +W parameter is enabled, the WAIT 0 no longer causes a UI control (screen) update. Below is an example program that illustrates this behavior. I'm using PxPlus 18.20. When the program is executed in a CS client connected WindX session, the print statements are shown after the WAIT directives while +W is off. However, when +W is on, the print statements do not display until the program ends. At which time, they all appear at once. Am I using the WAIT directive improperly?

Thank you,
Jeff

Code: [Select]
0010 BEGIN
0020 SET_PARAM -'+W'
0030 FOR 2
0040 PRINT "Hello World!"
0050 WAIT 0
0060 ! Now go off and do some processing....
0070 GOSUB 0160
0080 ! In PxPlus CS WindX, the print statement doesn't print until the program ends
0090 PRINT "Update the display."
0100 WAIT 0
0110 GOSUB 0160
0120 SET_PARAM '+W'
0130 NEXT
0140 PRINT "Complete"
0150 END

0160 ! Emulate some processing code
0170 FOR I=1 TO 7000000
0180 LET X=I/(RND(I)+1)
0190 NEXT
0200 RETURN

2
Nomads / Finding the previous CTL ID on Default Push Button event
« on: October 27, 2021, 06:02:45 PM »
Hello,
I have a Nomads form with several multi_line controls and a button with the Default Push Button property set. When the user presses enter, my button click logic is executed.

My question: Is it possible to know inside that button click logic which multi_line had focus when the user pressed the enter key? All of the Nomads ID related variables appear to point to the button CTL, but I am looking for the multi_line CTL.

Thank you,
Jeff

3
Programming / PDF viewer cutting off bottom of text
« on: May 25, 2021, 02:33:04 PM »
When I print to the PDF viewer using a scaled font, it sometimes cuts off the bottom of lowercase letters that hang below the line such as g, y, j. It appears to do this whenever I provide the bottom right corner of the text area. I've tried various alignments and sizes for the text area with no change in the results. Below is a sample program and PNG of the output.

Am I doing something improperly? This does not happen when the output is a *WINPRT* device. Including the Microsoft Print to PDF or the Adobe PDF printer.  I believe it is something happening inside *PDF*.

BTW, I am specifying the bottom right corner because I want the text to be cut-off if it is too long for the print area.

Best Regards,
Jeff


Code: [Select]
BEGIN
Cols_Reqd = 102, loop = 0, font$ = "Arial"
OPEN (UNT)"*PDF*;VIEW;MARGINS=500:500:500:500"; prn=LFO

! Scale the font
PRINT (prn)'Font'(font$,-12),'DF',
WHILE (MXC(prn)<Cols_Reqd AND ++loop<5)
PRINT (prn)'Font'(font$, MXC(prn)/Cols_Reqd),'DF', ! Scale the font
WEND

s$="These dangling letters are jetting below the line yet are cut off."
x = 50, l = 1
PRINT (prn)'Text'(@X(1),@Y(l),@X(x),@Y(l),STR(l)+": "+s$,"T"),
l+=2
PRINT (prn)'Text'(@X(1),@Y(l),@X(x),@Y(l+2),STR(l)+": "+s$,"T"),
l+=2
PRINT (prn)'Text'(@X(1),@Y(l),@X(x),@Y(l+3),STR(l)+": "+s$,"T"),
l+=2
PRINT (prn)'Text'(@X(1),@Y(l),@X(x),@Y(l+4),STR(l)+": "+s$,"T"),
l+=2
PRINT (prn)'Text'(@X(1),@Y(l),STR(l)+": "+s$),
END

4
Language / Historical File Splitting (*obj\multifile.pvc)
« on: April 16, 2021, 05:31:41 PM »
Hello,
I am testing the integration of the Historical File Splitting functionality into an existing application and have run into a couple of snags. I'm not sure if I'm using it incorrectly or I have found a bug in PxPlus 15.10.

First, when I set the key information as Ascending or Descending, reading the file with the SELECT/NEXT RECORD directive with a BEGIN and END value either returns no records or incorrectly starts at the beginning of the file no matter the BEGIN value. My file has a multi-segmented internal key which is ascending and made of column 1 and column 2 data. When I set the key information to None, the file behaves as normal. Perhaps I have just misunderstood how this i supposed to work. Maybe someone could provide a working example? I would like to take advantage of the optimization mentioned in the manual as these files will be quite large even when split.

Also, there are parts of the application which still require the BX parameter. (working to remove those)  When the BX parameter is on, the logic inside *obj\multifile.pvc breaks when using KGN or the key definition. I've got a hack to disable the parameter when using the multi-segmented file, but thought there might be an explanation or fix for this?

Thank you,
Jeff

5
Programming / Converting UTC to local time
« on: December 22, 2020, 11:54:22 AM »
Hello,
I have a situation where I need to convert a supplied UTC date and time to the user's local date and time for display.  These may be dates in the past or future.  I am unsure of the best method to do this because of the potential for the user's local time zone to use daylight saving time. I am aware of TCB(44) and TCB(45), but those only apply to the current date. To properly convert the time, I need to know if the user's local time zone will observe (or had observed) DST on a specific date (or if their time zone even observes DST).

Does anyone have any tips, tricks, or routines that can properly handle this?

Thanks,
Jeff

6
Thin Client/WindX / Does ObjectID user object function over WindX?
« on: May 04, 2020, 01:09:46 PM »
Does the ObjectID user object method feature work over a WindX connection? I am having trouble attaching my custom object.
When I run the following program locally, it prints the objectID for my user object and sets the value. When ran over a WindX connection, it prints 0 (zero) and gives an error 88.

Code: [Select]
0010 BEGIN
0020 LET X=10
0030 GRID X,@(1,1,60,10)
0040 LET O=NEW("myGrid",X)
0050 LET X'OBJECTID=O
0060 PRINT 'LF','LF',X'OBJECTID
0070 X'SETVALUE(1,1,"hi")
0080 INPUT "Press Enter",*
0090 GRID REMOVE X
0100 END

myGrid.pvc is a clone of the example provided in the manual at https://manual.pvxplus.com/PXPLUS/properties/objectid.htm
I am using PxPlus 15.10 on the server and WindX.

Thank you,
Jeff

7
Nomads / Controlling the display of an info tip (tooltip)
« on: March 10, 2020, 04:53:35 PM »
Hello,

Is it possible to control the display of the hover info tip function through code or the *tooltip program? For example, can I display a tip on a button click event instead of a hover? Can the info tip display time be controlled? Is it possible to have the tip window remain visible until it is clicked?

Best Regards,
Jeff

8
Programming / Setting viewer font size on first page
« on: December 19, 2019, 02:50:02 PM »
Hello All,
I am experiencing an odd behavior from the *Viewer*, but perhaps I am doing something wrong.

When my report output falls within certain widths, the font displayed on the first page is smaller than the rest of the report pages.  I have created a small example program to demonstrate the behavior.  When you enter 99 for the maximum column size, the pages are identical. However, when you enter 100 for the maximum column size, the first page displays with a smaller font size as shown in the attached image.

Is this expected behavior for the viewer or am I missing something? I do not see the same results when printing to *PDF* or *WINPRT*. I am using PxPlus 2019 and 2018. Any ideas what may be going on here?

Thanks,
Jeff

Code: [Select]
0010 begin
0020 let c=100
0030 input edit "Maximum Columns: ",c
0040 for c; let x$+=mid(str(c),-1); next
0050 open (1)"*viewer*;onclose;margins=500:500:500:500;Columns="+str(c)
0060 gosub PrintTest
0070 close (1)
0080 open (1)"*PDF*;margins=500:500:500:500;view"
0090 gosub PrintTest
0100 close (1)
0110 end

0120 PrintTest:
0130 print (1)'font'("Arial",-12),'DF',
0140 print (1)'font'("Arial",mxc(prn)/c),'DF',
0150 print (1)'text'(@x(0),@y(1),@x(c),@y(2.5),x$),
0160 print (1)'text'(@x(0),@y(4),@x(40),@y(5.5),"Page 1"),
0170 print (1)'FF',
0180 print (1)'text'(@x(0),@y(1),@x(c),@y(2.5),x$),
0190 print (1)'text'(@x(0),@y(4),@x(40),@y(5.5),"Page 2"),
0200 return

9
Language / Error 49
« on: October 10, 2019, 09:22:49 AM »
Hello,
I receive an error 49 at line 0070 when the IT system parameter is enabled.  Is this a bug or am I using the LIKE operator improperly? I have switched my statements to use MSK() instead and all is working, but I am wondering the cause of the error.

The TL parameter is off. I have tested in PxPlus version 15 and 16.

Thanks,
Jeff

Code: [Select]
0010 BEGIN
0020 SET_PARAM 'IT'=0
0030 WHILE (X++<2)
0040 LET R$="[0-9]"
0050 LET V$="2"
0060 IF MSK(V$,R$) THEN PRINT "true" ELSE PRINT "false"
0070 IF V$ LIKE R$ THEN PRINT "true" ELSE PRINT "false"
0080 SET_PARAM 'IT'=1
0090 WEND
0100 END

Code: [Select]
-:run
true
true
true
0070 IF V$ LIKE R$ THEN PRINT "true" ELSE PRINT "false"
Error #49: <*> Internal program format error <*>
Current program is <unsaved>, line 70
1:

10
Nomads / Grid cell validation logic and CellTag
« on: September 30, 2019, 12:45:12 PM »
Hello,
I am using PxPlus 2019. I have a Nomads panel containing a grid with cell generic validation and formatting logic defined in Nomads (such as a date validate/format).  My desire is to use the CellTag value to make logic decisions inside the validation and formatting logic. However, Nomads appears to always send the tag field from the grid control and not that of the individual cell that fired the validation/format event. I don't want to use the grid tag, because not all cells contain the same CellTag data.

Is there something I can do to cause Nomads to send the cell tag and not the grid tag? If not, is there another way to pass extra cell related data to the validate/format grid cell logic at runtime?

Best Regards,
Jeff

11
Hello All,
I am experiencing an annoying behavior when attempting to move a dialogue form with a custom (or no) title bar over a slower client/server connection such as a VPN. The WindX application appears to respond slowly in recognizing the release of the mouse button. As a result, the dialogue continues to follow the mouse for a second or two. Has anyone else experienced this? Is there a system parameter or network setting which may alleviate this behavior?

I can reproduce the behavior on Windows 7 and 10 for dialogues with no title bar and a custom title bar. It occurs on my forms as well as the various PxPlus forms with a custom title bar such as the IDE, GUI, and Nomads Library Object Selector. I am using PxPlus and WindX 15.10 over a CS Host connection. This behavior does not occur on standard forms with the default Windows title bar.

Here is a short video showing the behavior on Windows 10: https://youtu.be/3JYrjtke-gI

Best Regards,
Jeff

12
Web Services / Custom content for http error responses
« on: March 09, 2019, 02:18:01 PM »
I have a REST web service running under the PxPlus Web Server 15.10.0001. I would like to have custom content when the service responds with an HTTP error code. No matter what I try, the web server responds with the following standard HTML message after setting %Exit_Code=400.
Code: [Select]
<html>
    <head>
        <title>400 Bad Request</title>
    </head>
    <body>
        <h1>400 Bad Request</h1>
        <hr>
        <p>The Requested URL is not properly formed.
            <br>
Method: GET  URI:/restapi.pvp  ARGS:
        </p>
    </body>
</html>

How can i override this behavior to force a response with my own content? I tried adding a record to the *web\websrv.tpl with no luck.

My web service needs to respond with something like:
Code: [Select]
{
  "errors": [
    {
      "status": 400,
      "code": 4077,
      "title": "INVALID FORMAT",
      "detail": "invalid query parameter format",
      "source": {
        "parameter": "date",
        "example": "2019-03-09"
      }
    }
  ]
}

13
Thin Client/WindX / Strange display when using *browser with WindX client
« on: November 28, 2018, 02:33:57 PM »
Hello,
I have designed a nomads panel containing a *Browser object. The object works exactly as expected when used in a local PxPlus process. However, when I connect to the same system via *CS/host using WindX, the same panel appears to lose its font setting. The text is extremely small. Even the text in the right-click popup menu is small. I am using PxPlus 2017. Can anyone point me to the cause of the problem? Am I doing something wrong?

Thank you,
Jeff

14
Hello,
Does anyone have an example of how to use the headers or postData parameters in the *browser BeforeNavigate2() event? I'm declaring them as an object, but they never contain data and setting the values appears to be ignored.

I have created an object using this example and have no issues using the url variant in this manner. Are postData and headers usable objects?

Best Regards,
Jeff Wilder

15
Programming / WAIT FOR EVENT example - Error 49
« on: July 17, 2018, 01:36:46 PM »
Hello,
Does anyone have an example of how to properly use the WAIT FOR EVENT directive? I can't find anything by searching the manual or the forum.
I have a program that sets up several events and should then sit and wait for one of them to occur. When I hit the WAIT FOR EVENT directive, I receive an error 49. (PxPlus v14.00).

Here are some very simplified examples which both fail on line 60:
Code: [Select]
0010 BEGIN
0020 DEF OBJECT s,"*system"
0030 s'SetTimer(5)
0050 ON EVENT "TimeOut" FROM s PREINPUT 101
0060 WAIT FOR EVENT
0070 PRINT CTL
0080 DELETE OBJECT s
0090 END

Code: [Select]
0010 BEGIN
0020 DEF OBJECT s,@(0,0,70,20),"Shell.Explorer.2"
0030 LET x=NEW("TestEvent")
0040 ON EVENT FROM s PROCESS x
0050 s'Navigate2("http://www.msn.com")
0060 WAIT FOR EVENT
0070 DELETE OBJECT s
0080 END

Thanks,
Jeff

Pages: [1]