Jump to content
uniGUI Discussion Forums


uniGUI Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


Ron last won the day on November 22 2018

Ron had the most liked content!

Community Reputation

66 Excellent

About Ron

  • Rank
    Advanced Member

Profile Information

  • Gender
  • Location

Recent Profile Visitors

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

  1. 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.
  2. Ron

    Some Questions

    procedure TTransForm.signalEvent(EventID:integer); begin case uniMainModule.polling of 2: UniSession.AddJS('$.get("'+uniMainModule.kassePort+'?event='+inttostr(EventID)+'&op='+uniMainModule.initialer+'", function( data ){' + ' ajaxRequest(TransForm.form, ["regEvent"], { response : data }); '+ ' }); '); 4: UniSession.AddJS('$.get("'+uniMainModule.kassePort+'/regevent.php?event='+inttostr(EventID)+'&op='+uniMainModule.initialer+'", function( data ){' + ' ajaxRequest(TransForm.form, ["regEvent"], { response : data }); '+ ' }); '); 5: UniSession.AddJS('$.get("'+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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. Ron

    Minor issues since upgrade to

    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?
  11. Sure, we all understand that. I waited about 3-4 years running a small app with Unigui, before I took the chance to migrate a bigger app. But during the years since 2012 I have had only great experiences with Mr. Farshad, and I realize what kind of personality he is. Introvert, hard working, disciplined, organized, systematic, goal-oriented etc etc. Time and again I am taking myself in being highly impressed by the work he has been able to keep up, over these years. I realize this is unusual and that he has done something that no other company with tons of resources has be able to do: taking a very complex technological issue and making it simple. People are different. Some make a mess no matter what they do, while others make it work consistently. I am 100% sure about one thing: Mr. Farshad is not taking this issue lightly. He is not going to take any chances after all this work, as that would totally contradict all previous efforts. The reason some things might take a while to get addressed, is probably due to his diligence, wanting to cover all aspects involved and deliver a great solution. That is what I believe. Surely, in theory anything might happen, and life comes with no guarantees. Just have to live with that.
  12. Ron

    Call another web application

    This you can solve by adding some URL parameters, which you then pick up and use for automatic login. This may include some random code which has a time limit and may only be used once for login, and gets cleared in the db afterwards.
  13. Even though I agree that a plan B is always called for, I have never been scared due to the apparent lack of such in this case. I have never lost a second of sleep over this issue - but maybe I should have. So far it would not have amounted to anything, though, and would only have been a waste of time. Surely, life does not come with a promise of being risk free. But past events predict future behavior, and risk is often related to idiosyncratic issues. Based on this I have the utmost confidence in Mr. Farshads ability to stay in the loop.
  14. Ron

    Hi,How to use 1.50?

    I thought about the same, but then wondered if that would create some future limitations. But both could be available, with one overriding the other. E.g. if there is a config file, that overrides servermodule settings.
  15. Ron

    How to prevent focus on a column in unidbgrid?

    Agree, it's really not reasonable that it should take 12 hours for a message to be visible on the forum on the other side of the planet, but so it is...Just have to live with it.