Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1266
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. andyhill

    HyperServer

    The IP or Port is already in use -or- the IP does not exist. UniGUI uses default settings for IP and Port unless you override them. I use the following:- procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject); ... AddNewBindingsFlag:= ? HttpPort:= ? BindToIpStr:= ? SslPort:= ? SslPassword:= ? ////////////////////////////////////////////////////////////////////////////// if AddNewBindingsFlag = True then begin Bindings.BeginUpdate; // Remove Any IDE Bindings Bindings.Clear; // Add binding for http with Bindings.Add do begin IP:= ''; Port:= 0; end; Bindings.EndUpdate; // Set http binding/port if UniServerModule.Bindings.Count > 0 then begin // Set Binding [0] http UniServerModule.Bindings.Items[0].Port:= HttpPort; UniServerModule.Bindings.Items[0].IP:= BindToIpStr; UniServerModule.Bindings.Items[0].BroadcastEnabled:= True; end else begin UniServerModule.Port:= HttpPort; end; ////////////////////////////////////////////////////////////////////////////// if UseSslFlag = True then begin SSL.SSLBindings.BeginUpdate; // Remove Any IDE Bindings SSL.SSLBindings.Clear; // Add binding for https with SSL.SSLBindings.Add do begin IP:= ''; Port:= 0; end; SSL.SSLBindings.EndUpdate; // Set https binding/port if UniServerModule.SSL.SSLBindings.Count > 0 then begin // Set Binding [0] https UniServerModule.SSL.SSLBindings.Items[0].Port:= SslPort; UniServerModule.SSL.SSLBindings.Items[0].IP:= BindToIpStr; UniServerModule.SSL.SSLBindings.Items[0].BroadcastEnabled:= True; end else begin UniServerModule.SSL.SSLPort:= 0; end; // Assign Certificate SSL.SSLOptions.RootCertFile:= UniServerModule.StartPath + 'root.pem'; SSL.SSLOptions.CertFile:= UniServerModule.StartPath + 'cert.pem'; SSL.SSLOptions.KeyFile:= UniServerModule.StartPath + 'key.pem'; SSL.SSLPassword:= SslPassword; SSL.Enabled:= True; end; // UseSslFlag end; // AddNewBindingsFlag
  2. Perhaps this may help ... CREATE InfoHTMLFrame.ClientEvents.ExtEvents.Clear; s:= 'dblclick=function dblclick(sender, eOpts) '#13#10+ '{ '#13#10+ ' ajaxRequest(MainForm.InfoHTMLFrame, ''_dblClick_'', []); '#13#10+ '} '; InfoHTMLFrame.ClientEvents.ExtEvents.Add(s); AJAX procedure TMainForm.InfoHTMLFrameAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_dblClick_' then begin // Remember click event may also be fired so you will need to distinguish between click and dblClick perhaps using timing checks end;
  3. As we have removed //CustomFiles.Add('tiny_mce\tiny_mce_popup.js'); Does anyone have tiny_mce with a valid tiny_mce_popup.js ?
  4. I guess you could compare the original blank canvas (I assume initialized to white) with the now saved canvas SaveToStream (no longer all white if signed [contains black mouse lines {signature}]) ? As for real signature as opposed to garbage that is a whole other matter.
  5. Sherzod, Using Ext.button.Button Menu - Please advise how to:- Hide/Show Ext.button.Button at runtime ? Enable/Disable Ext.button.Button Menu Items at runtime ? Thanks
  6. Using MyMemo as a staging area, how to read / write to and from "ed1" ? WRITE MEMO TO TINY_MCE: UniSession.AddJS('tinyMCE.get("ed1").setContent(MainForm.MyMemo.getValue())'); // FAILS WRITE TINY_MCE TO MEMO: UniSession.AddJS('MainForm.MyMemo.setValue(tinyMCE.get("ed1").getContent());'); // FAILS Please advise - Thanks
  7. Does anyone have tiny_mce js files that all work together in order to use the popup feature ?
  8. Thanks Sherzod, Removing popup now runs but I want to use popup. What "incompatibility" ?
  9. SERVERMODULE CustomFiles.Add('tiny_mce\tiny_mce.js'); CustomFiles.Add('tiny_mce\tiny_mce_popup.js'); MAINFORM s:= ' <textarea id="ed1" style="width: 100%; height: 400px;"></textarea> '+ ' <script> '+ ' tinyMCE.init( '+ ' { '+ ' theme : "advanced", '+ ' plugins : "autolink, lists, spellchecker, pagebreak, style, layer, '+ ' table, advhr, advimage, advlink, emotions, iespell, inlinepopups, '+ ' insertdatetime, preview, media, searchreplace, print, contextmenu, '+ ' paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, '+ ' xhtmlxtras,template", '+ ' theme_advanced_buttons1 : "newdocument, |, bold, italic, underline, strikethrough, |, '+ ' justifyleft, justifycenter, justifyright, justifyfull, |, '+ ' styleselect, formatselect, fontselect, fontsizeselect", '+ ' theme_advanced_buttons2 : "cut, copy, paste, pastetext, pasteword, |, search, replace, |, '+ ' bullist, numlist, |, outdent, indent, blockquote, |, undo, redo, |, '+ ' link, unlink, anchor, image, cleanup, help, code, |, insertdate, '+ ' inserttime, preview, |, forecolor, backcolor", '+ ' theme_advanced_buttons3 : "tablecontrols, |, hr, removeformat, visualaid, |, sub, sup, |, '+ ' charmap, emotions, iespell, media, advhr, |, print, |, ltr, rtl, |, '+ ' fullscreen", '+ ' theme_advanced_buttons4 : "insertlayer, moveforward, movebackward, absolute, |, styleprops, '+ ' spellchecker, |, cite, abbr, acronym, del, ins, attribs, |, visualchars, '+ ' nonbreaking, template, blockquote, pagebreak, |, insertfile, insertimage", '+ ' theme_advanced_toolbar_location : "top", '+ ' theme_advanced_toolbar_align : "left", '+ ' theme_advanced_statusbar_location : "bottom", '+ ' theme_advanced_resizing : true, '+ ' extended_valid_elements : "img[class=myclass | !src | border:0 | alt | title | width | height]", '+ ' mode: "exact", '+ ' elements : "ed1" '+ ' } '+ ' ); '+ ' </script> '; InfoHTMLFrame.HTML.Add(s); In browser debug mode I get "Cannot read property 'EditorManager' of null" Any suggestions ?
  10. Sherzod, Hide/Show MenuButton at runtime ? Enable/Disable MenuButton Items at runtime ?
  11. Great. UniSession.AddJS(UniStatusBar.JSName + '.items.add '+ '( '+ ' Ext.create '+ ' ( '+ ' "Ext.button.Button", '+ ' { '+ ' text: "Camera", '+ ' id: "_btn1", '+ ' margin: "0 5 0 5", '+ ' padding: 0, '+ ' width: 300, '+ ' height: 16, '+ ' renderTo : Ext.getBody(), '+ ' arrowAlign: "right", '+ ' menu: [ '+ ' {text: "Item 1" , iconCls: "x-fa fa-camera-retro", handler: function () {ajaxRequest('+MainForm.WebForm.JSName+', "_mnu_one_", [])}}, '+ ' {text: "Item 2" , iconCls: "x-fa fa-video", handler: function () {ajaxRequest('+MainForm.WebForm.JSName+', "_mnu_two_", [])}}, '+ ' {text: "Item 3" , iconCls: "x-fa fa-trash", handler: function () {ajaxRequest('+MainForm.WebForm.JSName+', "_mnu_three_", [])}}, '+ ' {text: "Item 4" , iconCls: "x-fa fa-print", handler: function () {ajaxRequest('+MainForm.WebForm.JSName+', "_mnu_four_", [])}}, '+ ' ] '+ (* ' handler: function() '+ ' { '+ ' ajaxRequest('+MainForm.WebForm.JSName+', "_btn_click_", ["btnId="+this.id]) '+ ' } '+ *) ' } '+ ' ) '+ '); ' + UniStatusBar.JSName+'.updateLayout();'); How can I align the button vertically (paint button in the middle of the StatusBar) - it appears as top=4 ? Also, Hide/Show Button at runtime ? and finally Enable/Disable Menu Items at runtime ?
  12. Experimenting, How would I add listener to each Menu Item ? ' renderTo : Ext.getBody(), '+ ' arrowAlign: "right", '+ ' menu: [ '+ ' {text: "Item 1"}, '+ ' {text: "Item 2"}, '+ ' {text: "Item 3"}, '+ ' {text: "Item 4"} '+ ' ], '+ ' handler: function() '+ ' { '+ ' ajaxRequest('+MainForm.WebForm.JSName+', "_btn_click_", ["btnId="+this.id]) '+ ' } '+
  13. UniSession.AddJS(UniStatusBar.JSName + '.items.add '+ '( '+ ' Ext.create '+ ' ( '+ ' "Ext.button.Button", '+ ' { '+ ' text: "Camera", '+ ' id: "_btn1", '+ ' left: 10, '+ IGNORED ' width: 300, '+ ' height: 18, '+ ' color: 123, '+ IGNORED (font) ' bgcolor: 123, '+ ????? ' handler: function() '+ ' { '+ ' ajaxRequest('+MainForm.WebForm.JSName+', "_btn_click_", ["btnId="+this.id]) '+ ' } '+ ' } '+ ' ) '+ '); ' + UniStatusBar.JSName+'.updateLayout();'); Do we need to create a Panel first, then add Button in panel - How ?
  14. Yes, Thank you. Our button is very squashed (as one can imagine), what do I do to set Size and Colour ?
  15. doLayout (although not used in code above) also fails ?
  16. Please advise how to ADD / INSERT Button into StatusBar at Runtime - thanks. procedure TMainForm.UniFormBeforeShow(Sender: TObject); begin if FirstTime = True then begin FirstTime:= False; (* INSERT UniSession.AddJS(UniStatusBar.JSName + '.items.insert '+ '(0, Ext.create '+ ' ( '+ ' "Ext.button.Button", '+ ' { '+ ' text: "Camera", '+ ' id: "_btn1", '+ ' handler: function() '+ ' { '+ ' ajaxRequest('+MainForm.WebForm.JSName+', "_btn_click_", ["btnId="+this.id]) '+ ' } '+ ' } '+ ' ) '+ '); '); // '+ UniStatusBar.JSName +'.doLayout(); *) // ADD UniSession.AddJS(UniStatusBar.JSName + '.items.add '+ '( '+ ' Ext.create '+ ' ( '+ ' "Ext.button.Button", '+ ' { '+ ' text: "Camera", '+ ' id: "_btn1", '+ ' handler: function() '+ ' { '+ ' ajaxRequest('+MainForm.WebForm.JSName+', "_btn_click_", ["btnId="+this.id]) '+ ' } '+ ' } '+ ' ) '+ '); '); // '+ UniStatusBar.JSName +'.doLayout(); end; // FirstTime end;
  17. I am trying to change label parameters at runtime, please advise - Thanks. UniLabel.Caption:= IntToStr(MyCounter); UniLabel.Left:= 10; UniLabel.Top:= 500; UniLabel.Visible:= True; UniLabel.Repaint; UniLabel.BringToFront;
  18. 1) It is infected 2) It is doing something that WD believes it should not be doing (similar to actions of a known virus)
  19. I have several individual Stand Alone WebApps running on 1 PC (Windows 10 Pro), with several unique IP's bound to the NIC. All WebApps are using the same ports 80/443 but assigned to their unique IP's - all works fine. If using local IP's then routing tables must be used for outside access, else it is simpler to lease and use external IP's. I have found browsers are fussy when it comes to SSL so one must stick to the standard ports 80/443 and use unique IP's instead of unique ports.
  20. I originally tried to port (using cross translators) old windows legacy programs (heavily dependent on DevExpress Grids) to UniGUI but to be honest with you, building new UniGUI programs from scratch is quicker and better - JavaScript is very powerful. Yes, that means you have to learn new web programming concepts, afterwards though, you will be so much better off. It is refreshing to have WebApps run across multiple hardware / OS platforms - thank you Farshad and the team at UniGUI.
  21. Tried project, compiles but fails at runtime (1542) An Exception has occured in application::- "Class TUniSimplePanel not found"
  22. Sherzod, Please advise how to force in code at runtime a horizontal Scroll-To-Top for a HtmlFrame (after the script has been updated) - thanks.
×
×
  • Create New...