Jump to content

Tommi Prami

Members
  • Content Count

    562
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Tommi Prami

  1. Tommi Prami

    Possible Delphi 12.1 inheritance bug, could someone test also

    This appears to be problem with the : Options > User interface > Form Designer > Enable VCL Styles -setting. Disabling the Mimic* and Enable VCL Styles settings, inheritance works as expected.
  2. Do you have patch installed? K12.1 patch 1?
  3. https://www.jsonfeed.org/version/1.1/ Looks much cleaner and sane than RSS/Atom. Hope this catches on, RSS is/was very nice concept, but was kind of sidelined, can't remember why it is not that popular anymore, there was some major reason popularity dropped. -Tee-
  4. Tommi Prami

    JSON feed, replacement form RSS/Atom

    I was not thinking this as a traditional website feed, mainly. Buit standard to use in our apps to pass messages/info. Like your homepage to your app, to pass known bugs, new features etc... As far as I know Wordpress has rss-feed polugin, maybe some other CMS also has. And then you could start to publish something on your website and get the feed to your app. -Tee-
  5. Tommi Prami

    Possible Delphi 12.1 inheritance bug, could someone test also

    Interesting... I'll get back to it when Coworkers has tested that also. Some got the same error on production app, but I'll wait for them to check out the trivial test app also. -Tee-
  6. Tommi Prami

    Possible Delphi 12.1 inheritance bug, could someone test also

    Did not help.
  7. Tommi Prami

    Possible Delphi 12.1 inheritance bug, could someone test also

    Removed all IDE experts, and tried again and it behaves exactly the same... It seems that I just need to open the inherited form and StyledElements appear right away. -tee-
  8. Tommi Prami

    Possible Delphi 12.1 inheritance bug, could someone test also

    On this project, it is opposite. Or 12.1 patch 1, adds them.
  9. Yellow, Seems that Delphis own routines are bit flaky. There has been bugs over years. Last problem I had was that TryISO8601ToDate will raise exception on string it can't parse. Will handle/eat the exception but not most optimal solution I think. By good,m I mean that handle nicely error cases, maybe has more options that Delphi version. Obviously very well tested. If also fast, I wouldn't complain. -Tee-
  10. No it does not, that is OK, but debugger breaks to it anyhow, as it raised in the TryISO8601ToDate, and that is kind of exception I would not like to ignore. IF it would be TryISO8601ToDateException then yes. But generalm date conversion exception I would like to raise my attention. -tee-
  11. We had quite a long time own version, because some reported bug, Think there was some reported bug even quite recently. -Tee-
  12. Yellow, I have about following situation. FInstance is any TObject descendant and enum property can be any public or published Enum property, code must not link to hard coded enum type. procedure TMyThingy.SetEnumPropertyValue(const AValue: string); var LContext: TRttiContext; LRtttiType: TRttiType; LProperty: TRttiProperty; begin LContext := TRttiContext.Create; LRtttiType := LContext.GetType(FInstance.ClassType); LProperty := LRtttiType.GetProperty(FPropertyName); // Here I should convert lets say TMyEnum = (A, B, C) from string into the property value // if I call SetEnumPropertyValue('B') property FPropertyName from FInstance-object should be set. end; This should be quite simple, couple lines of code most likely. Could not find sample code that was good enough fit to get this to work, there usually was too much knowns, like enum type TMyEnum, This should be totally dynamic. Circled around this quite long time, just could not find the way to connect all the dots... -Tee-
  13. Have to try to remember that. Not used it too much. Thanks for helping! -Tee-
  14. This lead me one step closer. var LEnumValue: Integer; LEnumValue := GetEnumValue(LProperty.PropertyType.Handle, AValue); if (LEnumValue <> -1) and LProperty.IsWritable then LProperty.SetValue(FInstance, LEnumValue); With this I get the actual value, but setting the value does not work (More than less same code is used elsewhere and they work). It raises EInvalidCast with message 'Invalid class typecast'. Integer is correct value for the Enum, it is in between bounds. This slightly baffles me now.
  15. Oh, I forgot to mention that should work public properties also, I modify original, I still can... MAybe it is now more clear what I am after... -Tee-
  16. I think I explained myself poorly. That won't work because it depends on TypeInfo(TMyEnum) My code must not know/depend on the (hardcoded) type, it should be dynamic. Work with any given property, that is any type of Enum (some limitations may apply, but if works simple enums like one in example, it is OK).
  17. That might be true, I should have it somewhere. Should read it again. I have only checked few specific things from it.
  18. https://towardsdatascience.com/34-faster-integer-to-string-conversion-algorithm-c72453d25352 To my understanding Delphi has bit different algorithm, but looking at "default implementation" mentioned article or one Delphi has, it is pretty complex beast in either case, and some what computationally heavy. Delphi has lookup tables and DivBy100() which I would guess it'll make it faster than the "default implementation". Not sure tough. lr_printer Github repo: https://github.com/tigranh/lr_printer -Tee-
  19. Tommi Prami

    Delphi 12.1 is available

    Mine did not. Restarting encountered into same dll-error, don't remember which dll it was. and did not take screnn shot etc. 😞 Coworker cant open IDE even after clean install... Freezes at the Splash Screen... -Tee-
  20. Tommi Prami

    Delphi 12.1 is available

    Remember to uninstall Parnassus-plugins before installing. Web Installer failed because forgot to uninstall them first. Had to make installer to clean all settings. Takes some time to get all settings as needed because of that. -Tee-
  21. Tommi Prami

    kuLibrary

    Could you instead of the site update all to the GitHUB, so it would be much easier and better place to public open source library. And keep it up there, and if needed link your own site to the GirHUB and maintain only that actyively. -Tee-
  22. No idea how it would be done, but for more than less static lookup list etc, this could be very good idea.
  23. Did not know that. Thanks for info... -Tee-
×