Jump to content

gerardocrisci

uniGUI Subscriber
  • Posts

    177
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by gerardocrisci

  1. On 2/21/2022 at 2:54 PM, Farshad Mohajeri said:
    • No source Code? Incorrect. Partial source code is provided.
    • One developer? Partially true. The core part is only developed by me for various reasons

    I am a member since 01/31/2015 and have recently renewed the license.
    I did it just to be able to compile with Delphi 11.
    I know the initial developments of this excellent UNIGUI
    In recent years there have been no major developments ... and now you understand why .. and my concerns were well-founded, outlined in several posts.
    Today I am even more afraid than before .. knowing that only Farshad has the core sources.
    I wish a long life to Farrshad .. on which we depend.
     

    On 2/21/2022 at 2:54 PM, Farshad Mohajeri said:

    21 March 2022. After that we will switch to the next release

    In the latest roadmap .. you write that you would publish more sources.
    I asked to include all sources in the most expensive version ..
    and we will all be calmer.

  2. I found the problem

    procedure TUniCustomDBGrid.HookFilter(ASet: Boolean);
    ...
    begin
      if FDataLink <> nil then
        if (DataSource <> nil) and (DataSource.DataSet <> nil) then
        begin
          Ds := DataSource.DataSet;
          if ASet then
          begin
           ...
            if (...) then
            begin
             ...
              FSaveFilter := Ds.OnFilterRecord; 
              Ds.OnFilterRecord := H_OnFilterRecord; 
            end;
          end
    ....

    the change of OnFilterRecord notified after locate returns the cursor to the first record..

    Just start "HookFilter" before "Locate"
    So it would be enough

       UniDBGrid1.HookFilter(True);
       MyQuery1.Locate('Country_ID', 5, []);

     but HookFilter is private and not directly accessible ..

    So to start it just confirm the Datasource
     SetDataSource(Value: TDataSource); --->HookEvents(True); ---> HookFilter(True);

    UniDBGrid1.DataSource := MyDataSource1;
    MyQuery1.Locate('Country_ID', 5, []);

    it is therefore easy to create an adjustment that functions any library to access the data.

    😀😀😃

    I am happy

  3. Hi,

    trying I have this sequence:

    The database after locate is on the right record!

    the first "NotifyAjax" from the unidbgrid .. lead to the right position.
    .. I read the value 4 in Datasource.DataSet.RecNo

    the next "NotifyAjax" .. 

    in unit uniDBGrid;

    procedure TUniCustomDBGrid.NotifyAjax; --> HookEvents(True); ---> HookFilter(true);

    does so to modify the DataSet.OnFilterRecord

              FFilterHooked := True;
              FSaveFilter := Ds.OnFilterRecord;
              Ds.OnFilterRecord := H_OnFilterRecord;

    ... and Datasource.DataSet.RecNo returns to the value 0

    if i impose this fix .. i don't have the problem.

    //    HookFilter(ASet);
        HookFilter(False);  

    Not using filters on the grid ...can I apply this correction?? .. What happen?

    I know this is not the right solution ..
    ... but someone tells me if he has the same problem ..and if it has a solution.

    Thank you and I await a reply

     

  4. First I tell you Thanks for your answers
    Your example works ... but I haven't solved the problem😭
    If you move Country: TMyQuery and dsCountry: TMyDataSource on Form1 ... the cursor after Locate stays on the first record.
    Try and let me know.
    if the Dataset and the Grid are on the same form .. the problem occurs.

    You want to check

    GRAZIE🙂

  5. 8 hours ago, Abaksoft said:

    I can't see MyQuery1.open

    Where do you open your DataSet ?  OnCreate event ?

    DFM

      object MyQuery1: TMyQuery
        Connection = MyConnection1
        SQL.Strings = (
          'select * from country')
        Active = True
        Left = 180
        Top = 125
      end

     

    This is in the example ... but you can open it wherever you want .. the problem is the positioning of the row in the grid after the initial locate.

  6. 1 hour ago, Hayri ASLAN said:

    Can you please create a test case?

    simple example
    Mainform with MyConnection1, MyQuery1, MyDataSource1

    Main.pas

    unit Main;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics,
      Controls, Forms, uniGUITypes, uniGUIAbstractClasses,
      uniGUIClasses, uniGUIRegClasses, uniGUIForm, uniLabel, uniButton,
      uniGUIBaseClasses, uniBasicGrid, uniDBGrid, Data.DB, DBAccess, MyAccess, MemDS;
    
    type
      TMainForm = class(TUniForm)
        MyConnection1: TMyConnection;
        MyQuery1: TMyQuery;
        MyDataSource1: TMyDataSource;
        UniDBGrid1: TUniDBGrid;
        UniButton1: TUniButton;
        UniLabel1: TUniLabel;
        procedure UniButton1Click(Sender: TObject);
        procedure UniFormAfterShow(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
        procedure MySearch(V:string);
      end;
    
    function MainForm: TMainForm;
    
    implementation
    
    {$R *.dfm}
    
    uses
      uniGUIVars, MainModule, uniGUIApplication;
    
    function MainForm: TMainForm;
    begin
      Result := TMainForm(UniMainModule.GetFormInstance(TMainForm));
    end;
    
    procedure TMainForm.MySearch(V:string);
    begin
      if MyQuery1.Locate('country_id',V,[]) then
        UniLabel1.Caption:='FOUND :'+V;
    end;
    
    procedure TMainForm.UniFormAfterShow(Sender: TObject);
    begin
       MySearch('4'); //Finds the record, but does not display it in the grid
    end;
    
    procedure TMainForm.UniButton1Click(Sender: TObject);
    begin
       MySearch('5'); //Find the recod and it is displayed in the grid.
    end;
    
    initialization
      RegisterAppFormClass(TMainForm);
    
    end.

    Main.dfm

    object MainForm: TMainForm
      Left = 0
      Top = 0
      ClientHeight = 299
      ClientWidth = 635
      Caption = 'MainForm'
      OldCreateOrder = False
      MonitoredKeys.Keys = <>
      OnAfterShow = UniFormAfterShow
      PixelsPerInch = 96
      TextHeight = 13
      object UniDBGrid1: TUniDBGrid
        Left = 20
        Top = 25
        Width = 386
        Height = 246
        Hint = ''
        DataSource = MyDataSource1
        LoadMask.Message = 'Loading data...'
        TabOrder = 0
      end
      object UniButton1: TUniButton
        Left = 435
        Top = 90
        Width = 75
        Height = 25
        Hint = ''
        Caption = 'UniButton1'
        TabOrder = 1
        OnClick = UniButton1Click
      end
      object UniLabel1: TUniLabel
        Left = 440
        Top = 130
        Width = 46
        Height = 13
        Hint = ''
        Caption = 'UniLabel1'
        TabOrder = 2
      end
      object MyConnection1: TMyConnection
        Database = 'sakila'
        Username = 'root'
        Server = 'localhost'
        Connected = True
        LoginPrompt = False
        Left = 440
        Top = 20
        EncryptedPassword = ''
      end
      object MyQuery1: TMyQuery
        Connection = MyConnection1
        SQL.Strings = (
          'select * from country')
        Active = True
        Left = 180
        Top = 125
      end
      object MyDataSource1: TMyDataSource
        DataSet = MyQuery1
        Left = 260
        Top = 125
      end
    end

    image.png.4203d6fcb6ada7679d8aef5aa5c84be0.png

    at startup it does not go to record # 4
    this does not work with MyDAC

     

     

  7. I have a problem using MyDAC (10.4.4) with UNIGUI.
    When using Locate before displaying the form, the record selected on the uniDBgrid is always the first, the cursor does not move.

    If the same operation is done at the click of a button ... the cursor moves ... and it works.

    procedure TMainForm.MySearch(V:string);
    begin
      if MyQuery1.Locate('ID',V,[]) then
        UniLabel1.Caption:='FOUND :'+V;
    end;
    
    procedure TMainForm.UniFormAfterShow(Sender: TObject);
    begin
      MySearch('12'); //Finds the record, but does not display it in the grid
    end;
    
    procedure TMainForm.UniButton2Click(Sender: TObject);
    begin
      MySearch('30'); //Find the recod and it is displayed in the grid.
    end;

    With this problem I cannot select the record before the unidbgrid is displayed.

    Do you have a solution?

  8. Hi mikromundo,
    even if I haven't tried it .. your solution looks good ... it interfaces with UniGUI ... but it's not integrated in UniGUI.

    We pay for the use and development of UniGUI ... and every time we ask to integrate the responsive layout ...
    currently there is still no planning of when it will be done (reliable).
    But this also applies to other requests .. we do them ... but not quick answers.

    Lately UniGUI has developed a more commercial aspect (website, webinar, ..),
    slowing down the development of components considerably.

    Everything must be evaluated .. even with what tools we can create our new projects ...

  9. for Responsive layout:

    I have not tried it ... it seems a functional solution .. but it is not the one required ..
    the solution must be created by UniGUI on the basis of ExtJS developments
    https://docs.sencha.com/extjs/7.2.0/modern/Ext.Responsive.html
    using Ext.Responsive and responsiveConfig for object

     Ext.define('MyApp.view.main.Main', {
         extend: 'Ext.container.Container',
         mixins: [
             'Ext.mixin.Responsive'
         ],
         responsiveFormulas: {
             small: 'width < 600',
             medium: 'width >= 600 && width < 800',
             large: 'width >= 800'
         }
     });

    and

     responsiveConfig: {
         small: {
             hidden: true
         },
         medium: {
             hidden: false,
             region: 'north'
         },
         large: {
             hidden: true,
             region: 'west'
         }
     }

    the renewal of the license is also for this purpose
    and not to use the "Hint" property and follow the developments of others
    (...even if the RADCORE project is an excellent alternative ... congratulations!).

    And I await the development of the other characteristics requested by all of us ...

    • Upvote 1
  10. if not all sources are available  .. and the development of UniGUI is interrupted ... an event that can occur .. the risk is to rewrite our projects... beyond the various limitations already explained.

    For the RoadMap everyone asks for the Responsive Layout
    (It was foreseen in the uniGUI Roadmap - 2019 for Q2 / 2019)

     

    .. in addition to this ..

    • more integration with mobile gestures and more drag and drop,
    • slide panel (menu),
    • integrate a customizable REST WebService,
    • a component to customize a theme,
    • Screen Mask on HandleEvent (mouse or key) waiting for the request is completed
  11. On 12/17/2020 at 5:19 PM, rgreat said:

    5. More units with source code.

    There are too many units without source ...and without sufficient information
    uniGUIClasses,   ..  uniGUIForm,   uniGUIConst,  ..  uniGUIBaseClasses,.. uniGUImClasses,   uniGUImForm ... uniImageList .. etc etc
    It takes at least a detail of the various object definitions
    publish (for full version ) at least part of the text between "interface" <--> "implementation"

    it's a lack ..
    all this creates difficulties to those like me who want to implement properties and methods and create their own components.
    Finally .. not having all the sources .. is a risk for those who focus their resources and projects on UniGUI.

    Buone Feste e Buon 2021.

     

    • Like 2
  12. Ciao Freeman35

    I need this adjustment ...
    in many cases I start the Query in this event .. in order to display the form first and then the request for the data for the grid.
    Is there a post-show event even after the AftherShow?

    PS: 
    Since it cannot be obtained even by paying uniGUIForm.pas.
    At least is it possible to have uniGUIForm.int ?
    an .int file where you only see the Interface part of Unit not shipped with source,

     .. example of the probable file:

    unit uniGUIForm;
    
    interface
    
    uses
      Controls, Classes,...;
    
    type
       TUniForm = class(TUniCustomForm) 
      private
        FOnReady: TNotifyEvent;
        ..
      protected
        function GetOnShow: TNotifyEvent; virtual;
        procedure OnAfterShow(Value: TNotifyEvent); override;
        ...   
      public
        constructor Create (AOwner: TComponent); 
        destructor Destroy; 
        ...
      published
        property OnCreate;
        property OnReady;
        property OnBeforeShow;
        property OnShow;
        property OnAfterShow;
        ...
      end;
    
    implementation
    end.

     

×
×
  • Create New...