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

Pages: [1]
1
Wish List / Re: Weeknumbers in multiline-calendar
« on: September 06, 2023, 08:30:48 AM »
Apparently ISO8601 weeknumbers are not always a thing outside of Europe (https://en.wikipedia.org/wiki/Week#Other_week_numbering_systems).

Since the calendar / datepicker looks like a Windows control I was hoping Windows could just take care of it, somehow.

2
Wish List / Re: Weeknumbers in multiline-calendar
« on: September 06, 2023, 06:59:31 AM »
I was expecting Outlook to use the regional settings in Windows, but it looks like the regional settings only has a first day of the week option.

Outlook has it's own "first week of the year" setting which defaults to "first week with 4 days". Possibly based on other regional settings such as my country?

3
Wish List / Weeknumbers in multiline-calendar
« on: September 05, 2023, 09:59:48 AM »
Would it be possible in the future to add weeknumbers to the calendar you get add to multilines, just like in Outlook? See attachment for example.

4
Nomads / Re: copy and pasting from the internet
« on: June 11, 2020, 06:07:25 AM »
My prefered option would be:
Strip all non-printables from the start.
Strip all non-printables from the end.
If possible: strip most non-printables from the data, with the exception of tabs and linefeeds, replace those with spaces.
If not possible: just strip all non-printables.

Don't truncate after first non-printable.

I don't know how I feel about changing the clipboard.

And enable by default. I can't think of a situation where I want users to enter tabs or linefeeds in our data (on single line input).

5
Nomads / Re: How to exit a panel with an <Enter> key
« on: January 29, 2020, 03:44:42 AM »
Add a 0x0 size button and enable "Default Push Button" on the Attributes tab.

Default Push Button
Defines button as default. Pressing the Enter key will execute the On Change logic for this button. There can only be one default push button per panel.

6
Language / Re: Accepting variable number of arguments in a function call
« on: December 12, 2019, 09:32:33 AM »
TCB(20) tells you how many arguments there are, but it doesn't check for non-numbers.
STK(PROPERTIES) tells you how many arguments there are and the type of each argument (https://manual.pvxplus.com/PXPLUS/functions/stk.htm).

Using that you can create something like this:
Code: [Select]
00010 !
00020 DEF CLASS "vararg_test"
00030 FUNCTION test(*)TEST
00040 END DEF
00050 !
00060 !
00070 TEST:
00080 LET properties$=STK(PROPERTIES)
00090 IF properties$="" THEN EXIT 23
00100 IF POS("Nn"^properties$)>0 THEN EXIT 26
00110 !
00120 LET properties_count=LEN(properties$)
00130 LET iolist$="IOLIST "
00140 FOR i=1 TO properties_count
00150 LET iolist$+="param"+STR(i)+","
00160 NEXT i
00170 LET iolist$=CPL(STP(iolist$,"R",","))
00180 !
00190 ENTER IOL=iolist$
00200 DIM params[1:properties_count]
00210 READ DATA FROM REC(iolist$) TO params{ALL}
00220 !
00230 FOR i INDEX params{ALL}
00240 PRINT i,params[i]
00250 NEXT i
00260 RETURN 1
00270 !

->x=new("vararg_test")
->x'test(123)
 1 123
->x'test(11,22,33,44,55)
 1 11
 2 22
 3 33
 4 44
 5 55

7
Language / Re: Excel object commands issue
« on: November 07, 2019, 03:55:29 AM »
The function expects a rangeobject, not a rangestring. Replace "Chart!A1" with *excel_obj'range("Chart!A1"):
let TABLE=TABLE_CACHE'CREATEPIVOTTABLE(*EXCEL_OBJ'RANGE("Chart!A1"))

8
Programming / Re: Copy or duplicate excel sheet
« on: October 28, 2019, 10:10:58 AM »
->def object excel,"Excel.Application"
->workbook=excel'workbooks'open("filename.xlsx")
->workbook'worksheets("Origin")'copy(*,*workbook'worksheets("Final"))
->excel'visible=1

By default you'll end up with a new worksheet named "Origin (2)".

9
Programming / Re: Determining Printer from Print Channel
« on: September 26, 2019, 03:32:24 AM »
FIN(printer_channel,"DEVICE") should give you your printer.

-}open (unt)"[lcl]*winprt*"
-}? fin(lfo,"device")
\\SBS01\Printer 6 - Administratie Boven

10
Programming / Re: JSON files
« on: August 23, 2019, 03:58:37 AM »
Replace
LET SMPRICE$=DIM(LIST EDIT SMPRICEJSON${ALL})
with
LET SMPRICE$=DIM(LIST SMPRICEJSON${ALL})

11
Web Services / Re: Curl Syntax
« on: May 23, 2019, 03:48:59 AM »
-O tells curl to download it to the current directory using the original filename (https://curl.haxx.se/docs/manpage.html#-O). Replace it with "-o /path/to/local/file" (https://curl.haxx.se/docs/manpage.html#-o).

For your second question, Google gave me 2 options:
Use -l to get the directory listing first, then use that to get all the files (https://curl.haxx.se/docs/manpage.html#-l).
Use something other than curl.

12
Programming / Re: *web/email is very slow
« on: September 19, 2018, 03:13:45 AM »
Does your email have attachments and what PxPlus version are you using? The way attachments got converted to base64 was pretty slow pre version 13.

Pages: [1]