Jump to content

picyka

uniGUI Subscriber
  • Posts

    1079
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by picyka

  1. Solution:

     

    type
     TResultObjCallBackAnonProc = reference to procedure (AResult : TAbstractBO);
    
     private
       { Private declarations }
       FResultObjCallBackAnonProc : TResultObjCallBackAnonProc;
    
    
    procedure TFConsPadraoObj.InstanceForm(AObj : TAbstractBO; AService : TClass; AProc : TResultObjCallBackAnonProc);
    begin
     Self.FListFilter := TObjectList<TFilterColumn>.Create;
     Self.FService := AService;
     Self.FResultObj := AObj;
     Self.CreateClintDataSet(Self.FResultObj);
     Self.ShowModal;
    
     FResultObjCallBackAnonProc := AProc;
    end;
    
    procedure TFConsPadraoObj.UniFormClose(Sender: TObject; var Action: TCloseAction);
    begin
     FResultObjCallBackAnonProc(ResultObj);
    end;
    
    

  2. Yes even thought about it the more I like this method in food on close if it is a parameter to procedure

    "procedure TFConsPadraoObj.InstanceForm (AObj: TAbstractBO; AService: TClass; AProc:TResultObjCallBackAnonProc); "

     

    That could not understand ...

  3.  type
     TResultObjCallBackAnonProc = reference to procedure (AResult : TAbstractBO);
    
    procedure TFConsPadraoObj.InstanceForm(AObj : TAbstractBO; AService : TClass; AProc : TResultObjCallBackAnonProc);
    begin
     Self.FListFilter := TObjectList<TFilterColumn>.Create;
     Self.FService := AService;
     Self.FResultObj := AObj;
     Self.CreateClintDataSet(Self.FResultObj);
     Self.ShowModal;
    
     AProc(Self.ResultObj);
    end;
    
    
     FConsPadraoObj.InstanceForm(Self.FCidade.Estado, TClass(Self.FCidadeService),
                                 procedure(ResultObj : TAbstractBO)
                                 begin
                                   ResultObj.AssignTo(Self.FCidade.Estado);
                                 end)
    
    

     

     

     

    I could not understand where food

     

    AProc (Self.ResultObj);

     

    why so ResultObj User has value after selecting a row.

     

    Any tips?

  4. How to implement a method that seeks an object from another form

     

    something like the UniCalendarDialog

     

     

     

    UniCalendarDialog1.Execute;
    
    TuDialogsFrame.UniCalendarDialog1Confirm procedure (Sender: TObject);
    begin
      UniLabel2.Caption: = DateToStr (UniCalendarDialog1.Date);
    end;
    

    or something like:

     

     

     

    UniGUIDialogs.MessageDlg ('Confirm deleting the selected record?' MtConfirmation, mbYesNo, _Confirm);
    
    TFCidade._Confirm procedure (AResult: Integer);
    begin
      AResult case of
    	mrYes:
      	begin
    		FCidadeService.Delete (Self.FCidade);
    		Self.Close;
      	end;
    	mrNo: edNome.SetFocus;
      end;
    end; 

  5. sorry, more encontri only thing that was setting a theme

     

    CurrentTheme: = 'blue';

     

    I found nothing feeding the property CustomCSS

  6. I can load the CSS at runtime?

     

    where would be the most correda to load?

     

    in the future want to change the style I can do this without recompiling the application.

     

    Thank you.

  7. ???

     

     

    I do not understand how to implement the server side, in such cases it is necessary to work multi layers? I have no experience with web programming.

  8. You can use a server side database or a Cookie at client side.

     

     

     

    the first option "you can use a server side database" would have to have a second application to be picking up the sections, or would like to implement?

  9. I am finishing a generic query objects I pass an object and a service

     

    FConsPadraoObj.InstanceForm (Self.FCidade.Estado, TClass (Self.FCidadeService));

     

    being that the screen is created dynamically.

     

    My doubt is this, when the User to select the record in the grid I'm a popular object ... how do I return this object?

    post-635-0-91551400-1336444994_thumb.jpg

  10. Searching and setting data in the section!

     

    When the User logs in I need to set it to the section?

     

    I can get the id of the section, User, ip access, start time, end time?

     

    which the most suitable place to set and get these values?

     

    I have a table Example section

     

    id

    User

    beginning

    end

    remote ip

     

    I would like to take the data at the time User log into the system at the end of the section to record information

     

    grateful

     

    Leandro.

  11. procedure TFPreviewReport.ShowFastReport(AReport: TfrxReport; ATitulo : String = '');
    var
     lFilePDF : String;
    begin
     lFilePDF := AReport.Name + '_' + FormatDateTime('hhmmss.zzz',Now())+'.pdf';
     Self.Caption := 'Visualizar Relatório';
     Self.pnlTop.Caption := 'Relatório de ' + ATitulo;
    
     frxPDF.FileName := lFilePDF; //TfrxPDFExport
     frxPDF.ShowDialog := False;
     frxPDF.DefaultPath := UniServerModule.LocalCachePath;
     AReport.ShowProgress := False;
     AReport.PrepareReport;
     AReport.Export(frxPDF);
     FrameReport.URL := UniServerModule.LocalCacheURL + lFilePDF; //TUniURLFrame
     Self.Show;
    end; 

    • Upvote 1
  12. Why when using shortcut keys and shoot a button for example, if a component TUniScreenMask he is not fired?

     

    The buttons still do not receive focus?

     

     

    I'm making a component based on TUniComboBox only when it enters the field to change the color, I'm using the Meto

     

    DoOnEnter procedure; override;

    DoOnExit procedure; override;

     

     

    TUniComboBoxLabel.Create constructor (AOwner: TComponent);

    begin

    inherited Create (AOwner);

    PersistentEvents: PersistentEvents = + [eventer, evExit];

    Self.FItensValues​​: = TStringList.Create;

    Self.Style: = csOwnerDrawFixed;

    end;

     

    TUniComboBoxLabel.Destroy destructor;

    begin

    inherited Destroy;

    FreeAndNil (Self.FItensValues​​);

    end;

     

    TUniComboBoxLabel.DoOnEnter procedure;

    begin

    Self.Color = $ 00C4FFFF;

    DoOnEnter inherited;

    end;

     

    TUniComboBoxLabel.DoOnExit procedure;

    begin

    Self.Color: = clWindow;

    DoOnExit inherited;

    end;

     

    being that only returns the color white when ultilizemos to exit the field mouse, using the Enter key does not work.

     

    Another thing how to implement a label next to the component as native delphi TLabeledEdit?

     

    Thanks for the help

     

    hugs

  13. In case of databases, absolutely best for me are DAC components from Devart. If you use MS SQL - use SDAC, if you use Oracle - use ODAC. But if you use more DB sources - use UniDAC, which I can recommend a lot. My experiences are only with commercial DBs for corporate ERPs, so MS SQL Express (2008/2012) for Windows or Oracle 11gR2 Express for Linux are suitable for DAC. These Express versions of commercial DBs are free (limited by database size and CPU count). But if you use UniDAC, you can use MySQL or PostgreSQL from open-source territory for instance. All Devart DACs are based on TDataSet class.

     

     

    I'm using Postgres 9.0 + DBExpress with a drive from Devart

    and I'm doing a framework persistenicia objects to work with the livebind xe2

  14. The success of an application is a set of tools I would say so, with the components UniGUI, which seriao ferrametas the most appropriate

     

    Driver connection to the database?

    Best database?

    Work or use object-oriented TClientDataSet?

    Live binding?

    Apache or IIS as a server?

     

    As their stories are no longer working!

     

    Regards to all.

  15. Then you need to use OnEnter event for each field on the form.

     

     

    The idea is to work with inheritance form, form does not have a standard routine to do the pros Bind the object fields was set to leave the panel of the code ... I will investigate more fine shape.

     

    thank you

  16. Hello people, would be very interesting to be able to put a label on a TUniEdit as native delphi component TLabeledEdit, one that I think would be very useful TUniEdit with a button, and a TUnieditNumber, would be perfect is suggestive.

     

    Regards to all.

×
×
  • Create New...