Jump to content

Oliver Morsch

uniGUI Subscriber
  • Posts

    356
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Oliver Morsch

  1. But in professional version you must buy it as addon
  2. Be sure there is no open transaction (make a "commit") and/or look how to set "transaction isolation level" in Zeos: - read commited: transaction sees new data by others only if data is commited - read uncommited / dirty read: transactions sees data before commit - snapshot: transaction makes a snapshot, changes by others are completly ignored - ... I have the connection in MainModule. Queries can be on MainModule or on other modules and forms. You can choose the isolation level you want. Schöne Grüße aus Deutschland nach Österreich...
  3. If the vendor does not explicitially say it is thread safe, you must use a own connection for each session (-> place connection component in MainModule). I use the built in intebase components for firebird database. Such problems are not really reproducable. Thats the biggest problem with testing of threaded applications. And: You test with 2 - 3 connections and may have luck, the customer "tests" with > 100 connections/threads...
  4. Are you sure that ZesoLib/ZConnection is thread safe? If not, your problem is completely another...
  5. You can't prevent "go back", "refresh", "realod", "close", ... totally (see answer of zilav). But you can show a warning, which the user must confirm: Put this code in UniMainForm.script: onbeforeunload = function() { return "This will close the web app! Are you sure?"; };
  6. Different ways: - UniServerModule.CustomFiles (with external JS file) - UniForm.Script - UniHtmlFrame.HTML - UniSession.AddJS(...) - use a anonymous function / closure
  7. Use the callback parameter/option of the animation to set a javascript(!!!) function called after animation has completed: http://docs-devel.sencha.com/extjs/4.1.1/#!/api/Ext.fx.Anim-cfg-callback In this JS function you can use ajaxRequest(...) to send updated data to the server (see forum).
  8. You can use this in an UniHtmlFrame: <div id="viddiv" style="display:block; width:100%; height:100%"> <video id="livevideo" width="100%" height="100%" autoplay></video> </div> <div id="picdiv" style="display:none;"> <div id="picdivbuttons" style="width:100%"> <button onclick="upload();">Upload</button> <button onclick="tryagain();">Try again</button> <button onclick="closeapp();">Close</button> </div> <div id="picdivcanvas" style="width:100%;"> <canvas id="takenpic"></canvas> <div id="picdivbuttons"> </div> <script type="text/javascript"> var video = document.getElementById("livevideo"); var canvas = document.getElementById("takenpic"); var context = canvas.getContext("2d"); navigator.getMedia = ( navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia ); navigator.getMedia( {video: true}, function(stream) { video.src = window.URL.createObjectURL(stream); }, function(err) { alert("No camera access!"); } ); video.addEventListener('click', takepic, false); function takepic() { document.getElementById("picdiv").style.display = "block"; canvas.width = document.getElementById("viddiv").offsetWidth; canvas.height = document.getElementById("viddiv").offsetHeight; context.drawImage(video, 0, 0); document.getElementById("viddiv").style.display = "none"; } function upload() { alert('Upload the canvas here...'); } function tryagain() { document.getElementById("picdiv").style.display = "none"; document.getElementById("viddiv").style.display = "block"; } function closeapp() { ajaxRequest(frmMain.hfrWebCamPic, "closeapp", []); } </script> After that you have a picture on a Canvas. To upload the canvas (picture) see here: http://forums.unigui.com/index.php?/topic/2019-loading-unicanvas-and-native-canvas-to-db/ Tested with FF and Chrome on Windows and Chrome on Android.
  9. If the UniPanel has the class "hoverpanel" and the UniImage has the class "hoverbutton" (And: UniImage.visible := true in UniGui !) then use the following CSS: .hoverpanel:hover { background-color:#00FF00; } .hoverpanel .hoverbutton{ visibility:hidden; } .hoverpanel:hover .hoverbutton{ visibility:visible; } With UniImage -> ClientEvents -> ExtEvents -> Onclick you can do the following: function Onclick(sender) { alert('delete'); var e = window.event; if (e.stopPropagation) { e.stopPropagation(); //alert('SP'); } else { e.cancelBubble = true; //alert('CB'); }; } But works only with IE and Chrome. FF has no "window.event" and the onclick of a TUniImage has no event/e parameter.
  10. You can use ".manupanel-normal:hover" in css. Or is there a difference to this?
  11. 1) You have set AutoCoInitilize to True in UniServerModule? 2) What option do you use: dirtyread, readcommited, ...? 3) What problems?
  12. You have to use FindFirst/FindNext to find the files and/or folders on the server. To display the results in browser window use a TUniXXX Component (TUniListBox or other).
  13. Do you want something like this: UniSession.AddJS('ajaxRequest(MainForm.form, "mce", ["text="+encodeURIComponent(tinyMCE.get("ed1").getContent())])'); ? (see here)
  14. try this: <input type="button" value="Test" class="button" onclick="ajaxRequest(MyForm.UniHTMLFrame1, 'MyEvent1', [ 'param0=A', 'param1=B' ]);"/>
  15. Hi! With this app you can run a cmd or console app in an interactive way. Just like sitting in front of a "cmd" on a PC. This project is similiar to "PHP Shell" (http://www.tecmint.com/linux-shell-access-on-browser-using-php-shell/), but "WebCmd" is interactive and uses UniGui instead of PHP. It is also helpfull, if you use console apps on the server to perform something (creating PDF's, converting Files, ...). If such a process runs very long, the user get results (output) at every time with WebCmd; if you use a standard "CreateProcess()" instead the result is only available after process has finished. If you want to use interactive input (optional) you must enter the command / input into the edit field below and then press enter (no "inline" edit/ input possible). Use "exit" command to close a cmd, just like in a normal cmd. Regards Oliver WebCmd.zip
  16. You can include any HTML/JS/CSS into the generated web page, no matter if your own (HTML/JS) code or JS library. Access is only limited if you embed an external web site using TUniURLFrame (= iFrame).
  17. Should be similiar to using TinyMCE in UniGui: You can use TUniHtmlFrame to include this.
  18. If you have a html table you must add a javascript onclick event to a row or a cell: <table> <tbody> <tr onclick="alert('record number 1')"> <td>1</td> <td>2</td> <td>3</td> </tr> <tr onclick="alert('record number 2')"> <td>4</td> <td>5</td> <td>6</td> </tr> <tr onclick="alert('record number 3')"> <td>7</td> <td>8</td> <td>9</td> </tr> </tbody> </table> <p> </p> But instead using alert() in example you must use ajaxRequest(...) (see forum) and then you can use the onAjaxRequest event on server side to catch the message.
  19. You have 4 alternatives: (1) UniHtmlFrame Your HTML code is now part of the UniGui. You can use javascript on click to send a message to the server: ajaxRequest(...) (2) UniUrlFrame (iframe), if server and port are the same You can access the iframe from UniGui html page and vice versa using javascript (3) UniUrlFrame (iframe), if server and/or port are different Alternative (2) doesn't work. But you can change the url (parameters) of the iframe and on change of the url do something (4) completely independent See my project "MessageServer" With this it is even possible to click on the php site on one pc and show the message on another pc in unigui (sure iframe also possible).
  20. This table cells have the css class "x-unselectable". Changing it to "x-selectable" makes it possible to select (and copy) the text.
  21. Now tested: I had forgotten "function" in/before "myFunc()" declaration. I have changed code in #5. It works for me.
  22. use TUniForm.script property for a javascript: function myFunc() { alert('do Something after timeout'); } myTimeout = window.setTimeout(function(){myFunc();}, 20000); and in onMouseMove: function window.Onmousemove(sender, x, y, { window.clearTimeout(myTimeout); myTimeout = window.setTimeout(function(){myFunc();}, 20000); } (not tested
  23. I would use javascript: myTimeout = window.setTimeout(function(){myFunc();}, 20000); // set new timeout (call myFunc() after 20 s) window.clearTimeout(myTimeout); // clear last timeout (before set a new one)
  24. I think this needs HTML5. Here is an example using drag&drop (instead of file dialog): http://forums.unigui.com/index.php?/topic/2490-multiple-file-upload/?p=11814
×
×
  • Create New...