Jump to content

Uwe Raabe

Members
  • Content Count

    2537
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by Uwe Raabe

  1. Uwe Raabe

    Fill Class Variables from a table row??

    Could it be that the DB field value is Null when it crashes? Can you please try to adjust the LoadFromField code to this: procedure TDataSetHelper.TDataSetRecord<T>.TPropMapping.LoadFromField(var Target: T); var val: TValue; begin if FField.IsNull then val := TValue.Empty else val := TValue.FromVariant(FField.Value); FRTTIProp.SetValue(GetPointer(Target), val); end;
  2. Uwe Raabe

    Class properties

    I thinks it is: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Properties_(Delphi)#Class_Properties
  3. Uwe Raabe

    Evaluate/Modify clear history

    Only if there were a feature request that has been implemented.
  4. Uwe Raabe

    Class properties

    They are static by design. The why I cannot answer. Unfortunately there is nothing we can do about it. Instead class properties you may have to switch to class functions. These can be virtual.
  5. Uwe Raabe

    Class properties

    Class properties are static and thus cannot have virtual getters or setters. That is because static members have no information about the actual class they are called on. They only know the class they are declared in.
  6. Perhaps it is just my take of it, but being a contributor bears some responsibility - for the whole repository and not only for the part you contribute. I wouldn't call that lowering the barrier. On the other hand, forking the repo, doing your thing and creating a pull request seems much less hassle to me. Anyway, everyone can just do so whatever you decide.
  7. Have you considered keeping the number of direct committers small and let the majority of interested participants provide their contributions via pull requests?
  8. No, at least not necessarily - unless you only have one core. The OS thread scheduler will take care of running it on whatever core is available.
  9. Uwe Raabe

    Is a number in a string of numbers??

    If you make use of some newer features of the RTL you can also write: uses System.SysUtils, System.StrUtils; function ListContains(const PList: string; PNumber: integer): boolean; begin Result := MatchStr(PNumber.ToString, PList.Split([';', ','])); end; An advantage is the simple support for additional separators.
  10. Perhaps we should forward this to @Daniel
  11. This has already been brought up right at the start of this forum. If it were just a simple setting to be changed, I am pretty sure it would have been accomplished long ago.
  12. The Delphi streaming system knows that it handles TComponent descendants only. That way it can create each instance calling <SomeComponentClass>Create(<Owner>). In contrast TJSONUnMarshal.ObjectInstance works on any class having a parameterless constructor. It cannot rely on TObject.Create for that as it is not virtual. So the mechanism behind both approaches is totally different. I just wanted to emphasize that.
  13. Yes, but it only works for components because TComponent has a virtual constructor.
  14. Uwe Raabe

    Delphi 10.4 missing XML Data Binding

    The XML Mapper can be installed via GetIt. Edit: Can you explain what doesn't work in XML Mapper?
  15. Uwe Raabe

    Fill Class Variables from a table row??

    Exactly! And vice versa.
  16. Uwe Raabe

    Dragging GExperts windows show too large

    Could it be related to the scaling value being 125%? I also cannot see that OI problem with 150% scaling. With multiple monitors having different scales it may even depend on the scaling of the primary monitor if different from the one the IDE is located.
  17. Uwe Raabe

    LangMan for Delphi

    The download page offers a Personal Edition which seems to require just a registration.
  18. Uwe Raabe

    GridPanel

    Try setting both to 0.
  19. Uwe Raabe

    Fill Class Variables from a table row??

    I don't really understand. What do you mean with adding variables dynamically? Fields inside classes have to be known at compile time. Otherwise a construct like if MyCompanyData.mlcApplicationGlobalEmails then ... would not compile. The order of the field in the class doesn't matter at all. Basically LoadInstanceFromCurrent iterates all the fields and properties in the class and looks if there is a corresponding field in the dataset its value is assigned to the field of the class.
  20. Uwe Raabe

    Fill Class Variables from a table row??

    I have slightly changed the CompanyData unit to get rid of the many class vars in favor of a singleton implementation. Instead of TCompanyData.mlcApplicationGlobalEmails you should write MyCompanyData.mlcApplicationGlobalEmails. With this change you can make use of the DataSetHelper unit mentioned above. You only need to use that unit inside your data module and load the customer data like this: Company.Open; Company.LoadInstanceFromCurrent(MyCompanyData); Company.Close; CompanyData1.zip
  21. Uwe Raabe

    Fill Class Variables from a table row??

    Yes, there is. I blogged about it here: Dataset Enumerator Reloaded. The latest sources can be found on GitHub: https://github.com/UweRaabe/DataSetEnumerator. You may need to remove the class var, because the sources are to be used with instance fields. Is there a special reason for using class var?
  22. Uwe Raabe

    Remote Delphi developer position

    This isn't only just ridiculous, it is getting really annoying.
  23. Well, without the information about how the data is expected, you will have hard time to find advice here. The swagger description and example of the endpoint you are trying to reach with POST would be sufficient. We don't need access to the whole documentation or even the web service.
  24. I have done that for quite a couple of web services. The critical information is a description of the web service. Regarding your specific 403 problem it is necessary to find out how the data is expected by the service. Do you have some reference for that at hand?
  25. Yes, it reports that warning:
×