[fpc-pascal] SAX XML example

2011-03-24 Thread dibo20
Hi, There is on wiki nice tutorial about XML, but I can't find any example how to use units SAX and SAX_XML. I have very big XML and I must read it partially. Regards. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepasc

Re: [fpc-pascal] TThread.Synchronize doesn't work in DLL

2011-02-01 Thread dibo20
W dniu 01.02.2011 14:08, michael.vancann...@wisa.be pisze: To synchronize threads created in the DLL you must explicitly export a call from your DLL which calls CheckSynchronize, and this call must be called from the main program at regular intervals. Hm so I have problem because I don't have s

[fpc-pascal] TThread.Synchronize doesn't work in DLL

2011-02-01 Thread dibo20
Hi, I have form and thread in DLL. It seems that Synchronize() doesn't work. Thread is hanging on first Synchronize(). It works only when I open form in ShowModal. I debug this and only difference between Show() is that ShowModal call WidgetSet.AppProcessMessages in loop. I can rewrite my code

[fpc-pascal] Compiler directive: Shared Library

2011-01-28 Thread dibo20
Hi, I'm looking at: http://www.freepascal.org/docs-html/prog/progch1.html ... and can't find any directive which tell me when I'm compiling a shared library. For example: unit1 {$IFDEF shared_lib} Foo: Integer; {$ELSE} Foo: Byte; {$ENDIF} I always must remember to add own flag in m

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-16 Thread dibo20
I found another way to register own callback events (this is example which connect to Pidgin instant messenger): var VTable: DBusObjectPathVTable; function MessageHandler(connection: PDBusConnection; message_: PDBusMessage; user_data: Pointer): DBusHandlerResult; cdecl; begin MemoLog.Lines.Add

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-14 Thread dibo20
W dniu 13.01.2011 21:12, Henry Vermaak pisze: On 13 January 2011 19:51, wrote: I'm trying with "dbus_connection_set_watch_functions" but this is not easy like it look. I thought that I must only register my event procedures by calling this functions but there is much more work. I have a headach

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 21:12, Henry Vermaak pisze: On 13 January 2011 19:51, wrote: I'm trying with "dbus_connection_set_watch_functions" but this is not easy like it look. I thought that I must only register my event procedures by calling this functions but there is much more work. I have a headach

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 16:02, Henry Vermaak pisze: On 13/01/11 15:00, Henry Vermaak wrote: On 13/01/11 12:24, dib...@wp.pl wrote: "integrate the GLib event loop with an external event loop" - I think this is what I want. What you want to do is to integrate the dbus connection into your main loop

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 15:17, michael.vancann...@wisa.be pisze: On Thu, 13 Jan 2011, dib...@wp.pl wrote: This code work too: TMyObj = class private procedure EventProc(AData: PtrInt; AFlags: dword); end; var Sock: cint; p: PEventHandler; const GLIB_SYSDEF_POLLIN = 1; GLIB_SYSDEF_POLLOUT = 4; GL

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 14:41, Matthias Klumpp pisze: Hi! I developed the Listaller Project, a cross-distro Linux software manager, which uses techniques like D-BUS and PolicyKit and had very similar problems. You can run Qt4 applications which use GLib (but only GLib!), but you need to call g_type_ini

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
This code work too: TMyObj = class private procedure EventProc(AData: PtrInt; AFlags: dword); end; var Sock: cint; p: PEventHandler; const GLIB_SYSDEF_POLLIN = 1; GLIB_SYSDEF_POLLOUT = 4; GLIB_SYSDEF_POLLPRI = 2; GLIB_SYSDEF_POLLERR = 8; GLIB_SYSDEF_POLLHUP = 16; GLIB_SYSDEF_POLLNVAL = 32; ALL

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 13:40, Henry Vermaak pisze: On 13/01/11 12:24, dib...@wp.pl wrote: Did you receive my mail with demo? I think I found temporary solution. Can you send me the source for this, too? Thanks Henry ___ fpc-pascal maillist - fpc-pascal@

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 10.01.2011 20:41, Michael Van Canneyt pisze: On Mon, 10 Jan 2011, dib...@wp.pl wrote: Sorry for refreshing, but the problem is still present :( . It works perfect on my mashine (ubuntu 10.10 64 bit) but doesn't work on my friends computer. For example, one of my friend have this same

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-10 Thread dibo20
W dniu 10.01.2011 20:41, Michael Van Canneyt pisze: On Mon, 10 Jan 2011, dib...@wp.pl wrote: Sorry for refreshing, but the problem is still present :( . It works perfect on my mashine (ubuntu 10.10 64 bit) but doesn't work on my friends computer. For example, one of my friend have this same

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-10 Thread dibo20
W dniu 02.01.2011 23:21, Michael Van Canneyt pisze: On Sun, 2 Jan 2011, dib...@wp.pl wrote: Hi, Month ago I posted a bug (http://bugs.freepascal.org/view.php?id=18117) Admin give me solution and feedback, but this solution doesn't work well and i think he don't read my last comment. So, may

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-02 Thread dibo20
W dniu 02.01.2011 21:36, Henry Vermaak pisze: On 2 January 2011 19:42, wrote: You may already know this, but it may help to point out that the OnIdle event won't fire if there are no other events. For example, you'll have to move your mouse or hit the keyboard for the OnIdle event to be called

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-02 Thread dibo20
W dniu 02.01.2011 20:11, Henry Vermaak pisze: On 2 January 2011 18:49, wrote: Hi, Month ago I posted a bug (http://bugs.freepascal.org/view.php?id=18117) Admin give me solution and feedback, but this solution doesn't work well and i think he don't read my last comment. So, maybe someone have t

[fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-02 Thread dibo20
Hi, Month ago I posted a bug (http://bugs.freepascal.org/view.php?id=18117) Admin give me solution and feedback, but this solution doesn't work well and i think he don't read my last comment. So, maybe someone have this same problem. There is good demo for d-bus rewrited line by line from offic

Re: [fpc-pascal] Re: Problems with "relocation errors"

2010-11-06 Thread dibo20
W dniu 06.11.2010 08:25, leledumbo pisze: AFAIK PE DLLs are always relocatable while it's not true for ELF SOs. So, whenever you need to create it, always pass -fPIC to ALL used units and their dependencies. So where else can I put this switch to fix lNet compiler errors? ___