Jump to content

Asiaapollo

Members
  • Posts

    58
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Asiaapollo

  1. Initial package will contain DCU only. As a part of your subscription we will allow you access to partial source code when it is ready to distribute.

     

    I'll help you for import task. Pls remind me when 0.97 is out.

    Thanks a lot! Waiting for 0.97...

  2. Sorry, I am confused on your last two points:

    13. Initial subscription will be for DCU version of framework only, but we will provide a free/low cost upgrade path when version with source code will be available within your subscription period.

    14. In initial releases with source code we will only provide partial source code for components only. i.e. source code for units in uniGUIxx.bpl only. Full source code will be available when product will become more mature .

     

    So the initial subscription will include partial source code for components or just DCU version only? If the answer is later, can help to generate the import files of all uniGUI components for me (and other user using/planning to use TMS Scripter) by using the import tool from TMS Software (http://www.tmssoftwa.../ImportTool.zip)? Actually I'd asked this several times but never get your answer.

  3. Hi

    There are two things i really need help with im using version 0.91.0.980

     

    2.We have our reports on crystal reports, and we want to implement them here but when the report is loaded it shows and error saying that the report engine is not opened, but we dont know exactly if the problem is unigui or delphi itself because we usde before delphi 2005.

    Hi,

     

    I find that was due to Crystal Report VCL cannot be used in multi-threaded application, if you go through CRDynamic.pas you will find:

    { Set openEngineType to PE_OE_MULTI_THREADED if user calls CRPE from  }
    { a multi-threaded application. Once CRPE starts up in multi-threaded }
    { mode with PEOpenEngineEx, user should call PEOpenEngine or          }
    { PEOpenEngineEx to initialize CRPE for every thread that makes CRPE  }
    { API calls.                                                          }
    {                                                                     }
    { Using PEOpenEngine () to start up CRPE, by default CRPE is in       }
    { single-threaded mode.                                               }
    
    

     

    However, in implementation part of PEOpenEngineEx, you will find:

    {------------------------------------------------------------------------------}
    { PEOpenEngineEx function                                                      }
    {  - Not fully implemented in CRPE yet...                                      }
    {------------------------------------------------------------------------------}
    
    

     

    So Crystal Report VCL cannot be used under Multi-Threaded Applicaiton!

  4. Development Environment:
    Windows 7 Pro - Traditional Chinese (HKSAR) Locale
    Delphi XE3 Enterprise - 32/64 bit
    Browser Chrome version: 26.0.1410.5 dev-m

    uniGUI version: 0.91.0.982

     

    I've added below code in uniForm.OnCreate event to start edit when user press any key: (this works well with uniGUI version: 0.90, but it will not correct display edited content <Enter> been pressed)

      with UniDBGrid1 do
        ClientEvents.ExtEvents.add(
            'OnKeypress=function OnKeypress(e)'#13#10+
            '{ var me = '+JSName+','#13#10+
            '  pos  = me.getSelectionModel().getCurrentPosition(),'#13#10+
            '  chrCode = e.getCharCode(),'#13#10+
            '  record = me.store.getAt(pos.row),'#13#10+
            '  colname= me.columns[pos.column].dataIndex,'#13#10+
            '  xplugin = me.getPlugin("uniCellEditor"),'#13#10+
            '  char = String.fromCharCode(chrCode);'#13#10+
            '  record.beginEdit();'#13#10+
            '  record.set(colname, char);'#13#10+
            '  xplugin.startEditByPosition(pos);}');
    
    

     

     

     

    Steps to reproduce (please refer to attached 4 screen shots):

    1. Select a cell

    post-1155-0-54048200-1361014846_thumb.jpg

    2. Press 'ABCD' 

    post-1155-0-29132000-1361014860_thumb.jpg

    3. Press <Enter>, the just edited content ("ABCD") disappeared 

    post-1155-0-23148100-1361014872_thumb.jpg

    4. Press arrow down key or use mouse to click to another row, the just edited content ("ABCD") show up again! 

    post-1155-0-72416900-1361014881_thumb.jpg

     

    Test case:

    Windowless_XE2.zip

  5. You can create a inherited component, i.e. TUniExDBGrid = class( TUniDBGrid ); add one property "property Col: Integer read GetCol write SetCol;" and in implementation add below code:

    
    
      TUniExDBGrid = class( TUniDBGrid )
    
      private
        function  GetCol: Integer;
        procedure SetCol(Value: Integer);
    
      published
        property Col: Integer read GetCol write SetCol;
     
    Implementation
    
    function TUniExDBGrid.GetCol: Integer; 
    begin 
      Result := CurrCol-1; {-1 for CurrCol} 
    end; 
    
    procedure TUniExDBGrid.SetCol(Value: Integer); 
    begin 
      CurrCol:=Value+1; {+1 for CurrCol} 
    end; 

     

    It works for me, let me know whether it works for you or not.

    • Upvote 2
  6. Hi Farshad,

     

    Since there is no reply on this topic, I thought no one interest on such functionality. If any one interested, please add a client event to TuniDBGrid as shown below.

      ClientEvents.ExtEvents.add(
          'OnKeypress=function OnKeypress(e)'#13#10+
          '{            var me = '+JSName+','#13#10+
          '             pos  = me.getSelectionModel().getCurrentPosition(),'#13#10+
          '             chrCode = e.getCharCode(),'#13#10+
          '             record = me.store.getAt(pos.row),'#13#10+
          '             colname= me.columns[pos.column].dataIndex,'#13#10+
          '             xplugin = me.getPlugin("uniCellEditor"),'#13#10+
          '             char = String.fromCharCode(chrCode);'#13#10+
          '             record.beginEdit();'#13#10+
          '             record.set(colname, char);'#13#10+
          '             xplugin.startEditByPosition(pos);'#13#10+
          '}');
    
    

    The most difficult part is I coundn't figure the TuniDBGrid obj in keypress event ("this" didn't work), so I finally use TuniDBGrid.JSName. For me, it works perfectly, but I haven't tested with readonly column.

    • Upvote 2
  7. By adding below client event, single click will activate the cell editor:

    function OnClick(e)
    {
        var me = this,
        pos  = me.getSelectionModel().getCurrentPosition(),
        xplugin = me.getPlugin("uniCellEditor");
        xplugin.startEditByPosition(pos);
    }
    

     

    Hope this will help.

    • Upvote 2
×
×
  • Create New...