Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Sven Barth
Am 29.11.2012 03:59, schrieb luiz americo pereira camara: As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child objects. This occurs because AFAIK you can't get a TObject from a interface reference. At least for COM interfaces as and is with

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Marco van de Voort
In our previous episode, Sven Barth said: As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child objects. This occurs because AFAIK you can't get a TObject from a interface reference. At least for COM interfaces as and is with a class

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Sven Barth
Am 29.11.2012 10:12, schrieb Marco van de Voort: In our previous episode, Sven Barth said: As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child objects. This occurs because AFAIK you can't get a TObject from a interface reference. At least

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread michael . vancanneyt
On Wed, 28 Nov 2012, luiz americo pereira camara wrote: Given the considerations i did about the observer feature, here are some simple projects that supports my concerns and therefore the request i made to change the interface of two functions. Test1 As is today, if you have a reference to

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread michael . vancanneyt
On Thu, 29 Nov 2012, Sven Barth wrote: Am 29.11.2012 03:59, schrieb luiz americo pereira camara: As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child objects. This occurs because AFAIK you can't get a TObject from a interface reference.

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread luiz americo pereira camara
2012/11/29 michael.vancann...@wisa.be: On Thu, 29 Nov 2012, Sven Barth wrote: Am 29.11.2012 03:59, schrieb luiz americo pereira camara: As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child objects. This occurs because AFAIK you can't

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread michael . vancanneyt
On Thu, 29 Nov 2012, luiz americo pereira camara wrote: 2012/11/29 michael.vancann...@wisa.be: On Thu, 29 Nov 2012, Sven Barth wrote: Am 29.11.2012 03:59, schrieb luiz americo pereira camara: As is today, if you have a reference to a IFPObserver is not possible to use it to attach to,

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Graeme Geldenhuys
Hi Luiz, First off, thanks for take the trouble it creating test projects. On 2012-11-29 02:59, luiz americo pereira camara wrote: Test1 As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child objects. This occurs because AFAIK you can't

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread michael . vancanneyt
On Thu, 29 Nov 2012, Graeme Geldenhuys wrote: Hi Luiz, First off, thanks for take the trouble it creating test projects. On 2012-11-29 02:59, luiz americo pereira camara wrote: Test1 As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread luiz americo pereira camara
2012/11/29 michael.vancann...@wisa.be: On Wed, 28 Nov 2012, luiz americo pereira camara wrote: Given the considerations i did about the observer feature, here are some simple projects that supports my concerns and therefore the request i made to change the interface of two functions.

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Graeme Geldenhuys
On 2012-11-29 12:10, michael.vancann...@wisa.be wrote: The primary reason of existence for TFPList and TFPObjectList is speed and minimal overhead. OK, I understand now. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread michael . vancanneyt
On Thu, 29 Nov 2012, luiz americo pereira camara wrote: Well i have at least two situations, with code that is already running, that the observer pattern would fit as i described. - I implemented a Wizard Page component where i can attach a page to any TFrame. Each page can be assigned as

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Sven Barth
Am 29.11.2012 10:44, schrieb michael.vancann...@wisa.be: On Thu, 29 Nov 2012, Sven Barth wrote: Am 29.11.2012 03:59, schrieb luiz americo pereira camara: As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g., child objects. This occurs because

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread luiz americo pereira camara
2012/11/29 michael.vancann...@wisa.be: On Thu, 29 Nov 2012, luiz americo pereira camara wrote: Well i have at least two situations, with code that is already running, that the observer pattern would fit as i described. - I implemented a Wizard Page component where i can attach a page to

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread luiz americo pereira camara
2012/11/29 Graeme Geldenhuys gra...@geldenhuys.co.uk: Hi Luiz, First off, thanks for take the trouble it creating test projects. Thanks for looking at them ;-) On 2012-11-29 02:59, luiz americo pereira camara wrote: Test1 As is today, if you have a reference to a IFPObserver is not

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread michael . vancanneyt
On Thu, 29 Nov 2012, luiz americo pereira camara wrote: I fail to see how the current interface forbids this ? It does not forbids. It's just an example of the need to check if a object implements an IFPObserver before attaching it. You have said that there's no real life situation you

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread michael . vancanneyt
On Thu, 29 Nov 2012, luiz americo pereira camara wrote: - I cannot define FieldsObserver as IFPObserver (the reasons why do i prefer as it are above) - Using FieldsObserver as TObject each time i attach/dettach from a TFields there will be a type cast that i know before hand is not necessary

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Graeme Geldenhuys
Hello luiz, Thursday, November 29, 2012, 12:31:41 PM, you wrote: BTW: Graeme already pointed, that the Observer methods should be public. Does not makes sense to protect methods that are exposed by an interface. When did I say that? [Though my memory has been failing me once or twice.

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread luiz americo pereira camara
2012/11/29 Graeme Geldenhuys gra...@geldenhuys.co.uk: Hello luiz, Thursday, November 29, 2012, 12:31:41 PM, you wrote: BTW: Graeme already pointed, that the Observer methods should be public. Does not makes sense to protect methods that are exposed by an interface. When did I say

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread Graeme Geldenhuys
Hello luiz, Thursday, November 29, 2012, 9:39:36 PM, you wrote: In the message of the example observer: It seems Gmail searching has failed me. Thanks for fulfilling my curiosity. As for my comment. It was purely a suggestion (for convenience). My personal preference is still to

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread luiz americo pereira camara
2012/11/29 michael.vancann...@wisa.be: On Thu, 29 Nov 2012, luiz americo pereira camara wrote: Yes. I still do not see how your example shows this ? Your wizard knows it can observe. It attaches itself to the frame. The code frame does not need to know the observing object ? Yes, you

Re: [fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-29 Thread luiz americo pereira camara
2012/11/29 luiz americo pereira camara luiz...@oi.com.br: There's a more concrete example about the duplicate typecast. I'm developing a model manager that would be responsible to easily create LCL forms/frames, html forms, LazReport reports etc with the same set of data/models Each

[fpc-devel] Tests of observer feature [was: Considerations about observer]

2012-11-28 Thread luiz americo pereira camara
Given the considerations i did about the observer feature, here are some simple projects that supports my concerns and therefore the request i made to change the interface of two functions. Test1 As is today, if you have a reference to a IFPObserver is not possible to use it to attach to, e.g.,