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 ... 59 60 [61] 62 63 ... 66
901
Programming / Re: COMPARE A FILE WITH HIS DEFINITION IN NOMADS
« on: August 31, 2018, 09:24:52 AM »
One other thing you might consider if using PxPlus 2017 or later is to include OPT="VALIDATE" on the open of the files.  This will then include the validation rules on the file IOLISTs which means even changes such as numeric sizes, field lengths, and validation tables will be compared.

902
Programming / Re: COMPARE A FILE WITH HIS DEFINITION IN NOMADS
« on: August 30, 2018, 01:34:56 PM »
If all you want to do is match the IOLISTs and file key definitions the easiest solution is to create a new temporary file from the Nomads Data Dictionary definition then compare:

  • FIN(nn,"KEY_DEFINITION")
  • IOL(nn:*)
  • IOL(nn:^) If present
  • IOL(nn:key) If present

To create a temporary file from the dictionary definition use:

CALL "*dict/dd_updt;Update_Physical", table_name$, temporary_file_path$,"",errmsg$

903
Language / Re: distinguish errors 0
« on: August 30, 2018, 08:47:01 AM »
The reporting of error 0, like many other error conditions, is based on the OS error code returned to PxPlus.  The most common OS error that will generate an error 0 is "Permissions Denied" which is all the OS tells is about the operation we performed.

In your case, you could test the value in RET or the contents of MSG(ret) to see if it can provide more details.

Another option is to use the value in STK(-1) within your error handler to obtain the line number where the error occured and then LST(PGM(stno, -1)) to get the actual line of code.


904
Language / Re: Radio Button Logic
« on: August 29, 2018, 02:03:02 PM »
Just an update on this issue.  We got access to the panel James was having trouble with and noticed that a non-primary radio button (a button with an index other than one) had different On Focus logic associated with it.  This logic overrode the logic associated with the primary button (index 1) of the radio button group.

This type of situation can happen by creating a radio button, assigning logic to it, then using CTRL-D (or copy/paste) to duplicate it.  If you then rename this duplicate button back to the original group and set its index to some other value the system leaves the original logic on the duplicate button and it ends up overriding the primary buttons logic.  As this duplicate button is not index 1 you cannot edit/view the logic assignments in the Nomads designer.

We have added logic for PxPlus 2019 to avoid this from happening in the future.



905
Nomads / Re: grid button
« on: August 29, 2018, 01:23:54 PM »
This sounds like you may have SignalOnExit set which will generate a signal whenever you exit a cell.

906
Programming / Re: looking for a cancel request
« on: August 29, 2018, 09:23:01 AM »
If I understand your question the problem is that when running the application you want to receive some form of signal from the user to stop.   The challenge is doing this without having to "poll" the workstation looking for input.

One thing you could try would be to create a button whose CTL event is -1001 as this emulate a ESCAPE/BREAK being pressed.  You can thus simply create a small window in the center of the screen with this button then have a SETESC in your code trap the event to allow for an orderly exit.  If desired you could also include an animated GIF on the window to show progress to your user.

Personally though I would use the PxPlus progress bar utility and issue a call to it on a regular basis in your logic.  This provides not only a means to do an orderly shutdown but also a visual indication that work is being done.  There are two (2) options with PxPlus progress bars, one that allows you to display the percentage complete and one that just provides a ongoing progress display.  If you know how much of the work has been done I recommend the former option (the percentage complete bar).

BTW: It should be noted that the PxPlus progress bar has built-in logic to only update the screen every few seconds instead of every time it is called.  This helps overall performance which can be impacted by repeatedly screen updates.


907
Language / Re: Radio Button Logic
« on: August 28, 2018, 10:28:20 AM »
I tried this here with a Radio Button group "after" the folder and I got the Focus event (tabbed or tabless)
I also tried this with a radio button group on another tab and it too seemed to work.

I created a panel with a folder with a radio button group just after the folder then added two sub-panels to the folder.  The radio button group had an On Focus event to execute PRINT "Focus".
When I pressed tab on the last control on any of either sub-panel focus went to the radio button group outside of the folder and printed "Focus" on the panel.

908
Programming / Re: MULTI_LINE READ (RTF multi_line) crashes Pxplus V15
« on: August 28, 2018, 09:15:51 AM »
I just ran these lines of code on our SUSE Linux server here and did not encounter any problem
(Windows 10, WindX PxPlus 2018 build 0002, SUSE 64 bit PxPlus 2017 build 2)

Problems like this should be reported to either our support desk if you purchased from us, or to your reseller so they can assist you and work with us on a resolution.
Once the nature of the issue has been determined we can provide an update here on the forum as appropriate.

909
Language / Re: Radio Button Disabling
« on: August 27, 2018, 04:08:52 PM »
Setting the Value$ to "" seems to work for me.

Code: [Select]
print '4D','B?','CS',
rb=10
radio_button rb:1,@(10,10,10,1)="One"
radio_button rb:2,@(10,11,10,1)="Two"
radio_button rb:3,@(10,12,10,1)="Three"
button 11,@(10,14,10,2)="Reset"
while 1
obtain (0,siz=1)'ME',*,'MN'
if ctl=4 or eom=esc then break
print "Ctl ",ctl," received"
if ctl=11 then rb'value$=""
wend
I can select any of these buttons and then press the Reset to clear.

910
Language / Re: Radio Button Disabling
« on: August 27, 2018, 10:21:32 AM »
Regarding your questions:
  • The easiest way to disable/enable all radio buttons in a group is issue a DISABLE CONTROL nnn (or ENABLE CONTROL nnn) where nnn is the radio button CTL value. 
  • To uncheck try setting the 'Value$ property to ""

911
Registration and Setup / Re: Error #99
« on: August 24, 2018, 04:51:06 PM »
This sounds like your activation keys are for a earlier release or you have not registered your product yet.

When you first install PxPlus you are provided a temporary installation keys which allows you to run for 30 days.  There are generally two keys provided, one which unlocks basic functionality which is enough to get the system up so it can register and a second key that adds a number of PxPlus exclusive features.

Either the keys you are using are for a prior release, or you are running on a single temporary installation key and have not registered your product.

912
Programming / Re: Sort By Header Question
« on: August 23, 2018, 09:48:04 PM »
Not certain why you need either signal all or on focus.
Setting SortOnHdrClick to zero generates a normal grid change event when a column header is clicked as these are treated like buttons.

913
Language / Re: Radio Button Logic
« on: August 23, 2018, 02:44:37 PM »
Events are only associated with primary radio button of a group -- that is index 1.

In addition the FOCUS event treats the focus to any of the radio buttons in the group together, that is it fires the logic assigned to the on focus logic of the primary button when any button gets focus HOWEVER changing focus from button to button within the group is not fire an on focus event.

So for example if I have three radio buttons:

(o) Visa
(o) MasterCard
(o) Amex

If I put focus from any control outside of the radio button group to any of the radio buttons I will get the on focus event, but if once in group and focus is for example on Visa, changing focus to Amex or MasterCard will no fire an on focus event.

All buttons in a radio button group are considered as a single control.

914
Programming / Re: Sort By Header Question
« on: August 23, 2018, 02:10:12 PM »
Generally a Grid will sort in under a few seconds assuming a reasonable number of rows.  On my local PC a grid with 1000 rows sort virtually instantaneously whereas 5000 takes about 3 seconds.  Sort time will vary based on the randomness of the data.

You can also handle the sort request yourself and display something for the duration or as shown in the example below change the column header to RED for the duration.

Code: [Select]
0010 PRINT 'CS',
0020 GRID 10,@(5,1,40,10),SEP=","
0030 LET x=10
0040 LET x'sortonhdrclick=0
0050 FOR i=1 TO 10000
0060 GRID LOAD 10,0,i,STR(RND(1000)*i:"00000000")+",Item "+STR(i)+","
0070 NEXT i
0080 PRINT "Ready to sort"
0090 WHILE 1
0100 OBTAIN (0)*
0110 IF CTL=4 OR EOM=ESC THEN BREAK
0120 IF CTL<>x THEN CONTINUE
0130 GRID READ x,col,row,eom$
0140 IF row<>-1 THEN CONTINUE
0150 LET x'colno.row.backcolour.$=STR(col)+SEP+STR(row)+SEP+"Lite Red"+SEP
0160 WAIT .1 ! orce refresh
0170 IF x'sort=col THEN LET x'sort=0-col ELSE LET x'sort=col
0180 LET x'colno.row.backcolour.$=STR(col)+SEP+STR(row)+SEP+"Default"+SEP
0190 WEND

915
ODBC / Re: Extract on ODBC Sql Server
« on: August 22, 2018, 02:58:23 PM »
What are your [ODBC] configuration settings in the system INI file and what options do you have in the OPEN for the connection?

Pages: 1 ... 59 60 [61] 62 63 ... 66