Jump to content

Mehmet Emin

uniGUI Subscriber
  • Posts

    229
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Mehmet Emin

  1. You can try the following: After a successful login, save the current unigui session id to a log table with a timestamp and one time use flag. Terminate the current unigui session, redirect user to a special URL like /refreshsid?_S_ID=<your old session id>. As browser redirects to new URL unigui will generate a new session id. Check the old session id received from params[] to log table if exists then flag this user's mainmodule (it is recreated since you terminated the previous session) as logged in. So you have changed the session id after login without asking password again It is easier if you to handle your login procedure manually instead of using unigui build in login form logic for the above case and many other cases. Why the security guys ask to change session id after login? Aren't you using SSL always, before and after login?
  2. Thanks, I have managed to solve this issue with this:
  3. in order not miss those multiple records with same timestamp as result of some concurrent updates. I prefer timestamp>=: instead of >. but anyway I hope this simple trick solves your need.
  4. Just keep the last id of the fetched records in a field on your thread and have the sql query like this: select xyz from player_move where id>:id so that you get only the new records. if you are interested in changed records since your previous query, have a timestamp column on the table to be updated at each update (also create an index on the timestamp column) so: select xyz from some_update_table where timestamp>:timestamp so that you get only the updated records.
  5. Hi, Your method of handling an external http request is not correct for a uniGUI server project. Do it this way: Use UniGUIServerModuleHTTPCommand event to handle json requests. procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); I hope the following example code helps: if ARequestInfo.URI = URI_device_getcommand then begin Handled := True; // SET. true THIS IS IMPORTANT the rest fo the code is a sample: DevicePostString := nil; DeviceJSon := nil; CommandJSon := nil; LConnection := nil; LDevice := nil; try DevicePostString := TStringStream.Create(''); DevicePostString.CopyFrom(ARequestInfo.PostStream, ARequestInfo.PostStream.Size); DeviceJSon := TJSonObject.ParseJSONValue(DevicePostString.DataString); if DeviceJSon.TryGetValue<String>(JSON_PATH_DeviceCode, LDeviceCode) then begin LDeviceStatusInt := 0; LPowerOnTime := 0; LPowerOnMinutes := 0; DeviceJSon.TryGetValue<String>(JSON_PATH_MACAddress, LMACAddress); DeviceJSon.TryGetValue<Integer>(JSON_PATH_DeviceStatus, LDeviceStatusInt); DeviceJSon.TryGetValue<Integer>(JSON_PATH_PowerOnMinutes, LPowerOnMinutes); DeviceJSon.TryGetValue<String>(JSON_PATH_PowerOnTime, LPowerOnTimeStr); TryISO8601ToDate(LPowerOnTimeStr, LPowerOnTime, False); LDeviceStatus := TDeviceStatus(LDeviceStatusInt); LConnection := TFDConnection.Create(nil); LConnection.ConnectionDefName := CONNECTION_DEF_NAME; LConnection.Open; LDevice := TZDEVICE.CreateWithConnection(LConnection); with LDevice do begin
  6. May be you did not deploy your image folder contents under your iis server, then the http error would be 404 check your iis logs to see exact url your browser trying to access
  7. But since pas2js is open source I would go that way and develop the wrapper yourself.
  8. To be more precise, this one has the wrapper (commercial) https://en.wikipedia.org/wiki/Smart_Pascal
  9. I don't know if they are free code (probably not). But have a look at this link, it will give you a good start: https://www.delphitools.info/2012/05/31/webglscene-something-is-brewing-in-the-lab/
  10. Hi Sergio, If you prefer the pascal language to target internet browser/javascript environments, there are already wrappers for GLScene in pascal language for this, they compile/transpile your code to javascript. So uniGUI has nothing to do there. If one day uniGUI decides to integrate one of those (for example pas2js) to uniGUI then it would be a beautiful thing.
  11. I just want to correct my initial finding; It is OK to use frames with mobile. Those desktop style properties change to mobile as you drop the frame on a mobile form. They work just fine.
  12. I don't want to hijack your thread and change the subject but can we use Frames for mobile development? After seeing the difference in layout properties of desktop and mobile versions, I completely dismissed using frames for such cases under mobile.
  13. Unfortunately the short answer is no, its not available. Even if you use service workers and trigger some events on the client with server push messages you cannot get it. The browser window should be active in order for navigator.geolocation.getCurrentPosition to work.
  14. I tried every combination but when I open my dataset the first row displays as selected(checked) I want user to decide what to select not the automatically select the first row. How can I avoid auto selection first row in unidbgrid? Thanks in advance.
  15. FMX can be used with embedded web browser to render uniGUI generated app.
  16. Target Android and iOS so that we can use same uniGUI code base to develop apps that work offline.
  17. uniGUI ile yapmanın yolunu öğrenirseniz burayı da güncelleyin, benim de ileri de ihtiyacım olursa öğreneyim. teşekkürler.
  18. Maalesef (UniDBGrid1.Exporter.Title) buna ne atarsanız hem sayfa adına hem de başlığa aynı değeri atıyor. Belki obje yaratıldıktan sonra "name" e atama yapılabiliyordur (JS ile) ancak bunun nasıl yapılabileceğini bilmiyorum. uniGUI yerine direk Excel export eden bir kütüphane kullanmanızı tavsiye ederim. getContent: function () { var a = this, b = this.getConfig(), d = b.data, e, c; a.excel = new Ext.exporter.file.ooxml.Excel({ properties: { title: b.title, author: b.author } }); a.worksheet = c = a.excel.addWorksheet({ name: b.title });
  19. Birinci sorunuza cevap: UniDBGrid1.Exporter.Title := ''; UniDBGrid1.Exporter.ExportGrid;
  20. I appreciate your taking the time. Thank you!
  21. Mobile Modern toolkit / material theme
  22. @Sherzod by component do you mean a uniGUI component or ExtJS component? If you recommend a component I will start using it instead of ExtJS.toast. Thanks
×
×
  • Create New...