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

2017-06-28 Thread James Richters
>add ptcwrapper to uses list. Thank you, that worked! James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2017-06-28 Thread Stefan V. Pantazi
add ptcwrapper to uses list. I get reopengraph.pas(32,23) Error: Identifier not found "TPTCWrapperThread" ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2017-06-28 Thread James Richters
I thought I would try to get my demo program to work. When I try to compile it with //manually create the ptcwrapper thread PTCWrapperObject := TPTCWrapperThread.Create; I get reopengraph.pas(32,23) Error: Identifier not found "TPTCWrapperThread" Demo program below... Any ideas? James {$mode

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