NetTalk Central

Author Topic: Got focus back  (Read 3673 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Got focus back
« on: January 24, 2012, 11:52:12 AM »
After Bruce pointed me in the right direction on another matter I managed to find another bug in my code.

Basically I have an invoice line form which. When this form is closed I need to update the totals of an invoice somewhere in the invoice form code.

I thought I was being clever and put my code in GotFocusBack on the invoice form which then recalculates things.

This worked fine until I ran it in mobile mode. Now I see the problem - GotFocusBack is only ever called after a popup form is closed and of course mobile does not use popups.

So the question is, which embed would I need to use to recalculate some totals on the invoice form after the invoice line form has closed? Clearly it is a got focus back scenario but needs to work in mobile mode.

Thanks

John

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Got focus back
« Reply #1 on: January 25, 2012, 02:58:13 AM »
Sorry thought I would re-post as this one is holding me up now. Hopfully someone can help.

Thanks

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11301
    • View Profile
Re: Got focus back
« Reply #2 on: January 25, 2012, 07:23:17 AM »
first thought -
perhaps the update (of the session variable) should be in the Update LineItems  form? In the Post Update / Post insert. Maybe, I'm not sure.

In the UpdateInvoice Form, I'd do it in GenerateForm routine.

cheers
Bruce