Jump to content

Attila Kovacs

Members
  • Content Count

    1936
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by Attila Kovacs

  1. It comes handy for my form designer zoom as the IDE shat full the dfm with explicit values after a forced DPI change on the designed form. thx
  2. Brrrr, the oldschool way is to use DB Aware controls, like TDBSpinEdit and set its datasource to point to the dataset you want. Then you can write: procedure OnClick(Sender: TObeject); begin if Sender is TDBSpinEdit then TDBSpinEdit(Sender).Datasource.Dataset.CheckBrowseMode; // for example end; But, depending on what you are trying to achieve in OnClick it's possible that you have to move that code into the dataset's or its fields' events. (If we are talking about VCL and I understand your issue correctly)
  3. @emailx45 what are you talking about? Do you have to flood every thread with some irrelevant google translated sh*t?
  4. Be positive. You can kill two birds with one stone.
  5. Attila Kovacs

    iPub Refit - REST API in simple way

    Wow, that was an unexpected twist. I hope it's already on the wish list or a bug report was filed as unsatisfactory mimicking of .net.
  6. SetWindow'sVisibleFlagTo( clChequered );
  7. EnableDisableWindow( Agree: boolean )
  8. Attila Kovacs

    iPub Refit - REST API in simple way

    Sorry I don't know what you mean and how to test serialization with an example of deserialization. There should be an option for nullables if "null" values should be serialized or not at all, but you will find this out by yourself one day if you start using this lib with php API's. Anyway, I tried to compile the lib with Berlin and there are couple of things which are only Tokyo+. (Very far from "perhaps XE7"). (Edit: even in Tokyo, System.JSON.Serializers is so buggy that it needs several workarounds) But System.JSON.Serializers.pas compiles fine under Berlin, thanks for bringing this unit to my attention.
  9. Attila Kovacs

    iPub Refit - REST API in simple way

    The other way around. Sometimes you just have to send the values you want to change and if you send a "null" for a field the servers clears it's value on the server side too.
  10. Attila Kovacs

    iPub Refit - REST API in simple way

    I don't know, I don't think that it was in Seattle, as I said, it's not in Berlin. At least I can see now, that you can pass converters. I could not figure it out before, no time to check it now either. But it looks good, there are only two more things coming to my mind which is necessary to handle all kind of json rest services. -To be able to suppress the null values from the nullables (or a shouldmarshal callback/wallpaper) -To be able to send and receive pure arrays "[]" , some php api's are working that strange way Then it will be a really really nice allrounder.
  11. @Delphi-Laie This is really cool man! A suggestion, don't know if it's possible, when the column count is reduced it should not shrink the window width but widen the columns. (Maybe some value would also fit in the columns.) PS: if you delete the "0" in the field "Rotation" the app AV's and dies.
  12. Attila Kovacs

    iPub Refit - REST API in simple way

    TJsonDynamicContractResolver.SetTypeConverter Okay, everything clear now. This unit is based on the very same called in .net. But .net has nullable types and they also have: Well, and what do we have? Yet Another Useless Serializer. I'll stick with my modified REST.JsonReflect.pas where I can register converters and reverters on PTypeInfo base.
  13. Attila Kovacs

    iPub Refit - REST API in simple way

    This is it. You don't have to. System.JSON.Serializers has a JsonConverter() attribute for it. You can even easily implement that only the fields which are - changed or not null or whatever - should be marshalled. Brrrrr. Looks like I was wrong on that. Looks like it's still a decorating-horror. I'll need more investigation on the code.
  14. Attila Kovacs

    iPub Refit - REST API in simple way

    Either they forgot to ship System.Json.Serializers.pas for Berlin, or was not finished to the time, I've checked 2 installations and it's missing in both! I'm still fumbling around with REST.JsonReflect.pas I'm freaking out right now, the header says "Copyright(c) 2016-2018".
  15. Attila Kovacs

    iPub Refit - REST API in simple way

    "but it is likely to work on several previous versions, probably XE7 or newer" I don't think so as I can't find System.JSON.Serializers under Berlin but under Tokyo. (Also lacks from the lib dir) Am I missing this from my installation or is it first appeared in the Tokyo release? Is it possible to decorate the custom nullable fields that this internal serializer/reverter can translate them? A one-time-registered type converter/reverter would be even better.
  16. Attila Kovacs

    Main Form appearing issue..

    No, it's still present if a form takes more than 5 seconds to display. But that doesn't mean you have to make the main form as popup parent always (I guess). I would set it to the caller form.
  17. Yes, or a small IDE expert could do it for you too.
  18. Yes it's a bit annoying, they should fix that instead! 😉
  19. There is. On the other hand, I like the way it is, I can have my object selected meanwhile changing units. Why on earth should the selection be cleared? On what occasion? Nonsense.
  20. Rather not. It would unnecessary slow down changing between units. A lot. An unusable way lot.
  21. Attila Kovacs

    Prevent a sub form being reopened..

    what a coincidence, if you look at Remy's answer, you will get the idea.
  22. Attila Kovacs

    10.4 Could not compile dbgrids

    It's a bogus message. Did you check the project search path? Also the root dir of the project.
  23. Attila Kovacs

    10.4 Could not compile dbgrids

    project options search path
  24. Attila Kovacs

    10.4 Could not compile dbgrids

    shift-f9 if it doesn't help, you have an older/different dbgrids.dcu in the search path fix the search path or remove the file and build the project (shift-f9)
×