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 wrote: > On Thu, Sep 15, 2011 at 6:37 PM, Mattias Gaertner > 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

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 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 that did not add anyt

[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 cla

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

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 4:45 PM, Marcos Douglas 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 R.Free... W:\dev\te

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 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 same idea of link above, ie,

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 wrote: > > On Thu, Sep 15, 2011 at 4:54 PM, Marcos Douglas 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 understa

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 - fpc-pascal@lists

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

2011-09-15 Thread Martin Schreiber
On Thursday 15 September 2011 17:43:22 Frank Church wrote: > > Where is the tmethodlist itself defined? Oh, sorry. http://svn.berlios.de/viewvc/mseide-msegui/trunk/lib/common/kernel/mselist.pas?view=markup Martin ___ fpc-pascal maillist - fpc-pascal

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 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, tmethodlis

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] Interface, _AddRef, _Release, etc.

2011-09-15 Thread Felipe Monteiro de Carvalho
On Thu, Sep 15, 2011 at 4:54 PM, Marcos Douglas 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: http://wi

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 - fpc-pascal@lists.freepasc

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

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 9:18 AM, Jonas Maebe 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 interface instances, and

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

2011-09-15 Thread Marcos Douglas
On Thu, Sep 15, 2011 at 6:27 AM, Graeme Geldenhuys 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 so bu

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 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 interested

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 fo

[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 inter

Re: [fpc-pascal] WinCE multithreading

2011-09-15 Thread Fabio Luis Girardi
Yes, I don't use this. I access the LCL methods via TThread.Synchronize, On my mind, I'm doing this right... Correct me if I'm wrong. The bug related tells that TThread.Synchronize don't work as expected in WinCE as in others OS's. It has two examples that don't work as expected on WinCE, both wit

Re: [fpc-pascal] WinCE multithreading

2011-09-15 Thread Felipe Monteiro de Carvalho
On Mon, Sep 12, 2011 at 8:08 PM, Fabio Luis Girardi wrote: > I'm porting a multi-thread project to WinCE. Everything works fine, > except when I put a Label (or any window control) on any form and link > it with the data coming from any thread. My question is: What's the > current state of the Win

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 wi

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 D

[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. >>

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

2011-09-15 Thread Zaher Dirkey
On Thu, Sep 15, 2011 at 12:27 PM, Graeme Geldenhuys 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 Interfa

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

2011-09-15 Thread Graeme Geldenhuys
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. > BUT, if I create my TFoo without refcount should works, right? > So, I change my class: > > TFoo = class(TObje