Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Hans-Peter Diettrich
Luiz Americo Pereira Camara schrieb: This is the purpose i intend to use (replace my implementation). Basically is a tree structure that needs to be observed. To avoid performance problems like having to parse all the tree when a change occurs i defined actions when a Child is added, deleted o

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Luiz Americo Pereira Camara
Em 28/8/2012 12:46, michael.vancann...@wisa.be escreveu: On Tue, 28 Aug 2012, Luiz Americo Pereira Camara wrote: Em 28/8/2012 09:15, michael.vancann...@wisa.be escreveu: On Tue, 28 Aug 2012, Luiz Americo Pereira Camara wrote: Why not let TFPObservedOperation as integer and define consta

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread michael . vancanneyt
On Tue, 28 Aug 2012, Luiz Americo Pereira Camara wrote: Em 28/8/2012 09:15, michael.vancann...@wisa.be escreveu: On Tue, 28 Aug 2012, Luiz Americo Pereira Camara wrote: Why not let TFPObservedOperation as integer and define constants. It could define a constant like ooUser = 32 Below oo

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Luiz Americo Pereira Camara
Em 28/8/2012 09:15, michael.vancann...@wisa.be escreveu: On Tue, 28 Aug 2012, Luiz Americo Pereira Camara wrote: Why not let TFPObservedOperation as integer and define constants. It could define a constant like ooUser = 32 Below ooUser is reserved for future default constants Above ooUser c

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread michael . vancanneyt
On Tue, 28 Aug 2012, Graeme Geldenhuys wrote: On 28/08/12 13:15, michael.vancann...@wisa.be wrote: For example, on my 'doubtful' list I had "ooPropertyChange", to be used in combination with the GetPropInfo() and a call in TPersistent: FPOPropertyChanged(Const APropName : String); This c

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Graeme Geldenhuys
On 28/08/12 13:15, michael.vancann...@wisa.be wrote: For example, on my 'doubtful' list I had "ooPropertyChange", to be used in combination with the GetPropInfo() and a call in TPersistent: FPOPropertyChanged(Const APropName : String); This could work, and I can see use-cases where this coul

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread michael . vancanneyt
On Tue, 28 Aug 2012, Luiz Americo Pereira Camara wrote: Em 28/8/2012 04:50, michael.vancann...@wisa.be escreveu: On Mon, 27 Aug 2012, Luiz Americo Pereira Camara wrote: I ask to change to a mechanism that could allow customizable operations (more than one) That is why you have ooCustom.

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Luiz Americo Pereira Camara
Em 28/8/2012 04:50, michael.vancann...@wisa.be escreveu: On Mon, 27 Aug 2012, Luiz Americo Pereira Camara wrote: I ask to change to a mechanism that could allow customizable operations (more than one) That is why you have ooCustom. I'm asking that because i have implemented a similar me

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Graeme Geldenhuys
On 28/08/12 08:57, michael.vancann...@wisa.be wrote: I think you didn't read the original poster's mail subject line 100% carefully :-) My apologies, I thought he was commenting on the FPObserver support added as a unit to FCL, not RTL. The subject line quoting a old post or something. T

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Graeme Geldenhuys
On 28/08/12 08:50, michael.vancann...@wisa.be wrote: The first: Procedure TmyObject.SomethingChanged; Var Rec : TMyOperationInfo; // Contains custom information about your operation. begin Rec.XYZ:=MoreInfo; // Set up as needed. FPONotifyObservers(Self,ooCustom,@Rec); end; Correct, and this

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread michael . vancanneyt
On Tue, 28 Aug 2012, Graeme Geldenhuys wrote: On 28/08/12 02:48, Luiz Americo Pereira Camara wrote: Back in 2010, in the thread about observer support in fcl, i asked if the actions would be customizable so i could, e.g., notify/observe if a child was added or removed in a tree structure. The

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread Graeme Geldenhuys
On 28/08/12 02:48, Luiz Americo Pereira Camara wrote: Back in 2010, in the thread about observer support in fcl, i asked if the actions would be customizable so i could, e.g., notify/observe if a child was added or removed in a tree structure. The answer was yes. I've emailed Michael 2-3 weeks

Re: [fpc-devel] Recent added support for Observer pattern in FCL

2012-08-28 Thread michael . vancanneyt
On Mon, 27 Aug 2012, Luiz Americo Pereira Camara wrote: Back in 2010, in the thread about observer support in fcl, i asked if the actions would be customizable so i could, e.g., notify/observe if a child was added or removed in a tree structure. The answer was yes. Looking at the recent add

[fpc-devel] Recent added support for Observer pattern in FCL

2012-08-27 Thread Luiz Americo Pereira Camara
Back in 2010, in the thread about observer support in fcl, i asked if the actions would be customizable so i could, e.g., notify/observe if a child was added or removed in a tree structure. The answer was yes. Looking at the recent added support, it limit the actions (called operations) to 5 t