Jump to content

Attila Kovacs

Members
  • Content Count

    863
  • Joined

  • Last visited

  • Days Won

    9

Attila Kovacs last won the day on January 21

Attila Kovacs had the most liked content!

Community Reputation

282 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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)
  2. @emailx45 what are you talking about? Do you have to flood every thread with some irrelevant google translated sh*t?
  3. Be positive. You can kill two birds with one stone.
  4. 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.
  5. SetWindow'sVisibleFlagTo( clChequered );
  6. EnableDisableWindow( Agree: boolean )
  7. 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.
  8. 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.
  9. 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.
  10. @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.
  11. 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.
  12. 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.
  13. 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".
  14. 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.
×