Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1257
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. For my Remote DB Session I need a Unique Session ID For Each Connected Browser (user) so as to distinguish one from another. My understanding is that the ServerModule Session is independent of the Browser and Server Specific ? - please advise - thanks in advance.
  2. Please show me Delphi code as all attempts with ExtEvents fail (there is no toolbar) ?
  3. OK, which JS section do I add it ? Also, will I be able to add buttons ?
  4. I want to be able to add to the uniDbGrid Tray (for lack of a word) extra objects (in particular SpeedButtons) - please show me how - thanks. Mock up attached.
  5. Thanks, but as mentioned above, I want to use Desktop Forms for both Login and New Accounts on both platforms, however when it comes to other forms I would want to check which platform and call either Desktop or Mobile forms accordingly (with mobile I will want to check for SmartPhone or Tablet). So back to my last question, how can uniGUI tell me in code to show fmPage (Mobile) instead of fPage (Desktop) after they have successfully logged in when I would normally execute fPage.ShowModal ? I would need to know in advance whether to execute fPage.ShowModal -or- fmPage.ShowModal.
  6. Thanks but made absolutely no difference. I used Form.WindowStae:= wsMaximized; as a work around.
  7. I need to get the User's Desktop Browser Client Area (Height and Width) so I can maximize my Form at runtime - please advise - Thanks in advance.
  8. So how will uniGUI know to show fmPage instead of fPage when after they have successfully logged in I execute fPage.ShowModal ?
  9. I want to build a Hybrid Application and use a Desktop Form to Login (request an account if necessary) then once logged in test if Desktop or Mobile and show the appropriate Desktop or Mobile form - please advise how to analyse users platform - Thanks in advance.
  10. I have two UniForms (fMain / fNewAccount): fMain via a ButtonClick shows fNewAccount.ShowModal which via a ButtonClick sends an email (this takes about 10 seconds) then fNewAccount closes and returns to fMain. I want to Disable the fNewAccount form preventing closing (in Delphi this disables all components on the form preventing the [X] and Cancel button from working) till my email has been sent.
  11. Please advise how I can Enable / Disable Form (fNewAccount) - Thanks in advance. fNewAccount.Enabled:= False; fMain.EmailRequestFlag:= SendMail(); fNewAccount.Enabled:= True;
  12. Please advise:- SHGetSpecialFolderLocation(UniServerModule.Handle, Folder, PIDL);
  13. Windows OS (server and desktop) require applications to use certain file locations, these can change from version to version, user to user (user has moved locations) etc. GetSystemPath($0023); // COMMON_APPDATA GetSystemPath($001A); // APPDATA GetSystemPath($0005); // CSIDL_PERSONAL My function GetSystemPath fetches these. I need my function GetSystemPath to work with uniGUI.
  14. I use a function to fetch Special Folder Locations that requires a handle, UniServerModule.Handle fails - please advise - thanks. function TUniServerModule.GetSystemPath(Folder: Integer): String; var PIDL: PItemIDList; Path: PWideChar; AMalloc: IMalloc; begin Path:= StrAlloc(255); SHGetSpecialFolderLocation(UniServerModule.Handle, Folder, PIDL); if SHGetPathFromIDList(PIDL, Path) then Result:= Path; SHGetMalloc(AMalloc); AMalloc.Free(PIDL); StrDispose(Path); end;
  15. I have a UniForm (UniForm2) that I am trying to send an AjaxEvent to update my ProgressBar (pg). The Form's AjaxEvent code is firing on: active, move, resize etc. as expected. It will not fire on my custom EventName 'update' sent via my UpdateJobProgress procedure, please advise how to resolve - thanks in advance. procedure TJobThread.Execute; // This will be extended when the basics work begin Progress:= 0; while not Terminated and (Progress < 100) do begin Inc(Progress); Sleep(50); end; end; function TUniForm2.DoSomething(): Boolean; ... // if Assigned(job) then begin if not (job.Finished or job.Terminated) then begin job.Terminate; end; job.Free; end; // job:= TJobThread.Create; job.FreeOnTerminate:= False; UniSession.AddJS('UniForm2.pg.updateProgress(0.0, ''Running...'', false);'); UpdateJobProgress; ... BUSY WORKING HERE ... end; procedure TUniForm2.AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'update' then begin MessageDlg(EventName, mtWarning, [mbOK]); UniSession.AddJS(Format('UniForm2.pg.updateProgress(%d/%d, ''Running...'', true);', [job.Progress, 100])); // if not (job.Finished or job.Terminated) then begin UpdateJobProgress; end else begin if job.Progress = 100 then begin UniSession.AddJS('UniForm2.pg.updateProgress(1.0, ''Done'', true);'); end else begin UniSession.AddJS(Format('UniForm2.pg.updateProgress(%d/%d, ''Stopped by user'', true);', [job.Progress, 100])); end; end; // end; end; procedure TUniForm2.UpdateJobProgress; begin UniSession.AddJS('setTimeout(function() { ajaxRequest(UniForm2.form, ''update'', []) }, 200)'); end;
×
×
  • Create New...