Jump to content

Uwe Raabe

Members
  • Content Count

    2525
  • Joined

  • Last visited

  • Days Won

    144

Posts posted by Uwe Raabe


  1. 5 hours ago, Stefan Glienke said:

    However TGUID <-> string serialization should be supported out of the box imo.

    As I cannot spot one, do you happen to have a QP report at hand? Otherwise I will create one.

     

    40 minutes ago, Frédéric said:

    I've just put an JSONReflect attribute on the concerned fields of my objects

    It would be nice if you can post the source here, unless you opt for creating that QP entry yourself.


  2. Currently this is not implemented. The context is populated with help from the IDE ToolsAPI, which is not available for a command line tool.

     

    While in principle this is possible by evaluating the dproj file, but currently I have no spare capacity for that. When time allows I can share some code that can serve as a start.


  3. type
      TObjectDictionaryWithDuplicateObjects<K,V:class> = class(TObjectDictionary<K, TObjectList<V>>)
      public
        procedure AddObject(const Key: K; Value: V);
      end;
    
    procedure TObjectDictionaryWithDuplicateObjects<K, V>.AddObject(const Key: K; Value: V);
    var
      list: TObjectList<V>;
    begin
      if not TryGetValue(Key, list) then
      begin
        list := TObjectList<V>.Create;
        Add(Key, list);
      end;
      list.Add(Value);
    end;

     

    • Like 1
    • Thanks 1

  4. Actually one need to enter just MYDEF, just like you do for the Defines in the compiler options or the options of the Unit Dependency Analyzer.

     

    BUT, there is a refresh problem in the current MMX version: You have to restart the IDE to make the MMX parser reload the defines. Of course that is quite buggy, as even switching the project misses to update the defines for the parser. I will fix that with the next version.

    • Like 1

  5. It is possible that you have to implement it yourself in the way it is needed as it is noted in the docs:

    Quote

    TOAuth2Authenticator implements a basic OAuth2 authentication. TOAuth2Authenticator offers minimal support and provides the infrastructure to follow the workflow of the service provider.

    Inherit from this class to create an authenticator class specific to a service provider.

    That said, giving a concrete example is difficult without knowing more details.

    • Thanks 1

  6. 14 minutes ago, Henry Olive said:

    Thank you so much Lars

    I tried System.StrUtils.SplitString('-', MyStr) [0];

    but still get the same error

     

    If i remove QRCtrls, QuickRpt  from Uses,  below codes work fine w/o any error

      MyStr := CDS1.DataSet.FieldByName('DOCNO').AsString;
      MyLeftStr := SplitString('-',MyStr) [0];
      MyRightStr := SplitString('-',MyStr) [1];

    The calls to SplitString look as if the parameters need to be switched. First parameter is expected to be the string to be split, while second is the string with the separators.

     

    Note that the QuickReport implementation allows only a Char for the separator, while the StrUtils one allows multiple separators.


  7. 29 minutes ago, Lars Fosdal said:

    needs to be continously updated/patched, and replaced before EOL.

    Seems like the machine manufacture prefer the replace option. Sometimes they provide a replacement of the controller hardware, but often that turns out incompatible to the machine equipment.

     

    I would love that to be different, as it would allow me to sell updates to newer versions of my software developed with more recent Delphi versions. 


  8. Quote

    Q3: How can I force FireDAC to recognize some field as boolean?

    A: A boolean field may be created using a domain. The domain name must contain 'BOOL' substring. Also, add ExtendedMetadata=True parameter to your connection definition. For example:

    
    CREATE DOMAIN T_BOOLEAN SMALLINT;
    CREATE TABLE ... (
      ...
      BOOLEAN_FIELD T_BOOLEAN,
      ...);

     

×