Jump to content

Rebelss

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Rebelss

  1. On 5/24/2020 at 10:08 PM, Norm said:

    Hi everyone,

    In response to a request from a member I have put together a simple little project to help him/her get going with using Bootstrap with uniGui.

    I am re-posting it here with the hope that it might help others who are interested in the topic and don't know how to get going. I have called the project uniGui-Bootstrap Starter Project and provided a link below.

    It addresses issues like:

    - What you need to use Bootstrap

    - How to populate a Bootstrap page with uniGui data (e.g. table records).

    - How to handle Bootstrap page mouse-clicks.

    The project uses only  one uniGui component, the uniURLFrame. Everything else is done in HTML + jQuery + CSS. I have inserted a bit of in-line documentation in main.pas and in both the HTML and Javascript files to help web-application newbies.  I put this together in a very short time so apologize for any bugs or things I have overlooked.

    I personally think a lot of magic  is possible with uniGui + Bootstrap, e.g. it is so simple to build applications that would work equally well on any device (with some caveats). I would welcome some feedback, e.g. how many members think we should have a new Browse Section call Bootstrap?

    Enjoy.

     

     

    Bootstrap-uniGui StarterProject.zip

    Thank you.

    The link to the file is broken :

     

    Sorry, there is a problem

    This attachment is not available. It may have been removed or the person who shared it may not have permission to share it to this location.

    Error code: 2C171/1

  2. Hello guys, i figure out. I just have to override the DoOnChange event.

     

    unit MyUniEdit;
    
    interface
    
    uses
      Classes, uniGuiTypes, uniGUIClasses, UniGuiDialogs, UniEdit;
    
    type
      TMyUniEdit = class(TUniEdit)
      public
        procedure DoOnChange; override;
      end;
    
    procedure Register;
    
    implementation
    
    procedure Register;
    begin
      RegisterComponents('MyUnigui', [TMyUniEdit]);
    end;
    
    { TMyUniEdit }
    
    procedure TMyUniEdit.DoOnChange;
    begin
      inherited DoOnChange;
      // code something
    end;
    
    end.

     

    • Upvote 1
  3. No one ?

    we normally do something like this :

    unit MyEdit;
    
    interface
    
    uses
      Vcl.StdCtrls, vcl.Dialogs;
    
    Type
      TMyEdit = class(TEdit)
      public
        procedure Change; override;
      end;
    
    procedure Register;
    
    implementation
    
    uses
      System.Classes;
    
    procedure Register;
    begin
      RegisterComponents('MySuite', [TMyEdit]);
    end;
    
    
    { TMyEdit }
    
    procedure TMyEdit.Change;
    begin
      inherited;
      showmessage('MyOnChange');
    end;
    
    end.

    But in Unigui the procedure "Change" doesn't exists on TUniEdit. 
     

    Here is my code : 

    unit MyUniEdit;
    
    interface
    
    uses
      Classes, uniGuiTypes, uniGUIClasses, uniGUIForm, UniEdit;
    
    type
      TMyUniEdit = class(TUniEdit)
      public
        procedure Change; override;
      end;
    
    procedure Register;
    
    implementation
    
    procedure Register;
    begin
      RegisterComponents('MyUnigui', [TMyUniEdit]);
    end;
    
    { TMyUniEdit }
    
    procedure TMyUniEdit.Change;
    begin
      inherited;
      if (Assigned(OnChange)) then
        showmessage('MyOnChange');
    end;
    
    end.

    but the compiler message is : [dcc32 Error] MyUniEdit.pas(11): E2137 Method 'Change' not found in base class

  4. Hello everyone, i have a doubt about the HyperServer.

    On this page in the online help http://www.unigui.com/doc/online_help/a-more-in-depth-look-at-hypers.htm 

    we can see this information : 

    Quote

    Not only HyperServer can manage a cluster of Nodes inside same server,  but also it can be extended to manage multiple cluster of Nodes on multiple servers. Which means you will be able to run uniGUI applications on a server farm. This will add a new dimension to web apps developed using uniGUI and Delphi.

    There's a example of how can i setup multiple servers with HyperServer ? i can't find anything about it in the online help.

    There's a diagram with the structure with more than one physical server ?


    hyperserver-tech.png

    Thank you in advance!
    Best regards.

  5. Hello everyone, i'm testing UniGui and can't align the components on the mobile, in the designtime everying seens to align right. but when run on mobile it's misaligned.

     

    here is design time :

    Screenshot-7.png

     

    And here is runtime :

    Screenshot-1.png

    guess im missing something, what can i do ?

    I'm using version 1.70.0.1493, trial

    -------------------------------------------------------------
    [SOLUTION] : 

    Since i can't reply the topic, i'll edit the post with the solution.

    Thank you Farshad and Sherzod, you guys  are the best!
    The TUnimFieldSet works better than expected for me.

    Thank you again, and hope to buy your framework when my software is finished.

  6. Hello eveyone, i like to ask how can i send messages from a class to a UniForm, i have all the business logic in the TCustomer class, which have CustomerStateChange method and the class TCustomerView which is the view.

    How can the class TCustomer can send a message to the class TCustomerView on StateChange of dsCustomer ( linked to FDQCustomer) ?  
    On a traditionally windows 32 application a would use SendMessage with the TCustomerView handle, to send messages to the view.

    Here is my TCustomer class code : 

    unit uTCustomer;
    
    interface
    
    uses
      system.classes, Data.DB, FireDAC.Comp.Client, Winapi.Messages;
    
    const
      WM_StateChange = WM_APP + 400;
      WM_AfterScroll = WM_APP + 401;
    type
      TCustomer = class(TComponent)
      private
        conn: TFDConnection;
        FDQCustomer: TFDQuery;
    
        procedure CustomerAfterScroll(DataSet: TDataSet);
        procedure CustomerStateChange(Sender: TObject);
      public
        dsCustomer: TDataSource;
        constructor Create(AOwner: TComponent); override;
      end;
    
    implementation
    
    uses
      Winapi.Windows;
    
    { TCustomer }
    
    procedure TCustomer.CustomerAfterScroll(DataSet: TDataSet);
    begin
      SendMessage(CustomerViewHWND, WM_AfterScroll, 0, 0);
    end;
    
    procedure TCustomer.CustomerStateChange(Sender: TObject);
    begin
      SendMessage(CustomerViewHWND, WM_StateChange, 0, 0);
    end;
    
    constructor TCustomer.Create(AOwner: TComponent);
    begin
      inherited;
    
      conn := TFDConnection.Create(self);
    
      FDQCustomer := TFDQuery.Create(self);
      FDQCustomer.Connection := conn;
    
      dsCustomer := TDataSource.Create(self);
      dsCustomer.DataSet := FDQCustomer;
      dsCustomer.OnStateChange := CustomerStateChange; 	
    
      FDQCustomer.AfterScroll := CustomerAfterScroll;
      FDQCustomer.Open('select * from customers');
    end;
    
    end.

    And here is the TCustomerView code :

    unit uTCustomerView;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics,
      Controls, Forms, uniGUITypes, uniGUIAbstractClasses,
      uniGUIClasses, uniGUIForm, uTCustomer, uniGUIBaseClasses, uniEdit;
    
    type
      TCustomerView = class(TUniForm)
        edt_idCustomer: TUniEdit;
        edt_NameCustomer: TUniEdit;
        procedure UniFormCreate(Sender: TObject);
      private
        Customer: TCustomer;
        { Private declarations }
      public
        { Public declarations }
      protected
        procedure CustomerStateChange(var msg: TMessage); message WM_StateChange;
      end;
    
    function CustomerView: TCustomerView;
    
    implementation
    
    {$R *.dfm}
    
    uses
      MainModule, uniGUIApplication, Data.DB;
    
    function CustomerView: TCustomerView;
    begin
      Result := TCustomerView(UniMainModule.GetFormInstance(TCustomerView));
    end;
    
    { TCustomerView }
    
    procedure TCustomerView.CustomerStateChange(var msg: TMessage);
    begin
      edt_idCustomer.enabled := Customer.dsCustomer.DataSet.State in [dsInsert];
      edt_NameCustomer.enabled := Customer.dsCustomer.DataSet.State in [dsInsert];
    end;
    
    procedure TCustomerView.UniFormCreate(Sender: TObject);
    begin
      Customer := TCustomer.Create(self);
    end;
    
    end.

    Is this the best way to communicate  through the classes ? SendMessages ? the Unigui server handle it well ?

  7. On 8/21/2018 at 12:38 AM, wilton_rad said:

    hyper server has complete documentation, is very stable, and extremely easy to deploy, this is undoubtedly a giant leap in unigui technology, and obviously will not be part of the trial version.

    Why obviously ? its not that obvious to me since the HyperServer can be the differential criteria to choose UniGui or any other platform.
    But I will not buy it before being absolutely sure it will serve all my needs. And for this test the Hyperserver is essential 
    I already test unigui and found it excellent, but there are some major problems with my architecture, for example : Today i have a server with several customers, each customer have a different application running. In this scenario, if i have to update a customer program, i just rename the old executable and put new one in the folder, next call will be in the new executable.
    With Apache i can't do that, i have to reboot the apache server module, which will cause the interruption of all connected customers.

    Question : 

    We sell our software by concurrent use licensing, i'll be able to control the sessions across multiple servers ?

    Today we limit the customers by the windows user, which customer have a windows user that can connect only one time. If other person try to connect, the previous session is closed. It's possible to do this with Unigui + HyperServer ?

    Question2:  There's an automatic way to send new version to the hyperserver ?
    I'm asking because today we send updates directly from delphi IDE ( using post build events ) to our customers, and the software is programmed to do a self update.
    There's a way  to do this using Unigui + HyperServer ? 

    Please, try to release a HyperServer trial license, it's fundamental to test with it before buy.

×
×
  • Create New...