Jump to content

RayTmsk

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Yes, I want to do copies. As stupid decision planning to create several internal array for hold data: FDataArrayGuids, FDataArrayStrings, FDataArrayIntegers... I find good method as sample unit System.Generics.Collections; class function TArray.ToString<T>
  2. Hmm... but how to detect real type of T ? in first iterations I need for int, guid, string, float. Any reference to vcl source or article, please... 🙂
  3. Yes, you are right. But.. What about topic question?
  4. Not tested now but... I'd like to think it works the same way as the strings. Reference at first assign and hard copy while changing.
  5. procedure TDataField.SetAsGuidArray(SourceItems: TArray<TGuid>); begin DataType := ftArray; FArrayItemType := ftGuid; FDataArrayGuids := SourceItems; end;
  6. Hi all! I need to set object from several types of arrays: procedure SetAsGuidArray(SourceItems: TArray<TGuid>); procedure SetAsIntArray(SourceItems: TArray<integer>); procedure SetAsStringArray(SourceItems: TArray<string>); and so on... What is modern way for do this without many code? procedure SetAsAnyArray(SourceItems: TArray<??>); will be good but impossible... may be interesting way exist for such constructions ?
×