Recent

Author Topic: Recyclable jForm Create and Init sequence has changed and broken my App  (Read 3371 times)

Robert Gilland

  • Full Member
  • ***
  • Posts: 159
Hi,
 
  Recyclable jForm Create and Init sequence has changed and broken my App. I don't know when this change happened but with the latest
LAMW from GIT my application crashes. It was working perfectly. I have tried all sorts of ways to get my App to not crash and no luck.

  How am I meant to Create and Init Recyclable jForms in LAMW App?

  I create Recyclable jForms as below:

procedure EditStockTakeItems(  pCallingForm : jForm; poDocument : TDocumentTransferObj; pOnCloseCallback : TNotifyEvent );
begin
  if frmStockTakeItems = nil then
    begin
      gApp.CreateForm(TfrmStockTakeItems, frmStockTakeItems);
      frmStockTakeItems.pCallingForm := pCallingForm;
      frmStockTakeItems.poDocument := poDocument;
      frmStockTakeItems.Init(gApp);
    end
  else
    begin
      frmStockTakeItems.pCallingForm := pCallingForm;
      frmStockTakeItems.poDocument := poDocument;
      frmStockTakeItems.Show;
    end;
  frmStockTakeItems.SetCloseCallBack(pOnCloseCallback, pCallingForm );
end;


schumi

  • New Member
  • *
  • Posts: 37
hi,
look AppDemo1 in demos\GUI or move createform / init code in OnActivityCreate method


Mongkey

  • Full Member
  • ***
  • Posts: 119
This thread is a good start solving your problem:

https://forum.lazarus.freepascal.org/index.php/topic,54916.0.html

 :)

 

TinyPortal © 2005-2018