Jump to content

alasoft

Members
  • Posts

    90
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by alasoft

  1. Hi everybody ..

     

    Apologyze if this topic has been discussed before  .. but I didn' find it in the forum.

     

    The question is:

     

    How I enable/disable specific columns editing in TUniDbGrid (ie: I want the user can only edit columns 3 and 5, for example but NOT columns 1, 2 and 4)

     

    Thanks everybody !

     

    Rober

  2. Pardon my ignorance .. :-)

     

    But if I create a TUniLabel at runtime over a TUniForm like this:

     

    TMyForm.OnCreate(Sender:  TObject);

    var

       oMyLabel: TUniLabel;

    begin

    oMyLabel:=TUniLabel.Create(Self);

    with oMyLabel do

    begin

    Parent:=Self;

    Caption:='Hi World;

    Top:=10;

    Left:=10;

    AutoSize:=True;

    end;

    end;

     

    The control displasy fine .. but, while the Height property was setted .. that does not happen with the Width property, wich remains in 0 (zero)

     

    I need to 'calculate' somehow the width - in pixels - of that label created like the sample, in runtime, depending on the Caption property.

     

    Help !!

     

    :-)

     

    Thanks 

     

    Rober

  3. I made a very simple package (test-case) .. with 

     

     

    unit uPrueba;
     
    interface
     
    uses
      UniButton;
     
    type
      TPrueba = class(TUniButton)
     
      end;
     
    implementation
     
    end.
     
    And .. 
     
    unit cRegistra;
     
    interface
     
    procedure Register;
     
    implementation
     
    uses
      Classes, uPrueba;
     
    procedure Register;
    begin
      RegisterComponents('AlaSoft Prueba',[TPrueba]);
    end;
     
    end.
     

    When then I tried to 'make' the project (compile it) .. 

     

    In ..

     

    unit seCSSParser;

     

     
    interface
     
    uses
      SysUtils, Classes, Dialogs;

     

    Doesnt' find Dialogs, so I changed to Vcl.Dialogs and compiled the project.

     

     

    Then I tried to 'Install' and ..

     

    Cannot load package 'uIndy17'. It contains unit 'uIdResourcesStringsProtocols', wich is also contained in Package 'Prueba'

     

     

    Any idea, about what's going on here ??

     

    Thanks !!

     

    Rober

     

     

     

     

     

     

     

     

     

     

     

  4. Hi !! .. 

     

    Please, let me explain imho the 'call back 'concept'. Thank you !

     

    The concept behind 'call back functions' is in fact very simple .. but .. very different compared with the 'classic' way.

     

    Consider this:

     

    TForm.ButtonOnClick(Sender: TObject)

    begin

      .

      

      with TLogginDialog.Create(nil) do

      try

         ShowModal() // Here is the problem !!  

      finally

        Free;

      end;

      .

     

    end;

     

    Why is there a problem with ShowModal() ? ..  because you normally expect the 'modal behaviour' .. TLogginDialog instance will 'wait' until the operator close the form (apparently 'waiting' in modal state) then the flow of logic will return .. and ... 'finally' the instance will be destroyed (finally free)

     

    But that will not happen

     

    What actually will happen is .. the instance will be created .. then showed .. and the logic will return inmediatly !! .. so, inmediatly destroying the instance just created (excuting, 'finally free')

     

    That of course, will probably lead to some kind of error .. 

     

    Why this happens ?

     

    Because the TLogginDialog instanciated continues running in another thread ..

     

    The point here, is that the caller Form (TForm) .. cannot know 'when' the called Form (TLogginDialog) will 'stop' (in the actual sample, that will happen when the operator close the form)

     

     

    But the called Form does know when it ends

     

    Because as any Form, has it's own 'OnClose' event .. (probably this event has a 'flag' TCloseAction=caFree, so after its close, will be free .. check out this !)

     

    So the 'idea' here is to 'invert the logic' .. instead of the caller Form knowing whe the called Form returns (in fact cannot know) the called Form, 'informs' the caller when it stops.

     

    So:

     

    TCallerForm <calls> TCalledForm .. TCalledForm <informs 'something'> TCallerForm

     

    How to do this ?

     

    To put it simply, the caller, call the 'other' form .. passing some 'special parameter .. wich in fact is a pointer to a function .. 

      

    TForm.ButtonOnClick(Sender: TObject)

    begin

       oLoginDialog:=LoginDialog.Create(LoginDialogCallBack);

       oLoginDialog.ShowModal();

    end;

     

    TForm.LoginDialogCallBack;

    begin

       if oLoginDialog.LogginOkey then

        .

        .

    end;

     

    And .. in the OnClose event of the TLoginDialog ..

     

    TLoginDialog.OnClose(Sender: TObject; var Action: TCloseAction);

    begin

       if Assigned(pCallBack) then

         pCallBack;

    end;

     

    (Attention ! .. after the TLoginDialog.OnClose .. the TLogginDialog instance will probably be destroyed !)

     

    And that's it !

     

    :)

     

    Regards

     

    Rober

    • Upvote 1
  5. Hola que tal .. recien veo tu respuesta .. 

     

    Estoy parado con UNIGUI ya que tengo otras cosas que hacer .. el producto me parece simplemente sensacional y Delphi - que es lo que esta abajo de UNIGUI - tambien ..

     

    Avanze mucho con el producto, hasta que tuve que buscar trabajo y no le puedo dedicar el tiempo que me gustaria

     

    Saludos


    Rober

  6. After deinstalling old unigui version .. erasing all .bpl's and .dcp's (unigui,extjs,uindy), I have tried to install last version 0.90.0.976 from uniGUI2013Group.groupproj in Delphi XE3, getting this error message:

     

    [dcc32 Fatal Error] uniGUI17.dpk(133): F2051 Unit uniGUIApplication was compiled with a different version of ExtPascal.TExtThread

     

    Please help !!

     

    :-)

     

    Thanks

     

    Rober

×
×
  • Create New...