Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


IgorSavkic last won the day on March 25

IgorSavkic had the most liked content!

About IgorSavkic

  • Rank

Smart Mobile Studio

  • Edition

Recent Profile Visitors

561 profile views
  1. IgorSavkic

    Checkbox Wordwrap

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

    Database development

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

    Designer not working

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

    Designer not working

    Yes, it worked fine and then stopped.
  5. IgorSavkic

    Designer not working

    Yes, also updating SMS, I haven't tried full reinstall.
  6. 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
  7. 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
  8. 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
  9. 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, and it should work
  10. 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.
  11. 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.
  12. IgorSavkic

    Form designer improvements

    Right now form and control definitions, properties and events are stored inside .sfm files. In new SMS IDE designer uses Chrome so there's a nice opportunity to update that part, my idea is to store control definitions inside regular html files and have events and SMS specific properties stored inside .sfm file. That would probably be a major upgrade but it would bring so much benefits, for example separation of UI design from code, UI would be handed to designer and I could focus on programming logic. It would also allow to reuse available online templates and libraries, which would shorten development time. Alternative (perhaps easier to implement) would be build html importer, when you need a new form, select external .html file and IDE recreates it as standard .sfm file, unsupported controls could be mapped to neareast SMS equivalent (for example UL/OL lists would be mapped to ListBox) or to standard div/panel.
  13. IgorSavkic

    Waiting for controls to be ready

    What is not the recommended way of checkinf for object and all of it's children (say form and 10 controls on them) to be DOM ready? There's no OnObjectReady event, so probably something else? WaitFor, ReadyExecute?
  14. IgorSavkic

    css styling

    > It also makes life somewhat complicated. Easiest is just to forget about the layout functions in any css framework (positioning, sizing), and just > stick with the Smart layout system. That still leaves many css functions to do with colors, backgrounds, typography, borders, svg and effects It's probably matter of preference, I have very bad experience with SMS layout system in 2.2 version and to me it's preatty easy to get what I want with css. Haven't tried new one in 3.x version though. I'm not sure it can handle adjusting to different screen sizes or adding spacing between controls or width/height settings (2/3 of parent, 1/4+ 2/5 and similar stuff which are quite easy with css).
  15. IgorSavkic

    css styling

    I've also tried tailwind and it's quite nice and relatively easy. Hardest part was understanding how to make it's css classes compatible with SMS, for example setting alignment usually do not work since tailwind style is in colision with absolute position (or left, right, top, bottom, widht and height). Anyway for integration into SMS it would need an option in a control to specify what to emit when generating code, for example exclude absolute or left, right values. I'm thinking of some kind of property on control like TCtrlOptions = (coExcludeAbsPos, coExcLeft, coExlWidth, coExcHeight)... and we could simply set up those in ObjectInspector. Probably to make these setting inherited from parent (like ParentFont), set soExclAbsPos on a panel with 20 children and all of them when created wouldn't include position: absolute.