[fpc-pascal] $LINKLIB or $LINK in Lazarus/FPC on Mac OSX

2013-05-02 Thread m...@rpzdesign.com
Hello: I am new to the list, I have posted on the forum, but I don't really know where the center of gravity is for this FPC/Lazarus Community, so I will post on the mailing lists as well. And then I do not know if the Mac List is well subscribed or just the general fpc-pascal list is better

Re: [fpc-pascal] Generic Observables

2013-05-02 Thread Graeme Geldenhuys
On 2013-05-02 20:26, Michal Wallace wrote: > > I was experimenting with using some of FPC's features together and came up > with this: > > https://github.com/tangentstorm/lazmvc/blob/master/umodel.pas Just curious. If you use interfaces already, then why use message methods for notifications? W

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Ludo Brands
On 05/02/2013 10:00 PM, silvioprog wrote: > > Lines 277 and 278. That is, I already do that. The problem now is how to > stop the "Accept" but without errors. > > I implemented the "Stop" method in socket, but I did not want to do it > this ugly way. > Same solution as for recv and send. Or use

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread silvioprog
2013/5/2 silvioprog > I tried with fpshotdown ... > fpshutdown... -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread silvioprog
2013/5/2 Zaher Dirkey > > On Thu, May 2, 2013 at 11:47 PM, silvioprog wrote: > >> I tested current code on Linux, but unfortunately when I try to close, >> the app stays locked. :| > > > Yes headache :P > > Do not close, i use Shutdown > > function TmnSocket.DoShutdown(How: TmnShutdown): TmnErro

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Zaher Dirkey
On Fri, May 3, 2013 at 12:51 AM, Ewald wrote: > pthread_cancel() pthread_cancel() ​ ​ ​ not clos ​e​ the handles i though​.​ -- I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey ___ fpc-pascal maillist - fp

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Ewald
On 02 May 2013, at 22:00, silvioprog wrote: > > Lines 277 and 278. That is, I already do that. The problem now is how to stop > the "Accept" but without errors. Using linux (or some other unix like thingie), you could cancel the thread using pthread_cancel(), the call will then return immedia

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Zaher Dirkey
On Thu, May 2, 2013 at 11:47 PM, silvioprog wrote: > I tested current code on Linux, but unfortunately when I try to close, the > app stays locked. :| ​Yes headache :P​ ​Do not close, i use Shutdown function TmnSocket.DoShutdown(How: TmnShutdown): TmnError; const cHow: array[TmnShutdown] of

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread silvioprog
2013/5/2 silvioprog > 2013/5/2 Zaher Dirkey > >> >> On Thu, May 2, 2013 at 10:45 PM, silvioprog wrote: >> >>> >>> Yes, but in this case, WaitFor blocks my app. >> >> >> Yes, but before terminate your socket/client connections, you need also >> close the handle of it, or stop receive, it will re

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread silvioprog
2013/5/2 Zaher Dirkey > > On Thu, May 2, 2013 at 10:45 PM, silvioprog wrote: > >> >> Yes, but in this case, WaitFor blocks my app. > > > Yes, but before terminate your socket/client connections, you need also > close the handle of it, or stop receive, it will return immateriality > without recei

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Zaher Dirkey
On Thu, May 2, 2013 at 10:45 PM, silvioprog wrote: > > Yes, but in this case, WaitFor blocks my app. ​Yes, but before terminate your socket/client connections, you need also close the handle of it, or stop receive, it will return immateriality without receive (with error), so all connections wi

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread silvioprog
2013/5/2 Zaher Dirkey > After termintate you need to wait the thread to stop, WaitFor here the > function. > Search for WaitFor in > > https://sourceforge.net/p/minilib/source/ci/master/tree/socket/source/mnServers.pas > Yes, but in this case, WaitFor blocks my app. -- Silvio Clécio My public

Re: [fpc-pascal] Generic Observables

2013-05-02 Thread Michal Wallace
On Thu, May 2, 2013 at 2:34 PM, Michael Van Canneyt wrote: > You are aware that the classes unit contains the observer pattern, and > together with the fpmediators it has all you need to implement the MVC > model (through mediators) ? > Nope. :) I actually had thought I'd seen something about ob

Re: [fpc-pascal] Generic Observables

2013-05-02 Thread Michael Van Canneyt
On Thu, 2 May 2013, Michal Wallace wrote: Hey all, I was experimenting with using some of FPC's features together and came up with this: https://github.com/tangentstorm/lazmvc/blob/master/umodel.pas Basically, it's just a generic implementation of the Observer design pattern. It provides a

[fpc-pascal] Generic Observables

2013-05-02 Thread Michal Wallace
Hey all, I was experimenting with using some of FPC's features together and came up with this: https://github.com/tangentstorm/lazmvc/blob/master/umodel.pas Basically, it's just a generic implementation of the Observer design pattern. It provides a class, TModel, tha you can use as an interface

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Zaher Dirkey
​After termintate you need to wait the thread to stop, WaitFor here the function. Search for WaitFor​ in https://sourceforge.net/p/minilib/source/ci/master/tree/socket/source/mnServers.pas On Thu, May 2, 2013 at 8:57 PM, silvioprog wrote: > destructor TTcpIpServerSocketThread.Destroy; > begin >

[fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread silvioprog
Hi, I'm trying to close a socket (full code here: https://bitbucket.org/silvioprog/tcpipcomp/src/6b43739d5416424e82112b858a9b71d26c8c6165/src/tcpipserver.pas?at=master ): destructor TTcpIpServerSocketThread.Destroy; begin FSocket.StopAccepting; FSocket.Free; inherited Destroy; end; But, it

RE: [fpc-pascal] Synchronize(dummyproc) with Linux.

2013-05-02 Thread Fred van Stappen
> > Synchronize submits a procedure for execution by the main thread, and waits > > till the main thread has processed it. > > Ok, i understand that, but if that procedure is dummy, i do understand why it > takes a delay. The Synchronize code can not know that the method you passed is an empt

RE: [fpc-pascal] Synchronize(dummyproc) with Linux.

2013-05-02 Thread Sven Barth
Am 02.05.2013 15:24 schrieb "Fred van Stappen" : > > > Synchronize submits a procedure for execution by the main thread, and waits till the main thread has processed it. > > Ok, i understand that, but if that procedure is dummy, i do understand why it takes a delay. The Synchronize code can not kn

RE: [fpc-pascal] Synchronize(dummyproc) with Linux.

2013-05-02 Thread Fred van Stappen
> Synchronize submits a procedure for execution by the main thread, and waits > till the main thread has processed it. Ok, i understand that, but if that procedure is dummy, i do understand why it takes a delay.

RE: [fpc-pascal] Synchronize(dummyproc) with Linux.

2013-05-02 Thread Michael Van Canneyt
On Thu, 2 May 2013, Fred van Stappen wrote: @ sven : Many thanks for answer ( and of course i had read and study deeply your clear earlier topic ). >So even if your method is empty there will be a delay until the mainthread processes the synchronized method. Ok, difficult to understand tha

RE: [fpc-pascal] Synchronize(dummyproc) with Linux.

2013-05-02 Thread Fred van Stappen
@ sven : Many thanks for answer ( and of course i had read and study deeply your clear earlier topic ). >So even if your method is empty there will be a delay until the mainthread processes the synchronized method. Ok, difficult to understand that a empty method gives a delay, but if it is

Re: [fpc-pascal] Win64 release of FPC 2.6.2 missing

2013-05-02 Thread Jonas Maebe
On 02 May 2013, at 11:07, Graeme Geldenhuys wrote: On 2013-05-02 09:43, Jonas Maebe wrote: Lazarus and 64-bit FPC 2.6.0. I didn't want to read 10's of pages on how to setup a cross compiler etc. You don't have to read anything, it works exactly the same as a regular compiler. Lazarus nor the

Re: [fpc-pascal] Win64 release of FPC 2.6.2 missing

2013-05-02 Thread Graeme Geldenhuys
On 2013-05-02 09:43, Jonas Maebe wrote: >> Lazarus and 64-bit FPC 2.6.0. I didn't want to read 10's of pages >> on how to setup a cross compiler etc. > > You don't have to read anything, it works exactly the same as a > regular compiler. Lazarus nor the compiler cares at all about what > architect

Re: [fpc-pascal] What library would be recommended for creating pdf file (print invoices)

2013-05-02 Thread Graeme Geldenhuys
On 02/05/13 09:11, Adrian Maier wrote: > > Which one would you recommend to me (taking into account the API > cleanliness) ? I think that very much depends on you. Each developer would have their own preference and requirements. I can add that we use the pdf engine in fpGUI for all our commerc

Re: [fpc-pascal] Synchronize(dummyproc) with Linux.

2013-05-02 Thread Sven Barth
Am 02.05.2013 13:25, schrieb Fred van Stappen: > that is the slowest system (by a big margin) I have > available. Im very interested by the result. But i continue to think there is something strange with synchronize(). In my logic, synchronize(dummyproc) must have NO effect on the parent threa

RE: [fpc-pascal] Synchronize(dummyproc) with Linux.

2013-05-02 Thread Fred van Stappen
> that is the slowest system (by a big margin) I have > available. Im very interested by the result. But i continue to think there is something strange with synchronize(). In my logic, synchronize(dummyproc) must have NO effect on the parent thread. And it have. I can imagine (and accept) that

Re: [fpc-pascal] Win64 release of FPC 2.6.2 missing

2013-05-02 Thread Jonas Maebe
On 02 May 2013, at 09:04, Graeme Geldenhuys wrote: > On 02/05/13 01:33, Joao Morais wrote: >> >> Why do you need a 64 bit compiler? (just curious) > > Huh? Because I was running 64-bit Windows 7, and needed to test and > resolve a 64-bit bug. My system was already setup with 64-bit Lazarus > an

Re: [fpc-pascal] Win64 release of FPC 2.6.2 missing

2013-05-02 Thread Graeme Geldenhuys
On 02/05/13 01:33, Joao Morais wrote: > > Why do you need a 64 bit compiler? (just curious) Huh? Because I was running 64-bit Windows 7, and needed to test and resolve a 64-bit bug. My system was already setup with 64-bit Lazarus and 64-bit FPC 2.6.0. I didn't want to read 10's of pages on how to

Re: [fpc-pascal] What library would be recommended for creating pdf file (print invoices)

2013-05-02 Thread Tony Whyman
Adrian, I use Lazreports to lay out invoices, purchase orders, parcel labels etc. This can print directly to a printer and has an extension to print to PDF using PowerPDF. I use this so that I can export to PDF and EMail invoices. All works very well for me. Tony W On 02/05/13 09:11, Adrian

Re: [fpc-pascal] What library would be recommended for creating pdf file (print invoices)

2013-05-02 Thread Michael Van Canneyt
On Thu, 2 May 2013, Adrian Maier wrote: Hello guys , I'm wondering which is the best library available for freepascal that i could use to generate printable invoices? Most likely a lot of people need this kind of functionality in their applications, so ... perhaps there is some obvious choi

[fpc-pascal] What library would be recommended for creating pdf file (print invoices)

2013-05-02 Thread Adrian Maier
Hello guys , I'm wondering which is the best library available for freepascal that i could use to generate printable invoices? Most likely a lot of people need this kind of functionality in their applications, so ... perhaps there is some obvious choice that someone could point to me immediately ;