Import Files advice
Posted
#1
(In Topic #1053)
Enthusiast

I need to ask you all a question
I am trying to work out how to pull in some Java Drivers into my EPoS application
The Demo I was reading said I need to do this
Code (gambas)
- import "jpos.JposException"
- import "jpos.POSPrinter"
- import "jpos.util.JposPropertiesConst"
- import "java.time.Duration"
- import "java.time.Instant"
But When I try it says Missing As and the cursor is at the end of the first Line
This is what I am trying to run
Code (gambas)
This is a JavaPoS Interface (allows me to talk to ANY printer from any manufacturer as long as they have JavaPoS Drivers for it and I don't need to know how to program it as the JavaPoS does that for me)
If I can get this to work I can add so meany new features to my application(s) and have some of my old trusted functions back (like Cash drawer status)
Anyone have any idea how I can get this small section to work I would be greatful.
Posted
Guru

Posted
Enthusiast

So how would I import the functions I need in to Gambas?
How do I use the JavaPoS API inside my Gambas Application>
Posted
Enthusiast

I have changed the code that brings in the Libarys to
and now I am getting unknow idenifier on the JposPropertiesConst section of
Code (gambas)
does anyone have any other idea as how to get this to work I feel i am getting close
Posted
Guru

maybe you want Object.SetProperty() but probably not as it's not an object its a pointer to a library function.
Sorry i cannot help as i do not use external libraries at all.
Posted
Enthusiast

BruceSteers said
System.setProperty() is not a gambas function
maybe you want Object.SetProperty() but probably not as it's not an object its a pointer to a library function.
Sorry i cannot help as i do not use external libraries at all.
I must be doing something as when I type jpos. I get a list of all the function that I can use but at run time I get a error at the JposPropertiesConst part
Sometime I wish I went back to my DOS Systems (but that was still buggy)
Posted
Enthusiast

But now when I run the program I get the following error
Code (gambas)
Any idea's where to go now guys?
This is my Code
Code (gambas)
- 'Object.SetProperty(JposPropertiesConst.JPOS_POPULATOR_FILE_PROP_NAME, "/algPoS/algPoS.xml", "")
- 'This will print a recpit to the PoS printer via the JavaPoS Drivers
- 'CashDrawerControl113 drawer = jpos.Printer.CashDrawerControl113 New CashDrawer
Posted
Guru

AndyGable said
Well after a little bit of googling I have sort of managed to import the libarys into Gambas
But now when I run the program I get the following errorat the NEW location I get "Not a Object in FMain.class"Code (gambas)
Any idea's where to go now guys?
to have 2 objects to the left of that assignment is not valid code
POSPrinterControl113 posprinter =
that's gotta be wrong and probably the error.
Posted
Enthusiast

BruceSteers said
AndyGable said
Well after a little bit of googling I have sort of managed to import the libarys into Gambas
But now when I run the program I get the following errorat the NEW location I get "Not a Object in FMain.class"Code (gambas)
Any idea's where to go now guys?
to have 2 objects to the left of that assignment is not valid code
POSPrinterControl113 posprinter =
that's gotta be wrong and probably the error.
ive removed them and tried
but it is show me a error saying Unknown identifier 'PoSPrinter'
The JavaPoS works on Windows vb.net and C programming languages and they say it should work for other non Java languages as well
1 guest and 0 members have just viewed this.



