Jump to content

Stano

Members
  • Content Count

    867
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Stano


  1. If an array of type Date has the option "null" in the DBTable so

    DTP_STAT_HAND_GRIF_VOL_DOSSIER_OPVR_DATE.Field.AsDateTime := 0;//  = strToDAte('30/12/1899')

    You can set

    DTP_STAT_HAND_GRIF_VOL_DOSSIER_OPVR_DATE.Field.Value := null;


  2. I've dealt with this in the dpr unit.
    I left things around in the demo as well. Maybe they will inspire you in something

    program MyProgram;
    
    {$R *.dres}
    
    uses
      ...
      subBillingRestEnBloc in 'SubForms\Settlement\Edit billing\subBillingRestEnBloc.pas' {frmsubBillingRestEnBloc};
    
    var
      LogonForm: TfrmLoginForm;
    
    {$R *.res}
    
    begin
      ReportMemoryLeaksOnShutDown := True;
      Application.Initialize;
      Application.MainFormOnTaskbar := True;
      Application.CreateForm(TdtmdBasic, dtmdBasic);
      oAppEnv := TAppEnv.Create;
      Certificate := TCertificate.Create;
      oGlobVar := TGlobalVar.Create(Certificate);
    
      try
        Licence := TLicence.Create;
    
        try
          Licence.CheckUp;
    
          try
            LogonForm := TfrmLoginForm.Create(nil);
          except
            Application.Terminate;
            Exit;
          end;
    
          if LogonForm.ShowModal = mrOK then
          begin
            FreeAndNil(Licence);
            SupObjJson := TSupObjJson.Create;
            oAppearance := TAppearance.Create(nil);
            oAppearance.ReadOptions;
    
            if oAppearance.IsTMSStyle then
              oAppearance.SetStylers(oAppearance.StyleName)
            else
            begin
    
            TStyleManager.TrySetStyle(oAppearance.VclStyle);
              oAppearance.UpdateToolBarPager;
            end;
    
            IdentificationData := TIdentificationData.Create;
    
            try
              IdentificationData.Make;
            finally
              FreeAndNil(IdentificationData);
            end;
    
            Application.CreateForm(TfrmMainFormFOC, frmMainFormFOC);
            frmMainFormFOC.Position := poDesigned;
            SupObjJson.ReadForm(frmMainFormFOC);
            frmMainFormFOC.Show;
            Application.Run;
          end
          else
          begin
            FreeAndNil(LogonForm);
            FreeAndNil(oGlobVar);
            FreeAndNil(oAppEnv);
          end;
        finally
          FreeAndNil(Licence);
        end;
      finally
        FreeAndNil(Certificate);
      end;
    
    end.

     


  3. It seems to me that you are referring to the Master - detail link. That is handled differently.
    If it is something else so:

    1. the button bothers me a lot
    2. I would run the code every time I change a record
    3. but the code is time consuming...

    Which of these applies?


  4. I kind of don't understand your problem. What are you actually pursuing?
    If you have only one record then the active buttons in the Navigator will be Insert/New, Edit and Delete. This is to say that you can't rely on the cursor buttons.
    It is better to work with the attached DataSet. Either it has an active/selected record or it doesn't.
    If you have something else in mind, then describe it more precisely.


  5. 48 minutes ago, JonRobertson said:

    The one difference that I encounter is that a "SubForm" is not linked to anything at design-time. If you have placed a TFrame anywhere in the project, the frame is now linked and "in use" by the designer.

    This is interesting information regarding Frame. It's probably worth the effort to study it.


  6. 8 hours ago, Uwe Raabe said:

    Are SubForms problem free?

    Yes.

    I asked the question mainly out of curiosity. Thank you for all the answers

    1 hour ago, Der schöne Günther said:

    Can you shed some light on what a "SubForm" is?

    I create a form and set its Parent to some component on the "base" form.
    I don't have any problems with this.


  7. HI,

    when I tried TFrame more than 20 years ago, I had problems. I was immediately recommended to use SubForm. At that time TFrame was very unreliable.
    The question is: has that changed? Is TFrame problem free?


  8. I wrote that you should hide the procedure as much as possible. And you put it on display for the world to see:classic_biggrin: You're supposed to proceed from the top down
     

      strict private  
        FSeasonSelect: TSeasonSelect;
      private
      strict protected   
      protected
      public
        property SeasonSelect: TSeasonSelect read FSeasonSelect write FSeasonSelect;

     

×