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 ... 58 59 [60] 61 62 ... 65
886
Language / Re: XEQ() question
« on: September 11, 2018, 09:14:58 AM »
Rob, I was doing a review of this issue and had a thought.

Why are you passing two arguments to the called program?

Why not just pass filename$ (which is LOCAL) and have the called program simply change that variable to the extension and return it?  This avoids needing a extra variable and having to figure out what would be safe to use.

887
Language / Re: XEQ() question
« on: September 07, 2018, 03:17:04 PM »
There is no way to 'localize' XEQ parameters however for your example I have a couple of suggestions, either of which should yield what your want:

  • Make your function into a multi-line function and use LOCAL there to localize the variables.
  • Replace your whole function with def fnget_extension$(local filename$)=arg(sub(filename$,".",sep,-1),2)
    Basically the above replaces the last "." with a field separator then asks for the second argument.  If no dot was present there will be no second arg thus the logic will return "".

888
Wish List / Re: ODBC driver that supports files with UTF-8 data
« on: September 06, 2018, 02:52:12 PM »
The current ODBC driver returns whatever data you put in the database.  It is up to the application to know which character set the data is in.

For example if you use our current SQL ODBC driver from something like Open Office, you can simply tell the system that the data source uses UTF-8 for its data and everything is handled automatically.  This is no different than if your files contained data using other character sets such as Thai, Greek, or Cyrillic.

Unfortunately the most common program people use for ODBC access, Microsoft Excel, does not appear to offer a Character Set option when importing data from an ODBC data source so you need to use some other utility.  Excel itself does support opening/importing files with different character sets and provides character set 65001 as an option, however the MS Query tool does not appear to provide any character set selection functionality.

889
Programming / Re: error 17 with empty json objects
« on: September 04, 2018, 10:27:32 AM »
You must be running PxPus 2016 or earlier as this was addressed a few years ago.
Please update your system and try again.

890
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.

891
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$

892
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.


893
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.



894
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.

895
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.


896
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.

897
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.

898
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.

899
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 ""

900
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.

Pages: 1 ... 58 59 [60] 61 62 ... 65