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 - Ken Sproul

Pages: 1 2 [3] 4
31
Language / Re: bsy/tim=0
« on: March 02, 2021, 04:04:23 PM »
No real harm, but giving it a second would prevent unnecessary busy errors when someone tries to access a PO that just happened to be extracted but will be released in less than a second during say an update process.  Just something to consider.

32
Language / Re: Serial data stream
« on: February 27, 2021, 10:24:01 AM »

Don't know if it will work, but you could try:
def sep($04$)


You can capture the existing separator list with seps$=sep(*)


33
Language / Post Open Embedded IO Procedure with Direct Access File Path
« on: February 12, 2021, 05:11:57 PM »
When using an embedded IO procedure with a file that is being opened as the result of the direct access method in a read statement (see example below), is there any way to know that the file is being opened by direct access?


Example:
read ("custfile",key=custnum$)


34
Programming / Re: Converting UTF-8 data from web service
« on: September 28, 2020, 06:14:39 PM »
Loren,


Try cvs(x$,"UTF8:ASCII").  Works for me on pxplus v15.10.

35
Registration and Setup / Re: User Seats
« on: July 28, 2020, 06:19:10 PM »
The additional seat may be the connection process on the server (nthost, etc.).

36
Programming / Re: Open file explorer to specific directory?
« on: July 22, 2020, 06:59:29 PM »
Try using system_help with the folder you want to open +"\.":
For example, this should open the current working directory of the pxplus server or windx session:
system_help lwd+"\."

37
Programming / Re: Getting Text of a Program Line Number
« on: June 02, 2020, 04:01:14 PM »
Were you having trouble with lst(pgm(x,tcb(12))) where x is the line number?  This has always worked for me unless the program is password protected.

38
Language / rtf multi_line behavior change
« on: April 15, 2020, 05:49:54 PM »

We noticed a change in rtf behavior between versions 12.50 and 15.10 when pasting a range of cells copied from excel.  The cells in excel do not have any borders.  However, in v12.50 the cells have borders after they are pasted into an rtf multi_line, whereas in v15.10, they do not.


While this appears to be a bug fix, it was also a nice "feature".  Is there anything we can do to bring this "feature" back (i.e. object properties, parameters, etc.)?


39
Programming / Re: List box column sort
« on: April 10, 2020, 02:46:15 PM »

Michael,


Try lv'SortOnHdrClick=1.  ;)


40
Language / Re: INPUT in a cron job
« on: December 04, 2019, 04:49:48 PM »
I believe a background process will quit when it hits an input statement if there is no "input" file/device associated with it.  If you are not redirecting input to /dev/null (i.e. < /dev/null), see if that helps.

41
Programming / Re: mailto attachment
« on: November 11, 2019, 03:10:42 PM »

I wanted to do the same thing a while ago, and ended up using the outlook executable with switches to accomplish what I wanted.


invoke %wdx$+"outlook.exe /a "+quo+file_path$+quo+" /m "+quo+to_address$+"&subject=The Subject"+quo


Hope this helps!


42
Programming / Re: How to speed up creating a Tree View List Box
« on: September 20, 2019, 06:17:23 PM »

Dave,


With Mike King's help I was able to dramatically improve performance by doing the following:
1. Pre-sort the data using a memory file with a key definition that defines the each level as fields
2. Build a load string from the memory file.
3. Turn off the list box sorting feature ('sort=0).
4. Loading the data using the string.
5. Turn the list box sorting back on ('sort=1)


Mike explained that the performance was due to an inefficient built-in sorting mechanism with the windows list box control. So far we haven't exceeded the memory limits and we've loaded a lot more than 80k records with up to 6 levels.


43
Programming / Re: Selecting all list_box entries
« on: September 20, 2019, 04:03:53 PM »
Mike, maybe you could add a select all method that does the same thing as ctrl-a.  :)

44
Programming / Re: Selecting all list_box entries
« on: September 19, 2019, 09:33:25 PM »
If the data in the list box is large, reading and writing it to select everything may be time consuming, especially in a client/server environment.  An example with 5,000 items in the list using an alternative method is shown below.  Un-remark line 220 to see the difference in time using the read/write method.  In my tests over a client/server internet (not intranet) connection took almost 4 times longer to select all of the items using the read/write method.

0010 begin
0015 print 'CS',
0020 precision 8
0025 list_box 10,@(10,5,40,10),opt="#"
0030 print "Loading ... ",; wait 0; t=tim
0035 for i=1 to 5000
0040 list_box load 10,0,str(rnd(10000):"0000")+str(rnd(10000):"0000")
0045 next i
0050 print @(0),"elapsted seconds:",(tim-t)*3600; wait 0
0055 print "Selecting ... ",; wait 0; t=tim
0060 selected=fn_lb_select_all(10)
0065 print "elapsed seconds:",(tim-t)*3600; wait 0
0070 list_box goto 10
0075 obtain "Press Enter to end",*,'LF'
0080 list_box remove 10
0085 end

0200 def fn_lb_select_all(local id)
0205 local items=id'itemcount,i,p$,v$
0210 if items then {
0215 list_box hide id
0220 ! list_box find 10,0,x$; list_box write 10,x$; goto 0235
0225 for i=items to 1 step -1; p$+=",selectitem",v$+=sep+str(i); next i
0230 id'_proplist$=p$(2),id'_propvalues$=v$(2)
0235 list_box show id
0240  }
0245 return items
0250 end def

45
Thanks Keith and Devon.  I thought at least the end clause was evaluated each time.  This is actually good news, because I was trying to avoid complex expressions in the end clause for performance reasons, but since it's only evaluated once, I don't have to worry about that.

Pages: 1 2 [3] 4