Jump to content

All Activity

This stream auto-updates     

  1. Last week
  2. jarto

    Control Alignments

    Thank you. I can reproduce the problem. I'll have a look.
  3. IgorSavkic

    Designer not working

    Yes, also updating SMS, I haven't tried full reinstall.
  4. Daniel Eiszele

    Control Alignments

    Hi @jarto, with reference to the attached project, I am having some issues with control alignments at runtime. Graphically, the below form looks fine in the IDE at design time and similarly if it is the main form at run time, or alternately created dynamically (refer image below). However, when it is a secondary form that is Auto Created at runtime then the editboxes do not adhere to their AlignClient status. (refer to the following image where editboxes are not client aligned). Please let me know if my explanation is unclear. Hopefully the graphics explain the problem well enough though. Alignment Test.zip
  5. jarto

    SMS 3 + mORMot = Error

    Yes, the mustache template was the same. Could you also send a compiled version of the server to jt at smartmobilestudio.com?
  6. jarto

    Designer not working

    Have you tried rebooting?
  7. IgorSavkic

    Designer not working

    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
  8. IgorSavkic

    SMS 3 + mORMot = Error

    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
  9. jarto

    SMS 3 + mORMot = Error

    This is weird. The paths are correct in the dpr and I can connect to the server with the mORMotClient.pas that I can download from http://localhost:8888/root/wrapper If I try the mORMotClient.pas that you attached, the login does not go through. Comparing the two files, it seems that my version just does not require any authentication. I'll attach my version of mORMotClient.pas, which works through connect but does not compute. This is good to know. mORMotClient.pas
  10. IgorSavkic

    SMS 3 + mORMot = Error

    > 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
  11. jarto

    SMS 3 + mORMot = Error

    @IgorSavkicThank you for the great instructions. I was able to download, compile and run Project14ServerHttpWrapper, but ran into problems after that. GetClient in the downloaded version of mORMotClient.pas differs from the original one that is included in mORMot: //OLD one: procedure GetClient(const aServerAddress, aUserName,aPassword: string; onSuccess, onError: TSQLRestEvent; aServerPort: integer=SERVER_PORT); //NEW one: procedure GetClient(const aServerAddress: string; onSuccess, onError: TSQLRestEvent; aServerPort: integer=SERVER_PORT; aServerRoot: string=SERVER_ROOT; aHttps: boolean=false); The new one has no UserName and Password. When I remove them, I am able to compile and connect to the service. 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. fClient.CallRemoteServiceInternal(Call,self,SERVICE_PSEUDO_METHOD[imContract],'[]'); result := CallGetResult(Call,dummyID); And if I ran the compiled app, I am able to reproduce the issue where the internal browser does not load the project. I'll dive into that now, but I'd really appreciate help with this synchronous-issue. @warleyalex
  12. Earlier
  13. jarto

    TNJHttpResponse.StatusCode

    Thank you. Gonna have a look at this.
  14. Daniel Eiszele

    TNJHttpResponse.StatusCode

    Hi @jarto, from what I can tell, it seems that the codegen for the "StatusCode" property of the TNJHttpResponse object is faulty. The problem I am having is that it is not possible to return a Response Status that is not "200"! To test the issue, simply fire up either the NodeJS HttpServer or HttpsServer example and within the HandleRequest event, enter the following line before the Response.end() call. Response.StatusCode := 404; Then try hitting the relevant URL with a client app or using Postman should result in a "404 page not found" response, but it always returns "200 OK" ! However, if I set the statuscode directly on the response handle ie... Response.Handle.statusCode := 404; ...then everything works as expected. Following on from this, but not directly related, is that there is a "statusMessage" property that is missing from the current implementation of the TNJHttpResponse object that would be useful to implement.
  15. IgorSavkic

    SMS 3 + mORMot = Error

    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
  16. jarto

    randomize

    Eric has not reacted yet, so I'll include my own fix in the next update.
  17. jarto

    TVariant Extension Function

    @Daniel Eiszele Thank you, I'll add it. There is also TVariant.ForEachProperty, which can be used for traversing all the properties. It's handy as you get both the name and the value in the same callback. However, it had a bug in it and always returned the value as undefined. TVariant.ForEachProperty(MyVariant, function (Name: string; Data: variant): TEnumState begin WriteLn('Name of the property is: '+Name); WriteLn(Data); result:=esContinue; end); I'm going to include the new TVariant.Values and the bug fix to TVariant.ForEachProperty in the next update.
  18. jarto

    SMS 3 + mORMot = Error

    Do you guys have any advice on how I could help? I myself don't have any mORMot servers that I could use to test against. However, I'd love to get familiar with this and eliminate the problem with the SMS Browser.
  19. dottor_j

    SMS 3 + mORMot = Error

    I tested better. The problem is in the SMS Browser, only in this doesn't work, if i start the default browser it works fine.... Could be a bug of the SMS Browser. Thanks.
  20. IgorSavkic

    SMS 3 + mORMot = Error

    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.
  21. dottor_j

    SMS 3 + mORMot = Error

    Hi Mr. Warleyalex, i'm trying the new 3.9.1.167 version of the SMS, with the latest version (12/2019) of MORMOT and i see that the GetClient wrapper fuction generated don't work. There is some problem on the SetUser function. The same code is full working on a 3.0.2.20 version on SMS. Do you have some updates for the wrappers on Mormot? Thanks in advance for your help. Cristiano.
  22. lynkfs

    md5 on win10

    Sometimes downloaded files come with a md5 hash. Md5 is an algorithm which translates any string or any file into a 128 bit value. This value then can be used to verify the integrity of the downloaded file : just re-generate the md5 hashvalue with a proper utility and compare the generated and the published value. Apparently md5 is not that good, but that's beside the point. It is widely used. There are quite a few md5 checksum utilities available, but the other day I found out that this is baked into win10 as well. No need to download and install a separate utility for this purpose. https://onthefencedevelopment.com/2017/08/15/windows-10-builtin-md5-checksum-calculator/
  23. IgorSavkic

    Form designer improvements

    > I think the challenges would be to identify the controls from the "alien" html and tie them to functionality. With simple buttons and edits it's > easy, but more advanced, dynamic components are harder (like UL/OL-lists to ListBox) I would use attributes for that, for example to associate one div to label: <div ID="OBJ1" data-class="TW3Label" data-comp-name="lblMyLabel"> and from there's it's easy to lookup lblMyLabel control in .sfm file and recreate it properly. ListBox itself shouldn't be a problem, treat UL/OL as simple string ListBox and have a loader function to go through all li elements and call LB.Add for them. ListBox using custom components (for example another form) for items would use custom attributes to write what's necessary for it, and items for it would be added in runtime anyway so no problem of keeping those kind of items serialized to html.
  24. lynkfs

    randomize

    Thanks for your 'Alea' digging. Your temp solution does work, however it still breaks my neural network component There might be some more dependencies than randomize and random only, or something else Wait till fix arrives (just realised that 'alea' is latin for 'gambling', good choice for a randomiser)
  25. jarto

    randomize

    The reason this bug happens is, commit 5e92a541002cd781ad335f0e7a4cd64615ca0f0b in DWS: Here the code checks if SetRandSeed is used. If not, it uses Math.random instead of alea and removes Random from DWS's dependencies, which results in alea.js not being linked in. The problem is, that Eric should also have checked if Randomize is used, before removing the dependency. So I basically know how to fix this myself, but prefer to get an official fix from Eric. Currently you can trick DWS to work properly by adding a call to SetRandSeed before calling Randomize.
  26. lynkfs

    randomize

    The alea function was originally designed by Johannes Bagoe, as a means to improve generating random numbers The original posts (musings) from him are not available anymore, but some links remain : https://stackoverflow.com/questions/8554243/how-to-use-implement-alea-to-generate-better-random-numbers http://jsfiddle.net/rlemon/PZR4d/ If I copy the function in the links above into a smart project, it eliminates the runtime error. However it still doesn't work correctly so I'll wait till the DWS fix Randomize / Random is an integral part to the neural network component
  27. jarto

    Form designer improvements

    It's an interesting idea, that we could you a static html page as a start point. I think the challenges would be to identify the controls from the "alien" html and tie them to functionality. With simple buttons and edits it's easy, but more advanced, dynamic components are harder (like UL/OL-lists to ListBox)
  1. Load more activity
×