Jump to content

Israel Portillo

uniGUI Subscriber
  • Posts

    68
  • Joined

  • Last visited

Posts posted by Israel Portillo

  1. Hi community

     

    I have a unresolved problem with mobile version.

     

    I seems ScrollRange does not work correctly with a scrollable form at the initial show, but if I swap or flip my mobile then all works correctly.

     

    There was an resolved issue but not for me.

     

    Temporally I will put online so you can see the problem

     

    Is the second form. At beggining you will see only one and half pictures but if you slip your mobile and return to original position you will see all the scrollrange working correctly showing 3 pics....

     

    I am in a little hurry to resolve this...

     

    I Attach source of the demo...

     

     

    Thanks for your assistence..

    Bug.rar

  2. Novice question in mobile version

     

    I want to do this...

     

    somebutton.onclick

    var

       oldCursor: tcursor;

    begin

      try

        oldcursor:=screeen.cursor;

        screen.cursor:=crHourglass;

        //

        DoSomeFunctionSpendigSeveralSeconds()

      finally

        screen.cursor:=oldcursor;

      end;

     

    Its not clear how to do that, in the movil example only put to sleep(3000) but how to process in meanwhile....?

     

    Thanks for your help.

     

  3. Sorry, its no clear for me

     

    The idea before edit is if "saldo" field is cero.. then ask for confirmation to edit or abort... And if there will be an edition then to put another field ("pago")  in a temporal forms variable (this.nPagoAnterior) ... 

     

     if ncTable.fieldbyname('saldo').asFloat <= 0 then
      begin
        if (MessageDlg('Documento saldado.. ..'+#13+#10+'Desea editarlo?', mtConfirmation, [mbYes, mbNo], 0) = mrNo) then
          abort;
      end;
      //
      self.nAnterioPago:=nctable.fieldbyname('pago').AsFloat;
     
    Not just to ask for to edit.....
    Sorry, this time I dont understand you approach....
  4. Hi Delphi Developer.

     

    Can you help me again....

     

    How to drive a callback to perfom an abort in a TableBeforeEdit ?

     

     

    procedure TFacturaRapidaForm.NcTableBeforeEdit(DataSet: TDataSet);

    begin

      if ncTable.fieldbyname('saldo').asFloat <= 0 then

      begin

        if (MessageDlg('Documento saldado.. ..'+#13+#10+'Desea editarlo?', mtConfirmation, [mbYes, mbNo], 0) = mrNo) then

          abort;

      end;

      //

      self.nAnterioPago:=nctable.fieldbyname('pago').AsFloat;

    end;

     

    Thanks for your help....

  5. Hi everybody.

     

    I have an issue I cant resolve... How to do a continuos showmodal.

     

    I explain it.

     

    In normal scene I have this behavior.

     

    procedure TValidaVentasForm.EtiquetasButtonClick(Sender: TObject);

    begin

       while true do

       begin
          // send the form....
          CodigosBarrasForm.ShowModal;
          // And obtain some data of that...
          id:=CodigosBarrasForm.CodigoEdit.Text;
          //
         if id<>'' then  // we obtained valid data
             DoSomeVeryInterestingWithTheData(id)
         else
            break; // <---- The end of the show

       // or I repeat again...

       end;

       //

    end;

     

    I run a showmodal form to obtain a data from it until this data is an empty string....

     

    Yes, yes, I know your answer.... Callback functions.... 

     

    Here is my unigui stage:

     

    procedure TValidaVentasForm.EtiquetasButtonClick(Sender: TObject);
    begin
      CodigoBarrasform.showModal(self.FormCodigoBarrasLectura);  // <---- The below procedure as callback parameter 
    end;
     
    procedure TValidaVentasForm.FormCodigoBarrasLectura(Sender: TComponent;  AResult: Integer);  // <---- The callback 
    begin
      // In the below variable I put the result obtained CodigoBarrasForm  in mainmodule to use here...
      if UniMainModule.TheIDObtainedFromCodigodeBarrasForm<>'' then
      begin
          DoSomeVeryInterestingWithTheData(UniMainModule.TheIDObtainedFromCodigodeBarrasForm);
         // How to relaunch the form again ?
      end;
       //else
           // Does not happend anything
      //
      // Here is the puzzle... Please help me... how to drive this...
      //
      //
      // if UniMainModule.TheIdObtainedFromCodigodeBarrasForm<>'' then
      // begin
      //    DoSomeVeryInterestingWithTheData(UniMainModule.TheIdObtainedFromCodigodeBarrasForm);
      //    
      //    But How to repeat the showmodal() ?
      //     How to do a working:
      //    self.EtiquetasButtonClick(Self);
      //  end;
     
    end

     

    How to launch again the codigoBarrasForm until the CodigosBarrasform.CodigoEdit text = '' ????

     

    Any help is welcomed.

×
×
  • Create New...