It’s been a couple of years since I’ve developed anything with Xojo (I’ve mostly been doing Python nowadays).
As I want to give back to the open source community, I’ve decided to open source my Point of Sales software that I’ve written 5 years ago.
There’s plenty of low-level(ish) serial stuff in there to communicate with Point of Sales hardware (e.g. Epson ticket printers, RFID readers, etc)
It also heavily uses the Canvas for UI elements (no images, all generated using code, for speed).
I’ve slapped a GNU GPL 3.0 license on it, so feel free to fork it and use it as you see fit within the set rules of this license.
Hello Steve, Everbody else,
Thank you for the open source program. Could I ask in which version on Xojo this is build?
Because I have many errors when I try to open the program in 2021 R3:
ASPushButton.Paint, line 105 This item does not exist g.DrawLine(1, x, Graphics.Width-2 , x)
The program shows the error with: Graphics.Width.
There are many errors with Graphics.
I think this is because Graphics is changed some versions ago. If so which one? And can I replace Graphics with it successor?
If you drop a binary file into a viewer that can cope with it you can see the xojo version it was made with near the start of the file, 2016.011 is this case.
Depending how its written (I’ve not looked at the source) you might be able to get away with just renaming Graphics to g in relevant events. If not, probably the easiest way around it is to draw onto a temp picture and use that picture in the paint with g.drawpicture, all depends on how the code is written though.
As JulianS said, I’m fairly certain you can just replace Graphics with g.
It does not use any plugins whatsoever, everything is pure Xojo.
It’s been a while since I’ve worked on this project, but the ASPushButton is a superclassed Canvas which is used as buttons (mostly for the top menu bar in the main window, but iirc in other places as well).
I used this approach to make it more usable for touchscreens, and to give it a more distinct look and feel for hospitality and overall userfriendlyness.
Also, to answer your question about the missing files, those are indeed images.
The OSK and Badge should be in the /images/ directory, as they are in the repository.
For some reason, the other ones aren’t, I thought I had added them. They’re just 64x64px images which are used as symbols for caution, error and question respectively. I’ll see if I still have the original images later.
Changing the ‘Graphics.’ to ‘g.’ did the trick. The program is working perfect now, thank you.
And I must say it is build beautiful, clear code with comments where needed. The work of a professional.