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 - PxPlus

Pages: 1 ... 5 6 [7]
91
In text mode you can set the system parameter 'IM' to preserve the Insert Mode state between inputs.

However you can also read byte 19 (bit $04) of the FIN to determine if Insert mode is active. If you want to force Insert mode to be active you can PREINPUT the negative CTL value associated with INSERT mode (-1009).

For Example:

    IF and(mid(fin(0),19,1),$04$)=$00$ preinput -1009

In Windows/GUI mode this is handled by the individual controls.

92
The path name used in a 'PICTURE' mnemonic when printing under WindX will depend on your Host server and OPEN statement.

If you are running on a WINDOWS host/server and you open with just "*winprt*" you are opening a channel to the servers Windows print server thus the path name should be relative to the host application and where it is running.

If you are running on a NON-Windows host/server and you open with just "*winprt*" or if you open with "[wdx]*winprt*" regardless of the type of server you are using, then the path name in the 'PICTURE' mnemonic needs to be relative to the Windx session.

For Example if you issue OPEN (1) "[wdx]*winprt*" and issue a PRINT (nn) 'PICTURE'(...,"xxx"), the pathname "xxx" will be forwarded and resolved based on the current directory of the WindX workstation.

93
If you want to create a button on the fly and have Nomads assign it to a statement label/perform, assign it to a set CTL value and then using the CTL's definition option in NOMADS define the logic you want executed.

For example in your program you can create the button with:
    BUTTON 100,@(10,10,10,2)="My Button"

In the NOMADS designer, select CTLS from the toolbar or User CTLS from the Utility menu option and define your logic for CTL 100. 

94
When using bitmaps on tree views, all bitmaps need to be the same size. The first bitmap used in a tree-view defines the default size for all subsequent bitmaps.

Generally all ProvideX/PVX Plus internal bitmaps are 20 pixels wide by 16 pixels high. If you are going to make your own bitmaps to be used in conjunction with the internal images, you should use the same size. 

95
When using the PxPlus program *win/registry to read the Windows registry it may be necessary to provide which registry you want to access.
The calling sequence for the *win/registry program is:

Code: [Select]
CALL "*win/registry", Category$, Key$, Field$, Data$, Type, Registry

64 Bit Windows actually contains two registries, one for 32 bit programs and one for 64 bit programs.  Generally updates to one will automatically be applied to the other but in some instances OS controlled values will exist in only one of the two registries.

Since PxPlus it is a 32 bit program, it accesses the 32 bit registry by default.  Because of this, if you are looking to read a registry entry that only exists in the 64 bit registry you will need to specify 64 in the Registry field to obtain the values.

96
Tips and Techniques / How to find the number of fields in a string
« on: May 30, 2018, 04:34:27 PM »
If you have a string with a series of delimited fields such as:
  "a,b,c,d,e,f,"

You can figure out the number of fields in the string by using the POS function to count the number of delimiters.

  Count = POS("," = <string>,1,0)

Giving the POS function a increment of 1 with an occurence number of zero causes it to return the count instead of the position.

The only thing to watch for is if the string does not have a trailing delimiter such as "a,b,c" -- in this case the number will be one too low.

97
FAQs / Common misconception about which cell in a GRID was changed
« on: May 30, 2018, 04:32:15 PM »
When a cell in a grid changes you need to use the row and column numbers returned the GRID READ directive to determine which cell changed.

The properties 'CurrentRow and 'CurrentColumn don't necessarily reflect the changed cell - they indicate which cell the input is currently positioned at.

Consider the following: If you are in cell 1,1 and enter some data then use the mouse to change to cell 2,3 ; the grid will generate an ON CHANGE event. When you issue a GRID READ you will get column 1, row 1, and the new data. If, however, you were to check current row/column they would say 2,3 which is where you are now positioned.

When using NOMADS the values returned from the GRID read will be in XXXXX.ROW and XXXXX.COLUMN where XXXXX is the name of the grid.

Note that the GRID READ is queued internally -- that is if the user types quickly and changes multiple cells the system will queue up multiple events and row/column values for each.

98
FAQs / Why does SELECT with opened file seem to miss records
« on: May 30, 2018, 04:28:10 PM »
When using a SELECT with a file that you have manually opened in your application it is important to remember that the SELECT will start from the current position in the file UNLESS you include a BEGIN or END clause on the SELECT directive.

Including a BEGIN forces the system to reposition to the specified key prior the start of the SELECT loop.

To assure processing the complete file use BEGIN "". An End is not needed.

99
Windows handles screen repainting as a low priority task. Paint requests always are sent to the end of the queue and even then the request to draw/paint the screen is only done when the application itself asks for the next message from the event/message queue.

Generally the Windows version of PVXPlus will refresh the screen whenever it goes to user input, a Wait is issued, or 1000 instructions (whichever comes first).

If you are calling external DLLs they may not have a message/event processing loop to service Paint requests thus your screen may not get repainted.

As a general rule of thumb we suggest that you issue a dummy WAIT 0 prior to calling a DLL which will at least help by forcing the system to process all paint requests its screen prior the DLL call. 

100
FAQs / Problems using WINDX telnet sessions on SUN systems
« on: May 30, 2018, 04:03:13 PM »
SUN (among other) systems require special configuration options when using WindX to connect via Telnet.

The following two configuration setting should be enabled:

  Translate CR
  Send CR as LF

Without these two settings enabled you can receive a variety of error reports due to transmission errors

101
FAQs / What font is used for Check boxes and Radio buttons
« on: May 30, 2018, 04:02:14 PM »
When drawing check boxes and radio buttons the system does not use the same font (STDGRAPHICFONT) as is used within buttons and list boxes to draw the text.

Instead the system uses the current graphical text font (the font used with the 'text' mnemonic).

This is so that the text portion of these controls, which is visually external of the control (at least from the users perspective), is consistent with other prompts/text on the screen.

102
FAQs / STP function change can lead to unexpected results
« on: May 30, 2018, 03:56:04 PM »
The STP function can now accept string strip types operators.

The problem can be seen on a line entered as:

    R$=STP(R$,$0A$)

The system syntax checks accepts the line however during execution it failed with an error 26.

At issue is that the STP function accepts a string strip type ("L", "R", "C", "A", or "B") and as such the syntax of a STP function can be

    STP (String$, String$)

However you will get a run-time error if the second string is not one of the possible stripping forms.

This can prove difficult to detect and debug due to the fact that forgetting to include a strip type value would be a common typing mistake.

103
FAQs / Why the Viewer may not be able to locate image for display
« on: May 30, 2018, 03:54:04 PM »
It is possible when using a PREFIX to have a situation where printing an image to *winprt* will work whereas just changing the output to *viewer* will not.

When you open/print to *winprt* the printing is done in your current process whereas when you use the viewer the printing is done from a spawned session. This can cause a problem when the spawned session does not have the same PREFIX due to some logic in your START_UP or elsewhere in your application.

For example if you had a file "C:\MyApp\junk.bmp" which had an image in it and you issued:

    PREFIX "c:\MyApp\"

You could then open "*winprt*" and issue

    PRINT (ch) 'PICTURE'(100,100,400,400,"junk.bmp")

This will work fine, however if you open *viewer* the PRINT won't work because the Viewer is in spawned task. Only if the PREFIX is set in your START_UP program would the viewer be able to find the image.

To avoid this problem use the full pathname in the 'PICTURE' mnemonic or if using PxPlus use the PTH("image") function to return the full pathname as in:

    PRINT (ch) 'PICTURE'(100,100,400,400,PTH("junk.bmp"))   

104
FAQs / Cannot open files using NFS between Unix/Linux systems
« on: May 30, 2018, 03:42:46 PM »
If you happen to be trying to open files/programs across an NFS shared drive, check the value in RET for 272. This error code (EBUSY -- Device/File busy) will be returned by the operating system should the 'lockd' background daemon not be installed and active on the host Unix server.

This can happen if you only install/activate the NFS server modules and not the standalone 'lockd' daemon which is part of the NFS-Utils installation.

On Unix/Linux you should be able to check to see if the lock daemon is running by issuing a command similar to this:

   ps -leaf | grep lockd   

105
FAQs / What causes a CTL -1017
« on: May 30, 2018, 02:49:49 PM »
A CTL -1017 is used to indicate that the input is to logically restart. That is the input position is to be placed at the first character of the input and if the next keyboard input is a printable character (non-edit key), the input will be cleared and a new input accepted. If the next keyboard input is a edit key (arrow, Insert, Delete, Home, End, etc...) the system will start the input edit process.

This CTL value is normally generated by the RSTART key as defined in the terminal definitions however it is also generated internally by ProvideX/PxPlus by an INPUT EDIT directive.

When an INPUT EDIT directive is executed the system will load the input buffer with the current value of the variable then insert a CTL -1017 into the input queue. 

Pages: 1 ... 5 6 [7]