Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-17 Thread Graeme Geldenhuys
2009/8/16 Michael Van Canneyt : > > However, it's not so spectacular: Attributes are simply old .NET stuff they > ported to Win32. Seems they had to use a workaround through an attribute > class. Yes you have to create a descendant of TCustomAttribute when you want to add any attribute to a class.

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-17 Thread listmember
On 2009-08-17 01:20, Graeme Geldenhuys wrote: An exact example would be very helpful. And the old "property mapping to database field" doesn't could, because that's a design preference and such mappings are not always appropriate or possible. What I have in mind isn't quite an example but I'd l

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-17 Thread Graeme Geldenhuys
Graeme Geldenhuys wrote: Very true! Now lets see what they say on the CodeGear newsgroups. :-) Oh boy - I got them throwing there toys out the cot again. :-) I should really stop doing that. ;-) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal htt

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Graeme Geldenhuys
2009/8/16 Paul Ishenin : > > Currently RTTI is very limited - using it you can only enumerate published > members, learn their types and default values (for properties). Attributes > completely eliminates limitations. Explain limitations? Surely you do not want any foreign class to query your priv

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Graeme Geldenhuys
2009/8/16 Michael Van Canneyt : > > That's what I meant with 'this varies on the storage back-end.'... :-) I was agreeing with you. I simple wanted to explain it a bit clearer to other readers. Many always assume RDBMS are used - which is not always the case. Regards, - Graeme - ___

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Michael Van Canneyt
On Sun, 16 Aug 2009, Graeme Geldenhuys wrote: 2009/8/16 Michael Van Canneyt : But that needs to be registered separately anyway, because this varies on the storage back-end. The object-db mapping should never be in the object itself, that is bad design. +1 And what about classes that can

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Paul Ishenin
Marco van de Voort wrote: I know what .NET uses it for, but that was not the question. The question is why does this have to be solved using a language construct? Why can't you simply register the Object-Relation mapping somewhere else? Because it is a more natural way. I want to give full pr

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Graeme Geldenhuys
2009/8/16 Michael Van Canneyt : > > But that needs to be registered separately anyway, because this varies on > the storage back-end. The object-db mapping should never be in the object > itself, that is bad design. +1 And what about classes that can be stored in various backends? For example, in

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Graeme Geldenhuys
2009/8/16 Paul Ishenin : > > Imagine you have a db framework which maps delphi classes to database > tables. It reads class properties from the rtti and creates db tables > automatically. tiOPF has metadata classes to do just this, but in both cases they work only well if you have quite simple des

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Michael Van Canneyt
On Sun, 16 Aug 2009, Paul Ishenin wrote: Michael Van Canneyt wrote: I never understood the need for it. RTTI is more than enough for 99.99% of the cases. Imagine you have a db framework which maps delphi classes to database tables. It reads class properties from the rtti and creates db table

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Jonas Maebe
On 16 Aug 2009, at 12:26, Marco van de Voort wrote: The question is why does this have to be solved using a language construct? Why can't you simply register the Object-Relation mapping somewhere else? What is the value of making it RTTI? I guess it's grouping information that belongs to

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Marco van de Voort
In our previous episode, Paul Ishenin said: > > I never understood the need for it. RTTI is more than enough > > for 99.99% of the cases. > Imagine you have a db framework which maps delphi classes to database > tables. It reads class properties from the rtti and creates db tables > automatically

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Paul Ishenin
Michael Van Canneyt wrote: I never understood the need for it. RTTI is more than enough for 99.99% of the cases. Imagine you have a db framework which maps delphi classes to database tables. It reads class properties from the rtti and creates db tables automatically. For example: TStudent =

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Graeme Geldenhuys
2009/8/16 Michael Van Canneyt : > > I never understood the need for it. RTTI is more than enough > for 99.99% of the cases. I agree 100%. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ __

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > It does, thank you. > > However, it's not so spectacular: > Attributes are simply old .NET stuff they ported to Win32. > Seems they had to use a workaround through an attribute class. > > I never understood the need for it. RTTI is more th

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Michael Van Canneyt
On Sun, 16 Aug 2009, Graeme Geldenhuys wrote: 2009/8/16 Michael Van Canneyt : Website not accessible. Can you give us the gist of what is so interesting ? Weird. Anyway, I placed the web page content in a OpenDocument Text format available at: http://opensoft.homeip.net/~graemeg/rtti_and_

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Graeme Geldenhuys
2009/8/16 Marco van de Voort : > I had that too, but later it worked. Now I've also seen the syntax, and I > think sb should explain those Delphi devels that in C-like languages > function modifiers come BEFORE the declaration, and in Pascal AFTER :-) Very true! Now lets see what they say on the

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > Just thought I would let you know... > > > > http://www.malcolmgroves.com/blog/?p=476 > > Hm > > Website not accessible. Can you give us the gist of what is so interesting ? I had that too, but later it worked. Now I've also seen the synta

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Paul Ishenin
Graeme Geldenhuys wrote: Just thought I would let you know... http://www.malcolmgroves.com/blog/?p=476 This reminds me our previos discussion about property attributes: http://wiki.lazarus.freepascal.org/Property_attributes Best regards, Paul Ishenin. ___

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Graeme Geldenhuys
2009/8/16 Michael Van Canneyt : > > Website not accessible. Can you give us the gist of what is so interesting ? Weird. Anyway, I placed the web page content in a OpenDocument Text format available at: http://opensoft.homeip.net/~graemeg/rtti_and_attributes.odt Hope that helps. Regards, - Gra

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > Just thought I would let you know... > > > > http://www.malcolmgroves.com/blog/?p=476 > > Hm > > Website not accessible. Can you give us the gist of what is so interesting ? Has been hinted at several times, so I can make an educated guess

Re: [fpc-devel] RTTI and Attributes in Delphi 2010

2009-08-16 Thread Michael Van Canneyt
On Sun, 16 Aug 2009, Graeme Geldenhuys wrote: Just thought I would let you know... http://www.malcolmgroves.com/blog/?p=476 Hm Website not accessible. Can you give us the gist of what is so interesting ? Michael. ___ fpc-devel maillist - fpc