Re: [fpc-pascal] JSON SAX-based reader

2017-06-23 Thread Stefan V. Pantazi
Thank you for this, Michael. I think it is wonderful work. I've done some old tests of the new implementation and it looks very good. The only failed tests were related to date and time representation. This appears to be fixed in the new version. Most importantly, I see no memory leaks when pa

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-23 Thread James Richters
> lineto is meant to be used multiple times, as part of a draw path. So, lineto > does not really draw, >it just adds a vertex to a vertex storage object. To draw a path, you need to >use the drawPath(option): Thank you for the information! I thought I was missing something. James __

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-23 Thread Stefan V. Pantazi
When in doubt, have a look at the source code of the graphical primitives to determine the semantics of each one. Unlike line primitive which draws a path immediately, lineto is meant to be used multiple times, as part of a draw path. So, lineto does not really draw, it just adds a vertex to a

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-23 Thread James Richters
I'm trying to switch over a program to use aggpas but I'm not getting any results from moveto or lineto am I missing something? I made a little demo that illustrates what's happening agg^.lineWidth(4); agg^.lineColor(0, 155, 0, 255); agg^.rectangle(10, 10, 50, 50); agg^.lineColor(155, 0,

Re: [fpc-pascal] Can't close and reopen ptcgraph

2017-06-23 Thread James Richters
>As a workaround, you can manually take care of the ptcwrapper object like >this, in between closegraph and initgraph calls, but first ask yourself, do >you really need this? Thanks for figuring out what is going on. I don't really need to close it and reopen it. I can work around by just hidi

Re: [fpc-pascal] Can't close and reopen ptcgraph

2017-06-23 Thread Stefan V. Pantazi
I think I figured it out. It hink ptcgraph was not designed with that functionality in mind. If you take a look at the ptcgraph unit, it has initialization and finalization sections where the ptc wrapper object is created and freed. That happens only at application start and finish not during r

Re: [fpc-pascal] Can't close and reopen ptcgraph

2017-06-23 Thread Stefan V. Pantazi
On Linux 64bit, reopening of a second window works fine, as expected. On Windows it does not, and behaves as you reported. This is most likely related to the use of a separate thread (TPTCWrapperThread) in ptcgraph. As far as I know graph and wincrt do not use threads. I suspect that on windows

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-23 Thread Martin Schreiber
On Thursday 22 June 2017 18:47:40 James Richters wrote: > I squeezed a little more out of putimage by doing as little math as > possible with a couple of variables to store j*ptcwidth and i+j*ptcwidth I > got my 1000x test loop down to 1.013 seconds. Here is what it looks like > at the moment, an

Re: [fpc-pascal] JSON SAX-based reader

2017-06-23 Thread Michael Van Canneyt
On Fri, 23 Jun 2017, Benito van der Zander wrote: Hi, Useful if you want to process large amounts of JSON data without building the whole JSON document in memory. I have always used jsonscanner for that... Well, JSONScanner does not do structural JSON validation. JSONReader does. JSO

Re: [fpc-pascal] JSON SAX-based reader

2017-06-23 Thread Benito van der Zander
Hi, Useful if you want to process large amounts of JSON data without building the whole JSON document in memory. I have always used jsonscanner for that... Best, Benito On 06/23/2017 08:48 AM, Michael Van Canneyt wrote: Hello, I have changed the JSON parser, it is now written on top

[fpc-pascal] Can't close and reopen ptcgraph

2017-06-23 Thread James Richters
I ran into an unexpected issue with ptcgraph. If I use closegraph, I cannot re-open a new ptcgraph window with Initgraph. It looks like it opens the second graph window but then closes it immediately after.. my program is then appears to be locked up after this happens.. no errors, just locked up

Re: [fpc-pascal] Serial to TCP gateway in FPC?

2017-06-23 Thread Michael Schnell
On 22.06.2017 00:30, Bo Berglund wrote: 1) How do I enter a loop in a GUI application? In a command line application it is just going to be part of he main program code. Use a Thread. 2) How do I stop the program from running at 100% CPU utilization (on Windows)? Blocking read. -Michael __