Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Zaher Dirkey
On Thu, Sep 15, 2011 at 12:27 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: On 14/09/2011 23:17, Marcos Douglas wrote: procedure Run; var f: TFoo; // type is class, not interface o: TObj; begin f := TFoo.Create; This is just wrong. 1 - If i use the class not

[fpc-pascal] Re: How to detect supported data types in dataset?

2011-09-15 Thread Reinier Olislagers
On 8-9-2011 9:16, michael.vancanneyt-0is9kj9s...@public.gmane.org wrote: On Thu, 8 Sep 2011, Reinier Olislagers wrote: Am I missing something obvious or does it make sense to expose something like a SupportedFieldTypes property for datasets? How does Delphi do this? It does not. Besides

Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Jonas Maebe
On 14 Sep 2011, at 23:17, Marcos Douglas wrote: BUT, if I create my TFoo without refcount should works, right? Only in some circumstances. These circumstances depend on when the compiler allocates temporary interface instances, and when these are finalized. ... but, does not work. In

Re: [fpc-pascal] WinCE multithreading

2011-09-15 Thread Fabio Luis Girardi
Yes, the current FPC has this feature. Maybe the problem with WinCE with multithreading is this: http://bugs.freepascal.org/view.php?id=18756 and not the use or not of Unaligned keyword. Added with some outdated documentation on Wiki, this cause a little of confusion in the mind of who starts

[fpc-pascal] How to get a data module to notify of events?

2011-09-15 Thread Frank Church
I have a form with some threaded objects that notify another form of events by calling one of that forms events. I want to convert to a data module and any interested object to register for those notifications. My idea is for each thread to have some kind of list of procedure types and each

Re: [fpc-pascal] How to get a data module to notify of events?

2011-09-15 Thread Martin Schreiber
On Thursday 15 September 2011 16:28:29 Frank Church wrote: I have a form with some threaded objects that notify another form of events by calling one of that forms events. I want to convert to a data module and any interested object to register for those notifications. My idea is for each

Re: [fpc-pascal] How to get a data module to notify of events?

2011-09-15 Thread Frank Church
On 15 September 2011 15:48, Martin Schreiber mse00...@gmail.com wrote: On Thursday 15 September 2011 16:28:29 Frank Church wrote: I have a form with some threaded objects that notify another form of events by calling one of that forms events. I want to convert to a data module and any

Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 6:27 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: On 14/09/2011 23:17, Marcos Douglas wrote: procedure Run; var   f: TFoo;  // type is class, not interface   o: TObj; begin   f := TFoo.Create; This is just wrong. Well, wrong just because the language is

Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 9:18 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 14 Sep 2011, at 23:17, Marcos Douglas wrote: BUT, if I create my TFoo without refcount should works, right? Only in some circumstances. These circumstances depend on when the compiler allocates temporary

Re: [fpc-pascal] How to get a data module to notify of events?

2011-09-15 Thread Martin Schreiber
On Thursday 15 September 2011 16:53:35 Frank Church wrote: Are there some examples of that somewhere? http://svn.berlios.de/viewvc/mseide-msegui/trunk/lib/common/kernel/mseclasses.pas?view=markup ___ fpc-pascal maillist -

Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Felipe Monteiro de Carvalho
On Thu, Sep 15, 2011 at 4:54 PM, Marcos Douglas m...@delfire.net wrote:   f := TFoo.Create; This is just wrong. Well, wrong just because the language is so but not because is ilogical, right? I don't understand why it would be wrong. For me it seams correct and similar to this example:

Re: [fpc-pascal] How to get a data module to notify of events?

2011-09-15 Thread Martin Schreiber
On Thursday 15 September 2011 16:53:35 Frank Church wrote: Are there some examples of that somewhere? or http://svn.berlios.de/viewvc/mseide-msegui/trunk/lib/common/kernel/msegui.pas?view=markup tmethodlist. Warning, tmethodlist.remove() must be called before destroying the registered objects.

Re: [fpc-pascal] How to get a data module to notify of events?

2011-09-15 Thread Frank Church
On 15 September 2011 16:26, Martin Schreiber mse00...@gmail.com wrote: On Thursday 15 September 2011 16:53:35 Frank Church wrote: Are there some examples of that somewhere? or http://svn.berlios.de/viewvc/mseide-msegui/trunk/lib/common/kernel/msegui.pas?view=markup tmethodlist. Warning,

Re: [fpc-pascal] WinCE multithreading

2011-09-15 Thread Fabio Luis Girardi
Hi! I made some changes for WinCE and want test. How I rebuild only the RTL on windows? I'm using WinXP, Lazarus 0.9.30.1 with fpc 2.4.4 + cross-arm downloaded from daily snapshots. The best regards, Fabio ___ fpc-pascal maillist -

Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 12:12 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: On Thu, Sep 15, 2011 at 4:54 PM, Marcos Douglas m...@delfire.net wrote:   f := TFoo.Create; This is just wrong. Well, wrong just because the language is so but not because is

Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 12:12 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: I don't understand why it would be wrong. For me it seams correct and similar to this example: http://wiki.lazarus.freepascal.org/How_To_Use_Interfaces_to_write_less_code I'd like to use the

Re: [fpc-pascal] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 4:45 PM, Marcos Douglas m...@delfire.net wrote: Yeah, you're right... I didn't see this link.  =) But see it one more time: the R instance of TRealClass is not released... saw? I didn't test but I think if R was released will occur an AV. As I said, if we use

[fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Mattias Gaertner
Hi all, I found the Wiki page about the new for-in loop and found a misinformation. It stated wrongly that it is not possible to have multiple enumerators per class. It even gave a proposal for a new feature that did not add anything new. I added an example how to add a second enumerator to a

Re: [fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Flávio Etrusco
On Thu, Sep 15, 2011 at 6:37 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: Hi all, I found the Wiki page about the new for-in loop and found a misinformation. It stated wrongly that it is not possible to have multiple enumerators per class. It even gave a proposal for a new feature

Re: [fpc-pascal] Multiple enumerators per class

2011-09-15 Thread Mattias Gaertner
On Thu, 15 Sep 2011 18:52:30 -0300 Flávio Etrusco flavio.etru...@gmail.com wrote: On Thu, Sep 15, 2011 at 6:37 PM, Mattias Gaertner nc-gaert...@netcologne.de wrote: Hi all, I found the Wiki page about the new for-in loop and found a misinformation. It stated wrongly that it is not