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 - Thomas Bock

Pages: 1 [2] 3 4 ... 12
16
Programming / Access IOL variables as properties
« on: November 10, 2023, 05:03:32 AM »
I'm trying to save the variables of an iolist as a property with a dynamic approach. The purpose is to retrieve extermal parameters only once without the need to adjust anything when new parameters are introduced. So far I had no luck.

Here ist my class
Code: [Select]
def class "GetIOL" create required
property params$
function whatParams()
print "whatParams()"
print lst(iol(params$))
print sub(params$,sep,"~")
print params.name$
return 1
function end
end def
ON_CREATE:
call "GetIOL.pvc;FETCH_PARAMS", params$
print "ON_CREATE"
print lst(iol(params$))
print sub(params$,sep,"~")
print params.name$
return
FETCH_PARAMS:
enter p$
dim p$:iolist id$,name$,value
p.id$="ABC"
p.name$="XYZ"
p.value=42
exit

No variable arrives inside the object, though the iolist is constantly present.
I also tried static iol=iol(params$) and several other approaches. But everything failed.

This is my test program
Code: [Select]
begin
g=new("GetIOL")
g'whatParams()
delete object g
end

All suggestions are welcome.

17
Wish List / Re: Weeknumbers in multiline-calendar
« on: September 06, 2023, 08:02:54 AM »
I think ISO 8601 can help here.
If you add a week to the calendar, then it is important to handle the weeks 52, 53 and 1 correctly.

18
Programming / performance of select record
« on: August 24, 2023, 10:20:36 AM »
So far we don't use "select record" a lot. I did some tests and found that it is slower than an old style read loop. I'm wondering why. As it knows all the keys I'm interested in including all conditions it should be much faster than any programmed logic.
I tested with a file constisting of 600,000 records and read all records from then second to the last but one using the primary key. All runs with "select record" needed 3 seconds longer than the old style read loop.

In my opinion it should be much faster.

19
Programming / Link File vs. Prefix File
« on: August 22, 2023, 09:25:38 AM »
As far as I understand the documentation both file types do the same. So what are the pros and cons? Which one is better when starting to use SQL-tables?

20
Thin Client/WindX / pxplus.exe as Citrix-App
« on: August 15, 2023, 08:22:40 AM »
Are there any known issues when running WindX as a Citrix-App?
A customer has 3 out of 300 users where the invocation string of pxplus.exe is truncated by 4 bytes.

21
Programming / update global functions at runtime
« on: August 04, 2023, 05:56:43 AM »
Each time we update global functions on a Windows system they don't work any more. PxPlus throws many types of errors depending on how the functions have changed. Here is what we do in order to update/reload the global functions:

Code: [Select]
bkpPC = prm('PC')
set_param 'PC' = 0
! do update actions
set_param 'PC' = bkpPC
drop pth("globalFunctions.pvx"), err = *next
call "globalFunctions.pvx" ! addr itself

What needs to be done for a successful update?

22
Programming / update global functions at runtime
« on: August 04, 2023, 05:55:13 AM »
Each time we update global functions on a Windows system they don't work any more. PxPlus throws many types of errors depending on how the functions have changed. Here is what we do in order to update/reload the global functions:

Code: [Select]
bkpPC = prm('PC')
set_param 'PC' = 0
! do update actions
set_param 'PC' = bkpPC
drop pth("globalFunctions.pvx"), err = *next
call "globalFunctions.pvx" ! addr itself

What needs to be done for a successful update?

23
Programming / corrupted journal files
« on: July 11, 2023, 08:10:14 AM »
Each time a record with a large text field is written to a file with active journalization, the current journal file becomes corrupted.
As we cannot predict the requested field length, we define such fields with a length of 100 bytes delimited and turn on "extended records". We must always lie about the length in such cases. PxPlus has no problems with file I/O to the data file. So the 100 bytes are a signal for the developer, that there may me much more bytes.
We expect the journal file to be written as properly as the data file. How can we avoid the problem?

24
Programming / Re: Strange if then else behavior
« on: March 09, 2023, 05:28:39 AM »
Mike

You wrote
Quote
The issue is a result of the line oriented nature of the language.  IF ... THEN ... ELSE ... will basically process what is on the line.

This rises the question how does PxPlus find the closing curly braket? Are there any performance aspects?
As I don't like premature RETURNs or EXITs my coding style looks like this.
Code: [Select]
SUB_ROUTINE:
if condition {
txt$  = "Are "
txt$ += "these "
txt$ += "lines "
txt$ += "processed "
txt$ += "in "
txt$ += "some "
txt$ += "way "
txt$ += "during "
txt$ += "execution "
txt$ += "in "
txt$ += "order "
txt$ += "to "
txt$ += "find "
txt$ += "the "
txt$ += "closing "
txt$ += "curly "
txt$ += "bracket?"
print txt$
}
return
Would that routine be faster using a premature RETURN?


25
Programming / Re: Drag and Drop
« on: January 26, 2023, 03:46:23 AM »
Mike

Thank you. I'll take a look at it.

26
Programming / Re: Drag and Drop
« on: January 25, 2023, 01:34:04 AM »
Devon,

I want to drag files from a PxPlus listbox and drop it on a control of an external application.

27
Programming / Drag and Drop
« on: January 24, 2023, 01:28:48 AM »
I have a listbox containing filenames and want to drag a file from it to another non-PxPlus-application. How can I do that?

28
Nomads / Re: cell editing
« on: July 29, 2022, 04:02:54 AM »
I wasn't aware of 'GridMLVersion'.
That comes close, yes. I hope they accept it.
Thank you.

29
Nomads / cell editing
« on: July 28, 2022, 03:09:00 AM »
A customer wants to end cell editing with <ENTER> and move to the next editable cell according to the tabmode.
I tried:
Code: [Select]
preinput [next] $09$ ---> does nothing
preinput [next] -1015 ---> moves to next control
How can I achieve this?

30
Programming / Re: ERR option ignored
« on: July 25, 2022, 01:21:13 AM »
Mike

The error is thrown by the NEW() function. The constructor as already been left, so I cannot check anything inside the object any more.

Pages: 1 [2] 3 4 ... 12