Jump to content

Ron

uniGUI Subscriber
  • Content Count

    315
  • Joined

  • Last visited

  • Days Won

    24

Ron last won the day on September 24 2019

Ron had the most liked content!

Community Reputation

84 Excellent

About Ron

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Norway

Recent Profile Visitors

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

  1. I have tried that, but as the fields rearrange with smaller window width, the height of the containing panel is not automatically adjusted to fit the fields. To get variable field width, I have this arrangement: 1. A panel - CPanel - with layout "border", with maxheight and minheight, which acts as a container for the next panel 2. A panel - FPanel - with layout "auto", with maxwidth, minwidth, maxheight and minheight 3. A fieldcontainer with layout "column", with maxwidth and minwidth But the height of the containing panels are not adjusted. Here is the code, and
  2. I want fields to be in two columns at a window width greater than a certain width, and then only a single column when the window is smaller than this certain width. How to do this? I guess that I cannot use two containers, as in the first image, but if I use only one container, how to make it overflow to a second column when the container is too small for the fields? PS: Unfortunately I was unable to upload images.
  3. It is all based on ExtJS, where you can find the documentation: https://docs.sencha.com/extjs/7.0.0/modern/Ext.SegmentedButton.html#cfg-margin Granted, ExtJS is a bit complex...
  4. I have found a compromise: if I reload the application about 3 seconds after the deploy file is swallowed up by the HyperServer, then I will catch the new version in most of the cases: procedure TMainForm.checkTimerTimer(Sender: TObject); begin if fileExists('c:\antirust\timebok\deploy\timebok.dep') then begin UniMainModule.log('Fast Reloading application after 3000ms delay...'); sleep(3000); showToast('Fast Reloading application - time: '+TimeToStr(now)); uniSession.AddJS('document.location.reload();'); end; end; From the log: 3:00:20 PM Deplo
  5. For development, I am using a special setup, trying to reduce time from compilation to browser refresh without any issues. For this I have to use HyperServer, due to is ability to automatically reload a new application file, from the deploy folder. So I run a webserver on my development PC, apache 2.2, and I have a post-compile event in Delphi which copies the EXE file to the \deploy folder, renaming it to *.dep. I have a timer in the mainForm which discovers that the HyperServer has loaded the new application file: procedure TMainForm.reloadTimerTimer(Sender: TObject); be
  6. Then it works fine! Thank you very much, Sherzod I assumed that the name was set to the variable name, as with the design time components, and that it was not necessary to set it specifically.
  7. I am not able to make extevents linked to a runtime created panel to work, although unievents linked to runtime created objects seem to be working fine. I have made a testcase with two panels, one design time created and one runtime created, with the same mouseover event, triggering a console.log function just for testing. The events are stored OK in the runtime created panel object, something you will see if you check the value for mouseover, but the events are somehow not triggered. project1.zip
  8. Me too, and the service app rarely gets updated, in contrast to the unigui app. Also, it is nice to have the service app running if you have to take the webserver down, keeping all those regular executions working fine during downtime. Code separation is a great principle in software philosophy.
  9. Looking forward to check it out !
  10. You can do an http call to start the server, after the webserver reboot. I use the windows task manager to do the webserver and dbserver reboot each night at 2 a.m., and I could set up a task running 5 minutes after this, which calls the unigui app over http. Just make a call and then terminate it.
  11. When it comes to storing the user's first login information (email at least), there are basically two choices: 1. Not store the info in the db, but only in the link as a parameter, and then pick it up at verification and send it to the login form/complete account registration tab. But this makes it insecure, so token and email should really be encrypted into a single parameter and decrypted at verification. Or you can hash it, but then you need the original data to check the incoming hashed parameter, and that brings us to the next option. 2. Store the info in the db, with the tok
  12. If there is an authentication or verification error, the user should always end up at the Login form. So that is where you have to place whichever messages to such users, and specifically in the onShow event, as it fires after the mainModule's beforeLogin event in case the return var handled is not set to true.
  13. Just try to manually add a token to the db, using INSERT into token values(0, now(), 'test') and then do a select on the same token, using select id from token where created<adddate(now(), interval 15 minute) and token='test'; If you get a result id, then there is nothing wrong with the queries. Since you get transported to the error page, a parameter is picked up during the beforeLogin event, but I have no idea why the query does not return a result set. Try and remove the date criteria, like select id from token where token=:token; and see what happens.
  14. As long as I unlock the timer after having done something, it works in my project running as a DLL under Apache. procedure TUniServerModule.UniThreadTimer1Timer(Sender: TObject); begin UniThreadTimer1.Lock; syslog('test server'); UniThreadTimer1.Unlock; end;
  15. Here is an example with a login form, where the checking is done in uniMainModule.beforeLogin. Token query is updated, had an error. emailconfwithloginform.zip
×
×
  • Create New...