Jump to content

Jason Smart

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Jason Smart

    Interface Completion

    Sure. I've attached the 6 or so that I use regularly... You can adopt/change/add as suits your requirements... My template xml files reside in My Documents\Embarcadero\Studio\Code_Templates\Delphi Example: <?xml version="1.0" encoding="utf-8" ?> <codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates" version="1.0.0"> <template name="ipropg" invoke="auto"> <point name="propertyName"> <text> PropertyName </text> <hint> property name </hint> </point> <point name="propertyType"> <hint> property type </hint> <text> string </text> </point> <description> interface property (with getter) </description> <code language="Delphi" context="typedecl" delimiter="|"><![CDATA[ function Get_|propertyName|: |propertyType|; property |propertyName|: |propertyType| read Get_|propertyName|; |end| ]]> </code> </template> </codetemplate> code_templates.zip
  2. Jason Smart

    Interface Completion

    I have created some code templates that generate the getter/setter methods as part of the property declaration. They effectively mimic the propf, proprof and a few others. I find it quite quick. eg, i'll type ipropg<ctrl-j> and just have to enter the name of the Property and its type and I'll end up with something like this: function Get_Test: string; property Test: string read Get_Test; All I need to type was "Test" and string (although I default the type to string so I didn't need to type that). I have a iprop<ctrl-j> shortcut which does that same but adds the setter method too: function Get_Test2: Integer; procedure Set_Test2(const Value: Integer); property Test2: Integer read Get_Test2 write Set_Test2; I just had to type Test2 and Integer accordingly...
  3. Jason Smart

    FireDAC and read table metadata

    You can't use mkTableTypeFields MetaInfoKind with Firebird - in fact most adapters it seems don't implement this MetaInfoKind (ODBC seems to). If you look in FireDAC.Phys.IBMeta in the TFDPhysIBCommandGenerator.GetSelectMetaInfo method, you'll see that type has no SQL generated to return data - hence the empty dataset. I don't think you'll be able to obtain your domain names using TFDMetaInfoQuery directly. You would need to query the underlying Firebird tables directly to retrieve that information.
×