Jump to content

IgorSavkic

Members
  • Content Count

    274
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by IgorSavkic

  1. What is the syntax for smsc to compile sproj file? It's a visual project file that compiles fine from within IDE.
  2. IgorSavkic

    System.Types

    I've noticed there's TVariant.IsString but also TVariantHelper.IsString (same for several other functions). They do the same thing, isn't one enough?
  3. Thanks for these details, I learn a new trick every day
  4. Thanks, it's quite informative. I never heard before of calc, it could be useful on certain pages.
  5. IgorSavkic

    gestures

    Looks interesting, I think it could be implemented as partial class and added to RTL just like with MouseTouch.pas
  6. IgorSavkic

    proxy

    Have you perhaps used Vue, does it manage/track all levels or only first?
  7. IgorSavkic

    proxy

    Thanks, it seems to intercept any level get but only first (tracked) level set. leveltest.level2 := new JObject; ProxyObj.leveltest := leveltest; ProxyObj.leveltest.level2.level3 := 'level3Value'; Button3.OnClick := lambda Memo1.Add(MyProxy.leveltest.level2, True); MyProxy.leveltest.level2.level3 := 'changedLev3Value'; Memo1.Add(MyProxy.leveltest.level2.level3, True); MyProxy.leveltest := 'changedLev1Value'; leveltest := 'changedLev1Value2'; Memo1.Add(MyProxy.leveltest, True); end;
  8. IgorSavkic

    proxy

    Quite interesting, I've done something similar and never knew this was possible. Do you know how does it handle setting subobjects, for example, you're proxying object which has 5 levels of subobjects and some property in level3Object is changed?
  9. IgorSavkic

    app

    Nice, what did you use for payment processing?
  10. IgorSavkic

    responsive grid

    Wouldn't you get same effect with flex style?
  11. Here's example for csv file: var csv: string; begin csv := 'Field1,Field2,Field3' + #13#10; // Add other lines to it var link = w3_createHtmlElement('a'); link.href := 'data:text/csv;charset=utf-8,' + EncodeURI(csv); link.target := '_blank'; link.download := 'CarlSearch.csv'; BrowserAPI.Body.appendChild(link); link.click(); BrowserAPI.Body.removeChild(link); end;
  12. It's 3.9.1.171, I think it's same in all SMS versions, even latest stable (2.2.4543, where functions are called differently but code algo is same). I'm getting: 2020-02-01 18:00:00 [line #590] 2020-02-01 16:00:00 [line #590] 2020-02-01 17:00:00 [line #590] We're in different timezone (I'm CET), most likely that's the why you see difference, perhaps you would get wrong time for (which gives me correct one): Temp := EncodeDateTime(2020, 10, 1, 18, 0, 0, 0);
  13. That needs fix from dev team, but as a workaround try to write class helper (untested) and hopefully it will take precedence over default declaration. JPathExportHelper = class helper for JPath_Exports function Join(Paths: string): string; end; and implementation as: asm @Result = join(@Paths); end or Result := Variant(Self).join(Paths);
  14. var Temp, Wrong, Correct: TDateTime; begin Temp := EncodeDateTime(2020, 2, 1, 18, 0, 0, 0); Wrong := LocalDateTimeToUTC(Temp); Correct := LocalDateTimeToUTCDateTime(Temp); WriteLn(DateTimeToStr(Temp)); WriteLn(DateTimeToStr(Wrong)); WriteLn(DateTimeToStr(Correct)); end; Problem is that SMS uses current time to calculate UTCOffset which is not correct, it must calculate offset from the given time. Solution is something like: var JD := DateTimeToJDate(LocalTime); result:=LocalTime+JDateToDateTime(JD)-JDateToLocalDateTime(JD); Or better yet just make LocalDateTimeToUTC call LocalDateTimeToUTCDateTime from DWS
  15. In latest version if two instances are started second one crashes, trying to open port and that's already used by first instance. Check details in attachment. SMSCrash.7z
  16. Sometimes these composite controls are good but in other not really, I had a lot of problem with TCheckBox in styling and flex positions so I've started using instead simple div as container and inside span for caption and editbox (check input) and all works exactly as I want. So perhaps checkbox control should be simplified.
  17. > Today I started then adding SQLite. I started by downloading a database file with TW3HttpRequest and loading it from a stream. Again, a few > bugs and improvements had to be made, but now it works and I have a nice mechanism for loading any binary data from a file. Is that for readonly sqlite databases? Or do you mean to store updated one in localstorage? > But now then... Making it possible to read the results of a SQLite query through a dataset.... Here I hit a little road block and don't know how to proceed. It's > simple to make a select-query and access that data for results, but what's the best way for me to know what the fields are? Their names and datatypes SQLite on desktop returns both fieldname and datatype, I guess that JS SQLite version doesn't return all that, so I think best is just to use Variant for all fields, and leave to user of Dataset to access it AsStr, AsInt, AsFloat... After all writer of that query should know what columns he'se selecting in query and what are datatypes.
  18. That solved it, wasn't firewal but it was changed port to 8091 (IDE Settings/Server), after restart IDE stopped working. I've tried other ports and none worked. Probably 8090 is hardcoded and changing doesn't reflect that.
  19. Yes, it worked fine and then stopped.
  20. Yes, also updating SMS, I haven't tried full reinstall.
  21. I don't know what happened designer (for any project) stopped working, doesn't show any components. Also shows empty Welcome screen. But otherwise works, projects compiles and works. I don't know if I changed some setting that controls this. SMS is 3.9.1.167
  22. And mustache template is equal to one I've sent? I have no idea, only to debug code and see what's going on during client wrapper creation. Here is project I have. BTW note that your file has wrong unit name (differts to file name) but that's probably you trying something. SmartMobileStudio.7z
  23. > The new one has no UserName and Password. When I remove them, I am able to compile and connect to the service. It seems you have wrong path or wrong file, check in Project14ServerHttpWrapper.dpr call to AddToServerWrapperMethod, it specifies location of mustache template for SMS, it should resolve to your mORMotUnpackDir\CrossPlatform\templates. If you're running mORMotUnpackDir\SQLite3\Samples\27 - CrossPlatform Clients\Project14ServerHttpWrapper.dpr those paths should match. I'm including correct SmartMobileStudio.pas.mustache and mORMotClient files. > However, I run into issues with this: XMLHttpRequest with the synchronous flag set to true is deprecated due to its impact on user-perceived site > performance.It's probably because TServiceClientAbstract.Create does a synchronous call in CallRemoteServiceInternal > and CallGetResult returns an unidentified result. This has been the case from the start, but it doesn't affect working code. Once when browsers really remove that call it will stop working, there's no solution yet, ab from mORMot isn't using SMS anymore so someone else has to solve it. SmartMobileStudio.zip
  24. You can download it from https://synopse.info/fossil/wiki?name=Downloads, file is mORMotNightlyBuild.zip. Unpack somewhere and copy units from CrossPlatform dir to SMS libraries dir. Now you can try some code, go to SQLite3\Samples\27 - CrossPlatform Clients, compile in Delphi Project14ServerHttpWrapper run once as admin compiled Project14ServerHttpWrapper.exe, this will register it as a handler within http.sys now start Project14ServerHttpWrapper.exe as normal user and leave it running. go to http://localhost:8888/root/wrapper, download SmartMobileStudio client unit copy downloaded mORMotClient.pas to Samples\27 - CrossPlatform Clients\SmartMobileStudio now compile "27 - CrossPlatform Clients\SmartMobileStudio\Project14Client.sproj in" SMS run it with F9, press Server connect, it should give an error now try it in Chrome http://127.0.0.1:8090/index.html, and it should work
  25. I've tried same thing two weeks ago and it works. SMS is same version and mORMot is from December. I've used files from mORMot and latest SMS Alpha update.
×
×
  • Create New...