Re: [fpc-pascal] raw printing throught USB port / WINDOWS

2015-01-13 Thread Chriss Kalogeropoulos
Hi, map the USB Port to a Virtual Serial Port and open the Port as File using CreateFile using name "\\.\COMxxx" Then write to the port with the usual API file commands Even better wrap this to a Stream (or FileStream) descendant and use Stream.Write commands Read and Seek should do nothing I h

Re: [fpc-pascal] cloning data containers

2014-12-27 Thread Chriss Kalogeropoulos
be tricky to cover all cases. Your proposal on the name/value pair reminds me of Qt but in the Delphi/Fpc world it is done with rtti. Chriss Στις 28 Δεκ 2014 2:56 π.μ., ο χρήστης "Marc Santhoff" έγραψε: > On Sa, 2014-12-27 at 19:56 +0200, Chriss Kalogeropoulos wrote: > > Hi, &

Re: [fpc-pascal] cloning data containers

2014-12-27 Thread Chriss Kalogeropoulos
Hi, FPC does not support copy-construction so either you must override the TPersistent.Assign method or in case of TComponent you can use ReadComponent/WriteComponent. You should also take into account deep vs swallow copy semantics as well as the type of the container and contained classes (TPer

Re: [fpc-pascal] Generics: constructor restriction fail

2014-11-11 Thread Chriss Kalogeropoulos
Hi all, I am not sure about the constructor case but I consider the FPC implementation of generics much more powerful than Delphi's assuming that Sven's comment actually works as expected. The fact that the method invocation is actually checked on specialization and not on declaration means that s

Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-23 Thread Chriss Kalogeropoulos
his is not possible I do not know if it can be done. If you do not care about that then just use java glue code, it's simpler. Στις 23 Απρ 2014 2:34 μ.μ., ο χρήστης "patspiper" έγραψε: On 23/04/14 13:20, Chriss Kalogeropoulos wrote: > Hello everyone, > > a couple years ag

Re: [fpc-pascal] JNI/Android: Java events calling pascal code

2014-04-23 Thread Chriss Kalogeropoulos
Hello everyone, a couple years ago i tried the same thing. The task was to implement a JavaPOS driver handler from Delphi/FPC code. The actual driver was implemented in C++ and it used a Java interface. My code was the glue between the application (Delphi/FPC) and the driver, it had to hook the ev