Jump to content
uniGUI Discussion Forums

Ron

uniGUI Subscriber
  • Content Count

    265
  • Joined

  • Last visited

  • Days Won

    23

Ron last won the day on September 7

Ron had the most liked content!

Community Reputation

67 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. Ron

    url rewrite

    You should be able to access the /server by specifying the whole path, like http://domain.com/myapp/myapp.dll/server
  2. Ron

    url rewrite

    To avoid having to specify the .dll file ending you can set DirectoryIndex in httpd.conf: <Directory "C:/appfolder> Options FollowSymLinks ExecCGI AllowOverride None Order allow,deny Allow from all DirectoryIndex myapp.dll </Directory> Alias /myapp "C:/appfolder" This also cleans up the url so the .dll part does not show.
  3. OK, I realize it could be a problem with the hyperserver, as new servermodules might be created at new client connections. Then you need to clear the sessions list when you start or restart the hyperserver, i.e. the IIS or Apache which runs the hyperserver. I use a script which triggers a webserver restart each night at 2AM, and this also restarts the dbserver. In such a script you could clear the db sessions table before starting the webserver. But having the option of triggering an event at hyperserver first init would be nice, as requested.
  4. In the UniServerModule.Create event you can clear all active sessions in the db.
  5. Ron

    How to Print a Local Printer in unigui?

    If you have an application (service) running locally on the machine connected to the printer, you can then check your server DB every few seconds to see if there is a print job ready. You can set up a table for print jobs in the DB, and store the jobs there, and when they get printed you mark the row as done. So each few seconds connect to db and run query on all unprinted jobs, and print whatever is unprinted and mark it as printed.
  6. Ron

    has been blocked by CORS policy

    The server is blocking the connection, and you have to specify allowed origin in the server config and restart it.
  7. Ron

    Some Questions

    procedure TTransForm.signalEvent(EventID:integer); begin case uniMainModule.polling of 2: UniSession.AddJS('$.get("http://127.0.0.1:'+uniMainModule.kassePort+'?event='+inttostr(EventID)+'&op='+uniMainModule.initialer+'", function( data ){' + ' ajaxRequest(TransForm.form, ["regEvent"], { response : data }); '+ ' }); '); 4: UniSession.AddJS('$.get("http://127.0.0.1:'+uniMainModule.kassePort+'/regevent.php?event='+inttostr(EventID)+'&op='+uniMainModule.initialer+'", function( data ){' + ' ajaxRequest(TransForm.form, ["regEvent"], { response : data }); '+ ' }); '); 5: UniSession.AddJS('$.get("http://127.0.0.1:'+uniMainModule.kassePort+'/cgi-bin/regevent.cgi?event='+inttostr(EventID)+'&op='+uniMainModule.initialer+'", function( data ){' + ' ajaxRequest(TransForm.form, ["regEvent"], { response : data }); '+ ' }); '); end; end; procedure TTransForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var resp:string; begin if eventName='regEvent' then begin resp:=Params.Values['response']; if resp='OK' then begin // end; end; The first function is doing a jQuery http GET to the local webserver doing cross-origin scripting, and option 4 is calling a php script, with 5 calling a cgi exe file, and the first option calling an indy http server running as a windows service. Then just pass along the callback function, and catch this in the ajaxEvent handler, and pick out the response from the php script, or the cgi executable, or the indy server.
  8. Ron

    Database access and Asynchronous

    "Blocking" refers to whether the function/method returns only after execution is completed, or if it e.g. spawns a thread to do the job and then returns immediately without you knowing if anything at all has been done or not. In case of non-blocking components, you typically have to check a status event to see how things go, or you can hook into some finishing event if that exists. I guess most db-components are blocking, and this should be easy to determine from their documentation. To test things out, just get a free test server and run some tests. You can also do some checking to see if previous changes have been applied, before each new posting, for the most critical sections. Just to be sure.
  9. Ron

    Database access and Asynchronous

    Synchronization involves the interaction between client and server, so when you are operating on only one side there is no such problem. The only question in this case is if your db access methods are blocking, and if they are they will be executed sequentially as usual. One way to try this out is to simply test it and see what happens.
  10. Ron

    How can I refresh a TUniHTMLFrame ?

    I have had maybe some related issue, as I am loading some HTML into the frame and then adding JS by UniSession.AddJS, and if things gets mixed up, I just reload the HTML again, kind of starting on scratch. It seems to work for me.
  11. How the webserver running your Unigui app responds to e.g. page1.php, depends on its setup. If it is not set up to handle *.php, then it will probably not handle it, and not trigger your Unigui app. You can set up a redirect, so that any file you wish gets executed when page1.php is requested, and that request may be added as a parameter, which you may then pick up in the Unigui app and respond to, producing some specific html that you want to give the bots, if that is the goal. As mentioned above, you may respond with some predefined html by using HttpCommand or you may respond with the complete application by doing some automatic login in the background if a certain parameter is used, and directing the bot/user to a specific page/form if you want to.
  12. Ron

    Push Message

    I use a socket.io Javascript client, and a Node server running a socket.io server. The client is set up in a UniHtmlFrame, and also doing authentication using AjaxCallback. It works, and is not that complicated to set up. But native components, client and server, would be nice. Guess the fallback stuff used by socket.io is needed, in case there is no websocket support in the browser - then it uses long polling.
  13. Ron

    uniGUI trying to close window on start

    The dangerous thing with invisible form code. Better to have it with the rest, and inject it on create.
  14. Ron

    HowTo: Connect popup menu to dbmemo

    A typical challenge, and the downside of a context menu is that you have to know about it, as it is not visible at the outset. Buttons with text makes it difficult to build a dynamic menu, but then you have toolbars which give more flexibility. A vertical toolbar with only icons initially, where it expands to a menu horisontally with text at hovering...aligned right. I see the need to put icon buttons into a memo field, like the editors.
  15. Ron

    Minor issues since upgrade to 1.5.0.1480

    I would look for some kind of concurrency issue or a timer that gets fired after the form is closed, or some reference to an object on the login form after it is closed. Just because the code worked earlier, it does not mean it was without flaws, as the previous version of the library could have been more forgiving in some cases and then getting stricter as loopholes are closed. What is your code as you click the login button?
×