Jump to content

Roberto Nicchi

uniGUI Subscriber
  • Posts

    226
  • Joined

  • Last visited

Everything posted by Roberto Nicchi

  1. I have first created my application as standalone project. Now i have created the service application project. The service start and works fine but when i try to stop it, it doesn't respond and can't be stopped. The problem seems related to a thread that is created in the servermodule. If i remove this thread, the service can be stopped with no problem. Probably i'm not doing it correcty. I'm going to describe how it work: In the server module oncreate event i have used a code like this: FmyThread:=Tthread.CreateAnonymousThread(myproc); FmyThread.Start; FmyThread is defined in the private section of the server module. In the server module onbeforeshutdown event i have placed code to terminate the thread FmyThread.Terminate; The myproc procedure is like this procedure TUniServerModule.myproc; var Start,Finish:Tdatetime; const SecBetweenRuns = 60; begin Start:=now; while not Terminated do begin Finish:=now; if SecondsBetween(Start,Finish)>SecBetweenRuns then begin // Do something, the code execution is fast start:=Finish; end; sleep(1000); end; end;
  2. Ok i have the solution. See below. Let me know if there's another (better/faster) solution. In the button have defined the JS event click (in Extevents) function click(sender, e, eOpts) { if (confirm("Confermation request")==true) ajaxRequest(sender, '_doit', []); } in the button have definied the onajaxevent event if EventName = '_doit' then begin modalresult:=mrOk; end;
  3. I was folgorated by an idea. Maybe I have to make the request for confirmation with JS code ? If this is correct could anyone tell me how? Unfortunately my knowledge of JS is zero.
  4. Ok, only now i have realized that there's a showmask property in the Tunibutton It works fine BUT, if in the button onclick event a messagedlg method is executed, the mask is not visualized. Is it WAD ? thanks
  5. Great! It works correctly! Thanks a lot!
  6. Hayri, I'm sorry, but it isn't the correct solution for me. I need the same visualization (that is, multiple pages if records are more than x), but without slidebar. After that, I add 4 buttons (next, previous,first,last page) for move between pages (to replace the slidebar)
  7. Hi, I use mobile version. I need to hide the bar for the change page. I need to insert four buttons: next, previous, first e last page Thanks.
  8. BUT if in the button that close the form i want a confirmation (see below), again there's the same problem. Is there a workaround for this ? if messagedlg('Confirm ?',mtConfirmation,[mbyes,mbno])=mrYes then begin ShowMask('Please wait ...'); UniSession.Synchronize; modalresult:=mrOk; end;
  9. I have the exception "ProcessEventQueue(): Worker is not assigned." when the statement "UniSession.Synchronize" is executed in the code below. Is my code wrong ? thanks procedure Tmyframe.create_report; var dest:Tdest_report_frm; begin dest:=Tdest_report_frm.Create(uniGUIApplication.UniApplication); dest.showmodal(procedure(sender:Tcomponent; res:integer) begin if res=mrOk then begin ShowMask('Please wait ...'); UniSession.Synchronize; <--- EXCEPTION HERE try CreateTheReport; finally HideMask; UniSession.Synchronize; end; end; end );
  10. Mehmet, your solution work! thanks a lot! My implementation:
  11. Mehmet, I'll try your solution and I hope to resolve the problem. Thanks.
  12. I've already seen that topic and it would be perfect, but... in my event list there isn't "itemtap".
  13. Hi, I need help. I have a TunimDBgrid (for mobile). I would like to open a new form if i make a double click in a specific cell. How i can impliment grid.dblclick? How i can get the colomn.index or name? Thanks.
  14. Regarding this problem i have created a support ticket but maybe somone else here can have a solution to the problem. It happens that the tab stop sequence is not correct when cycling with TAB (and SHIRT-TAB) between components. My application is made of a main form and frames, that opened inside the main form. I have attached to this message a self explained example that shows the problem. thanks DemoApp.zip
  15. What i need is to select the rows of a grid depending on some condition. The condition in this particular case is the value of a field; if the field has some value the record must be selected, otherwise not selected. This task must be executed after the grid has been loaded so i guess the right place where to place the code is in the OnAfterLoad event of the grid. Now i have the code to select or deselect all the rows but i have no idea how to select/unselect rows with a condition. Possible ? thanks
  16. I'm trying this thing but sincerly i don't understand in what ext event i have to place the store.load function. I'm new to JS and UNIGUI I have tryed also to place the code UniSession.AddJS(UniDBGrid1.JSName + '.getSelectionModel().selectAll();'); in the onafterload event of the grid but it has no effect. If i use the same code in a popup menu works fine. thanks
  17. My unigui application creates Tuniframe inside Tunitabsheet At the end of the process the INIT method is executed. The INIT method defined into the frame should move the focus to the desired component (setfocus). Anyway it doesn't work. this focus is somewhere (don't know where) and not in the correct component. I'm doing something wrong ? thanks var ts:TUniTabSheet; idx: Integer; frame:Tstandard_frame; begin ts:=TUniTabSheet.Create(self); ts.Closable:=true; ts.PageControl:=pc; ts.Caption:='The frame'; frame:=Taframe.Create(ts); frame.Parent:=ts; frame.Align:=alClient; frame.Show; pc.ActivePageIndex:=ts.PageIndex; frame.Init; // THIS METHOD SHOULD MOVE THE FOCUS EXECUTING THE SETFOCUS METHOD OF THE DESIRED CONTROL (SEE BELOW) end; ....... procedure Taframe.init;override; ..... procedure Taframe.init; begin acontrol.SetFocus; // I'm sure this method is executed because i have placed here a showmessage end;
  18. In short: is it possible to execute some Delphi code when the refresh button of a TUniDbGrid is clicked ? thanks
  19. I have a TuniDbGrid that load data from a query component. The refresh button of the grid doesn't refresh the query. Is there an event i can use to update the Tquery before data is loaded by the grid ? thanks
×
×
  • Create New...