Jump to content

hendrang

Members
  • Posts

    55
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by hendrang

  1. You can use the property anchors of the objects to fix it!

    Hi fcarvalho4, Thanks

     

    I mean to set mobile screen orientation manually.

     

    Its said in OS android to the screen orientation is  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

    but  I want to set the screen orientation via Unigui web application.

  2. It is not possible because MainForm is created after MainModule. As a general rule MainModule should not directly refer to any other Form.

     

    Ok. Thanks Mr. Farshad.

     

    I have another question.

     

    Sometimes a procedure / function is to be called from another form

     

    but calling a procedure/function in another form always raise warning message  warning : Form must be shown after is created : <formaname>

     

    then the form is shown.

     

    is it possible to call the procedure / function without showing the form ?

  3. Hi All,

     

    In MainModule call other procedure or set variable in other form like these :

      TMainForm(MainForm).Counter:= 1000;
    
      TMainForm(MainForm).InitVariable; // Call Procedure InitVariable
    
    
    

    raise error :

    An Exception has occured in application:

    Access violation at address 006AC43D in module 'Project1.exe'. Read of address 00000068

  4. Hi everyone,

     

    i'm having my project already set up, but i was thinking about the following.

     

    I want the a user-lock on login, that means, if a user is already logged in to the user-area or the user is logging in new, i dont want the same user to have another session.

     

    My idea is to add a field ('loggedIn') in my user-table of my database which i then use for the lock. BUT what if the session gets killed or the users database connection breaks up. Then i have a logged user which cant log in anymore.

     

    How do you handle this or whats your idea?

     

    Thanks

    Sorry for my english.

     

    This is my idea but I don't if it is applicable.

     

    the user-table have 2 fields : UserID, DateTime1

     

    The client side for suppose every 1 minute update the DateTime1

     according to the server  computer system  time. ( can we get the server side system date/time ?  :) )

     

    If the user attemps to re-log again, server will check the difference between sytem time and DateTime1, if the difference is more than 1 minutes than we can assume that the user session has crashed and is allowed to login in again.

    • Upvote 1
  5. Yes, let see an example :

     

    Step 1 :

    Assume we have 3 users well connected. The table appears like this :

     

    1 James

    2 Rodriguez

    3 Stephano

     

    Here NC = Nr = 3 : All is OK

     

    Step 2 :

    James Crashs. At this time, we can't know wich users crashes. You are right !

    But when james will attempt to re-log again, the problem is solved :

    The rule requires an insertion (without conditions)

     

    1 James

    2 Rodriguez

    3 Stephano

    4 James

     

    At this time your login procedure know that a crash happened : NC=3 < Nr=4 and it's James.

     

    Step 3 :

    The rule requires to clean the garbage lignes (delete the fist James) :

     

    2 Rodriguez

    3 Stephano

    4 James

     

    And all will become OK (NC = Nr).

     

    Conclusion :

    - a table snapshot view, can't inform us who are well connected.

    - but, after each login the problem is solved (the table will be always clean).

     

    All the Best.

    cmiiw:

    There's a problem in step 2, but I don't have the answer to solve the problem. :)

     

    Step 2 :

    James Crashs. At this time, we can't know wich users crashes. You are right !

    But when james will attempt to re-log again, the problem is solved :

    The rule requires an insertion (without conditions)

     

    what if Rodriguez crashes not James and then James attempt to login to have another session?

  6. same problem and solved :

    I am using Delphi XE.

     

    1. Uninstall FMSoft Unigui Beta.

    2. Delete all UniGui File and SynEdit_D2011.bpl  in folder C:\Users\Public\Documents\RAD Studio\8.0\

    3. Delete All UniGui File in C:\Users\Public\Documents\RAD Studio\8.0\Dcp

     

    And reinsntall Unigui

  7. Hi Farshad,

     

    It is not clear me.

     

    When I access the Customer Area Web Application and download the uniGUI package must I purchase the full version when released or is still considered a free beta version?

     

    Regards.

     

    Mike

     

    http://forums.unigui.com/index.php?/topic/1312-development-status/page-25

     

    Version 0.94 will be published with a beta commercial license. Which means each user must get his/her own activation key from us in order to be able to install and use the product.  Keys for Initial version of 0.94 will be issued for free, but at any further stage, minor update or a new version we may ask for a payment.

     

    In short, by downloading 0.94 you agree to pay for the product at any moment in the future, though you may get the initial builds for free in a temporary period of time.

     

    Now you may ask what will be the the price. As I repeatedly told pricing including the Ext JS license won't exceed 1000 USD per developer.

  8. Hi all,

     

    My unigui apps call a calculation function in a RealThinClient and return a calculation result.

    I am using Delphi XE.

     

    If Unugui app run in Web Mode, it cannot receive the calculation result sent from the RealThinClient server because the on return event of RtcResult is not fired.

     

    attachicon.gifCalc.JPG

     

    My application project :

     

    attachicon.gifUniguiRealThinClient.rar

     

    How can I solve the problem and thanks in advance.

     

    Regards,

     

    Hendra

     

    Problem solved.

     

    post-930-0-05022000-1371441163_thumb.jpg

     

    To solve the problem :

    Set property UseWinHTTP of component RtcHttpClient to True.

     

    post-930-0-74339400-1371444068_thumb.jpg

     

    Regards,

    Hendra

  9. I cannot help you with RTC, but I am very interested that someone uses the combination UniGui <--> RTC. More than a year ago I built a small test server with KbmMW to handle the DB stuff (DBIsam), that worked great. Thought of switching to RTC anyway when a new, real world project will come up the next days. Do you want to handle some more advanced stuff with RTC, maybe DB stuff? Please keep us informed if and how your problem will be solved. Best Regards Peter

     

     

    Hi Peter,

     

    Yes,  I want to use combination Unigui - RTC for handling  DB stuff.

     

    and this simple test  problem must be solved before I can go furher to handle DB with Unigui - RTC.

     

    I will inform you if the problem is solved.

     

    Best regards,

    Hendra

  10. Hi all,

    My unigui apps call a calculation function in a RealThinClient and return a calculation result.
    I am using Delphi XE.

     

    If Unugui app run in Web Mode, it cannot receive the calculation result sent from the RealThinClient server because the on return event of RtcResult is not fired.

     

    post-930-0-63957600-1371343978_thumb.jpg

     

    My application project :

     

    UniguiRealThinClient.rar

     

    How can I solve the problem and thanks in advance.

     

    Regards,

     

    Hendra

  11.  

    Hi Hendra ... this code does what you ask for ... I found it in this forum ...
     
    regards
     

    mmurgas

    var
      I: Integer;
      ASessionList: TList;
    begin
      unimemo1.Lines.Clear;
      ASessionList := UniServerModule.SessionManager.Sessions.SessionList.LockList;
      try
        for I := 0 to ASessionList.Count - 1 do
        begin
          UniMemo1.Lines.Add(TUniGUISession(ASessionList[I]).UniApplication.RemoteAddress);
        end;
      finally
        UniServerModule.SessionManager.Sessions.SessionList.UnlockList;
      end;
    

     

    Hi mmurgas,

    Thank you.

     

    This is very usefull and also I am looking for. Thanks

     

    TUniGUISession(ASessionList).UniApplication.RemoteAddress returns all of the user IPAddress who are ever login including users' IP Address already logged out.

     

    I need list of login users' IP Adddress and still running the application only exclude logged out users' IP Address.

     

    Regards,

    Hendra

     

     

     

     

     

     

     

     
  12. I found the solution. I had a table opened on desing time. The table has calc fields and some other fields use ongettext event. I still dont know exactly the problem, but closing the table in desing time solved the problem.

     

    no need to close table at design time, this may solve the problem :

    Put the code in the dataset beforeopen event :

    procedure TMainForm.<table>BeforeOpen(DataSet: TDataSet);
    begin
        if  <dataset.Connection> = Nil then
           <dataset.Connection>:= <connection>;
    end;
    
    
    
    • Upvote 1
  13. If you don't want to wait a bugfix: easy way to solve it - open your Query OnFormCreate, or OnFormShow)).

     

     set the dataset connection property in  onbeforeopen event can solve the problem

     

    code

    procedure TMainForm.qryTable1BeforeOpen(DataSet: TDataSet);
    begin
      if TADQuery(DataSet).Connection = Nil then
        TADQuery(Dataset).Connection:= UniMainModule.ADConnection1;
    end;
    
    
  14. If you don't want to wait a bugfix: easy way to solve it - open your Query OnFormCreate, or OnFormShow)).

     

    Yes, thanks.

     

    actually it also occurs in desktop application.

    to solve this in desktop application, I manually change the create order of the data module - and set it to be the first form that gets created by the application.

     

    Auto-creat forms :

       Datamodule --> arrange the datamodule to be created first before mainform

       Mainform

  15.  

    I answer to myself

     

     
    MessageDlg('mbYesNo', mtConfirmation, mbYesNo,
        procedure(Res: Integer)
        begin
          case Res of
            mrYes : UniMemo1.Lines.Add('DResult: YES');
            mrNo : UniMemo1.Lines.Add('DResult: NO');
            mrOK : UniMemo1.Lines.Add('DResult: OK');
            mrCancel : UniMemo1.Lines.Add('DResult: CANCEL');
          end;
        end
      );
    
    

     

    Hi,

     

    can your program show screenmask only after clicking the message dialogs box ?

     

    Thanks

  16. Hello all,

     

    Please help.

     

    I am using Anydac component (TAdConnection and TADquery)

     

    Unigui 0.93.0.996

     

     

    TADConnection is put in MainModule

     

    TADQuery and Tdatasource is put in MainForm.

     

    TADQuery is set active to True at design time. (cause exception error in webmode)

     

    the program works in VCL mode.

     

    post-930-0-90851700-1368064494_thumb.gif

     

    But it raise an exception error if the program is run in WebMode.

     

    post-930-0-24299400-1368064504_thumb.gif

     

    the problem is solved if TADQuery is set Active to False and set to true at runntime.

     

    But I prefer TADQuery is active at design time.

    How can I solve the problem ?

     

    Thanks

    Hendra

  17. Hello Farshad Mohajeri,

     

    Thank you for your help.

     

    It works with critical sections.

     

    I have another question. :)

    Is it possible to reject / terminate concurrent call a procedure/function,

    in this case not using critical section.

    I mean the second client call for the procedure/function will be informed that

    the procedure/function is being called by other client.

     

    Thanks

     

    Sorry Mr. Farshad Mohajeri.

     

    You have given me a solution but I misunderstood it.

    Problem solved. Thanks again

     

    code changed :

    var
     criticalSect: TRTLCriticalSection;
     isCalled: Boolean; // Global variable
    
    function TMainForm.UpdateData: Boolean;
    begin
     if isCalled then
       Exit(False); // exit cause this function is being called by other client
    
     EnterCriticalSection(criticalSect);  
     try
       isCalled:= True; 
       .
       <my code>
       <my code>
       .
       Exit(True);
     finally
       isCalled:= False; // set isCalled to False in order other client can call this function
       LeaveCriticalSection(criticalSect);
     end;
    end;
    

×
×
  • Create New...