The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,737 other followers

CodeRage 9 Q&A: Advanced RTTI in Object Pascal (Ray Konopka)

Posted by jpluimers on 2014/10/30

Session:

Advanced RTTI in Object Pascal

Runtime Type Information RTTI has always been a core feature of Delphi. But until recently, it was complex and limited. Now, RTTI is significantly more powerful, and yet much easier to use as well. This session describes in detail all of the changes that have been made and demonstrates the new capabilities with several examples including field inspection, method invocation, and custom attributes.

Level: Intermediate
Ray Konopka – Raize Software

Q&A:

 Q: I’ve put all of today’s chat logs at my http://wiert.me blog indexed at http://www.delphifeeds.com/

A: Great, thanks so much!

Audience Question

Q: If I should advise another tool nice for both program development, database development, project administration and brainstorming, it would be Mindjet Mind Manager 2014 Plus with Spigit Engage :-)

A: Nice

Audience Question

Q: Wirth what version of Delphji was extended RTTI introduced?

A: Delphi 2010

Audience Question

Q: Is there some literature on marshaling vs php on Linux servers? I now use a tool in Jedi JVCL for serializing using html/xml alike structures.

A: You can use RTTI

Audience Question

Q: Grate stuff, I can build new computer language by it!

A: :-)

Audience Question

Q: Is it possible to retrieve RTTI for strict private members?

A: Follow up with Ray via email.

Audience Question

Q: Using RTTI to access (private) fields directly would violate proper OO design. It would be better to have only the public fields, properties and methods being exposed/emitted by default.

A: Just because you can, doesn’t make it a good idea. Sounds like just the public properties are exposed by default.

Audience Question

Q: Can I use the adv. RTTI with any of my existing classes ? Like serializer for my classes ?

A: Should be able to.

Audience Question

Q: Is it possible to get class helper functions with RTTI ?

A: Not sure.

Audience Question

Q: Is it possible to get class helper functions with RTTI ?

A: Probably. Would need to experiment and see.

Audience Question

Q: The example of RttiMethod would work nice if you spell Create correctky, but perhaps you should have som try except to catch misspelled method names :-)

A: Good idea.

Audience Question

Q: Really great talk, Ray!

A: :-)

Audience Question

Q: Is there any way to add a field to an object? If no, what the best way to simulate?

A: maybe, with an agregate. Depends on what you are trying to solve.

Audience Question

Q: what is the immediate use of RTTI if i have the source code and can access all controls and data structures in code?

A: There are a lot of uses.

Audience Question

Q: support for records as well or just the classes ?

A: Records should have RTTI in the latest Delphi.

Audience Question

Q: I’ve used RTTI to design a flexible “security” system for applications– give administrators the ability to hide menu items, buttons, controls. Very useful for that.

A: :-)

Audience Question

Q: So essentially, it should be possible to create/add properties on-the-fly to classes/records based on scripts? this would be so powerful!

A: Not in the traditional sense. You would still need to manage the data, the object wouldn’t.

Audience Question

Q: field rtti for records was in 2010, for record methods came with like XE2 or later, rtti for record properties unfortunately still missing afaik :(

A: Good to know, thanks.

Audience Question

Q: Great Job Ray.

A: :-)

Audience Question

Q: If the application I am working on, should I care at all about RTTI?

A: Depends on what you are doing. Delphi uses for the designer.

Audience Question

Q: If you really need properties to be called from a script, then you should take a look at any of the Delphi Scripting engines: DWScript, TMS ScriptEngine, etc….

A: :-)

Audience Question

Q: Is there a list of projects in http://www.raize.com/Sessions/?

A: Please send me an email and I can provide: rkonopka@raize.com

Audience Question

Q: Could you give the download link for the source code of your Effectively Using Generics in Object Pascal session again?

A: http://www.raize.com/Sessions/DelphiGenerics.zip

Audience Question

Q: Links for source code?

A: You can email Ray rknopka@raize.com

Audience Question

Q: Links for source code?

A: http://raize.com/Sessions/AdvancedRTTI.zip

–jeroen

via: CodeRage 9 – Object Pascal Sessions.

One Response to “CodeRage 9 Q&A: Advanced RTTI in Object Pascal (Ray Konopka)”

  1. […] CodeRage 9 Q&A: Advanced RTTI in Object Pascal (Ray Konopka) […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: