Jump to content

Roberto Nicchi

uniGUI Subscriber
  • Posts

    226
  • Joined

  • Last visited

Everything posted by Roberto Nicchi

  1. I have found this thread and don't understand the problem. I know that for each session a TuniMainModule instance is created. So if i create some variables in the unimainmodule, isn't it safe to read /write these variables ? example TUniMainModule = class(TUniGUIMainModule) private { Private declarations } Fthevar:integer; published property thevar:integer read Fthevar write Fthevar; ... If somewhere in the app the code below is execute UniMainModule.thevar:=newvalue; Isn't it safe ? thanks
  2. Hello, in my app, when the main module is created, some utility objects that contains methods are created also. procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); begin Fprocs:=Tprocs.create(self); // Fprocs is declared in the private section of TUniMainModule To access Fprocs i use a global function (this is to avoid to write UniMainModule. everytime) function Gprocs:Tprocs; begin result:=UniMainModule.Fprocs; end; Methods contained in Fproc are executed when needed using: Gprocs.some_method Tprocs is inherited by Tcomponent. I'm wondering if i have to inherit Tprocs by Tunicomponent instead. And, beside this, do you think my usage of such objects created in UniMainModule is correct ? Everything seems to work ... thanks
  3. Don't understand why the default for BlankValue property is -1. IMHO 0 seems a more logic solution. I guess you can't change it for not break old code...
  4. So the event exists but is not exposed by UNGUI. I have added in in ExtEvents (Add Custom Events button) and works perfectly. Thanks
  5. When the spinedit is changed i have to update a grid (clear all records and recreate records). Doing this i have an exception if the grid is in edit mode (Grid is in dirty state). My solution is to call a javascript function that is defined in the grid. This function first call the completeEdit function and after execute an ajaxRequest. In the OnAjaxEvent the grid is updated. function afterCreate(sender) // this function is now executed in the spinend event of the unispinedit component { sender.refresh_records = function() { var grid = sender; if (grid.editingPlugin.editing) { grid.editingPlugin.completeEdit(); } ajaxRequest(this, '_refresh',[]); } }
  6. I have defined this JS event function spinend(sender, eOpts) { do something with sender.value } but this event (of course) is not executed if the user change the component value with keyboard instead that with mouse. I see there isn't a change event. So how to execute the code when the value is changed ? i have tryed with keyup event but it's executed also pressing the tabkey or other FN key. I don't know how to detect if the value has changed. Thanks
  7. Both workaround works. I was sure there was some JS code to have a behaviour similar to what i want. I hope these things and others i have listed in my post will be implemented Delphi side with some properties. thanks
  8. I have read the UNIGUI roadmap and i see it's written "Better data input" for grids. What will be changed ? In my mind a better data input could be: 1) Possibility to make the focused cell automatically enter in edit mode when the user type something (property in the grid column ?). Now is necessary to press enter. 2) Possibility to setup what happen when the cell enter in edit mode: now the cursor is placed at the end of the current value and the typed text is added. There should be the possibility (property in the grid column ?) to automatically clear the cell value when the edit start. 3) If the column is a checkbox the space button could be activated to select/deselect the checkbox 4) If the column is a numeric value now KEYUP and KEYDOWN incrase/decrase the value; this behaviour is not always wanted. There shoud be the possibility to change the behaviour (property KEYUPDOWNBEHAVIOUR ?) to post the cell changes and move the cursor to the next/prior record. Same thing for the combobox (of course a key shortcut to open the drop down menu: ALT+KEY DOWN ?) that's all for now thanks
  9. I'm working on an accounting software. Started some weeks ago. It will take a lot of time.
  10. I see the TUniColorButton doesn't have the TabOrder property and it's always first in the tab sequence. Is there a reason ?
  11. thanks I have tryed but the icon size continue to be rendered small .. See the attached example. Project1.zip
  12. thanks I have tryed but the icon size continue to be rendered small .. See the attached example. Project1.zip
  13. I miss only one thing: how to set the icon size ? If possible using css so, if necessary, i can change the css class and affect all the application. thanks
  14. Ok i have found the solution function afterCreate(sender) { sender.changeicon = function() { sender.setIcon('files/images/test1.svg'); // <---- this is the correct code } }
  15. I have found how to set a button icon then the button is initialized. unibutton -> ClientEvents -> UniEvents -> beforeInit function beforeInit(sender, config) { config.icon='files/images/test.svg' } but, how to change it ? With my poor JS knoledge i have tryed as follow: thebut-> ClientEvents -> UniEvents -> afterCreate function afterCreate(sender) { sender.changeicon = function() { sender.icon='files/images/test2.svg'; } } In a Tunibutton onclick event: procedure TMainForm.UniButton1Click(Sender: TObject); begin thebut.JSInterface.JSCall('changeicon') end; Doesn't have effect. What's the right way ?
  16. I used a totally different approach. A popup menu. Very simple.
  17. I have found another solution. No need anymore this thing. Thanks.
  18. Having a TuniPageControl and a TuniTreeView i need to activate the drag and drop from the tabsheets (the tab of the page) to a treeview. Both are in the same form. In the drop part i need to access the tag property of the source tabsheet and execute some Delphi code that will create a tree node using the tag value ... I have attached an example project of the situation. Thanks for any help. Project1.zip
  19. I have created this example to show how i'm using a thread to execute a long running procedure in UNIGUI application. Could someone tell me if i'm doing it correctly or there's some mistake ? thanks Project1.zip
  20. In the example seems good but things can be more complicated .... Let's hope for a fix in the future.
  21. Hello Sherzod, did you find a solution to this problem ? thanks
  22. Nevermind, it was my mistake.The application was connecting to my development PC database when executed in the server. The speed is about the same. The XEON is maybe a little faster. thanks
  23. I'm comparing the execution time of my app between my development PC and a server PC and we have in office. The application is executed in a third pc in our lan. The development PC is an I5 processor ( i5-7500 CPU @ 3.40GHz 3.41 GHz) with 16 gb ram The other is a XEON E-2136 3,30 Ghz with 16 Gb ram Of course the app is 64bit compiled. The procedure i'm comparing simply execute an SQL query that is connected to a Tunidbgrid. The sql execution time is very fast (few ms). If the application is in my PC the execution time is about 3 seconds or less If the application is in our server the execution time is about 7 seconds I expected to have a better performance in the XEON server. I have disabled the AV software. I have tryed with HyperServer (unchanged in CFG file) and Standalone exe. thanks
×
×
  • Create New...