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

Pages: 1 [2]
16
Programming / Re: Selecting all list_box entries
« on: September 19, 2019, 01:02:13 AM »
Hi James,

I found the following in an email posted by Mike King (dated 12/03/2007) on the old PxPlus Mailing List.

<snip>
If you happen to be using PxPlus use the FIND option to read all the values then issue a WRITE to enable them.

For example:

0010 LIST_BOX 10,@(10,5,40,10),OPT="#"
0020 FOR I=1 TO 50
0030 LIST_BOX LOAD 10,0,STR(RND(10000):"0000")+STR(RND(10000):"0000")
0040 NEXT I
0050 LIST_BOX FIND 10,0,X$
0060 LIST_BOX WRITE 10,X$
0070 ESCAPE

The FIND on line 50 gets a string containing all the values, then you can write this back to the control in order to select all the items.

... so basically all you need to do is:

LIST_BOX FIND 10,0,X$
LIST_BOX WRITE 10,X$
</snip>

Is that what you're looking for?

Regards,

Rob Leighton
Riverwood Enterprises Inc.

17
Hi Mike,

I see my error. Thanks!

But... when I was trying to figure out if the issue was on my end, I tried doing an online update to PxPlus 2016 and PxPlus 2017 and I got the same "Unable to connect..." error message. However, I've just tried updating them again, and now I'm receiving the expected "There are no updates available..." message.

Regards,

Rob

18
Hi,

A message box containing the message "Unable to connect to the update server to obtain patch list" is displayed when I try to apply the September 2019 update to PxPlus 2019.

Can someone point me in the right direction to correct this issue?

Thanks in advance!

Rob Leighton
Riverwood Enterprises Inc.

19
Language / Re: XEQ() question
« on: September 11, 2018, 12:32:08 PM »
Hi Mike,

You are correct! It can be eliminated. There was a reason at the time, but not anymore. Thanks for the second look!

Regards,

Rob

20
Language / Re: XEQ() question
« on: September 10, 2018, 12:04:16 PM »
Chris:

Using a unique variable name is the approach I used in the past that I'm trying to avoid. Normally, I'd just use global functions, but in this instance I'm trying to create a standalone module that will have zero impact on the existing codebase.

There aren't alot of these functions, but they are used throughout this module. In some timing tests I did, using XEQ / CALL performed as quickly as global functions, and a nice side benefit is you can single-step through the code when debugging. I even thought about using objects, but that seems like overkill...
 
Mike:
Thanks! #1 is the obvious answer (now that you've pointed it out) and #2 will come in handy for something else!

Regards,

Rob

21
Language / XEQ() question
« on: September 07, 2018, 02:06:12 PM »
Hello all!

I'm experimenting with using a combination of a local function, XEQ() and a CALL routine, as a substitute for using a global function. I've got it working and I'm happy with the results, except for one issue. I can't figure out how to LOCALize the variable that returns the value from the CALL routine.

Here's an example:

! test
begin
extension$=".exe"
print "extension$ - before: ",extension$
file_ext$=fnget_extension$("myfile.jpg")
print "file_ext$: ",file_ext$
print "extension$ - after: ",extension$
end
!
def fnget_extension$(local filename$)=xeq("functions;get_extension",extension$,filename$,extension$) ! get the file extension from the specified filename

! functions
GET_EXTENSION:! get file extension from the specified filename
enter (filename$),extension$
extension$=""
p=pos("."=filename$,-1)
if p then extension$=filename$(p+1)
exit

Here's the output :
->run
extension$ - before: .exe
file_ext$: jpg
extension$ - after: jpg
->

I tried adding LOCAL to parameters in the XEQ() statement, but that results in an error 20.

Is there any way to prevent extension$ from being modified?

Regards,

Rob Leighton
Riverwood Enterprises Inc.

Pages: 1 [2]