|
<< Click to Display Table of Contents >> Navigation: Telegram > 2019 > 08 > 06 > Telegram_2019-08-06T05 |
2019-08-06T05:00:11
override an OnBackButton?
2019-08-06T05:00:19
the event is on the SErverController. The objective is to resync the active form
2019-08-06T05:01:08
the third param was my test
2019-08-06T05:01:39
this is as you showed me
2019-08-06T05:02:21
yes. This should work
2019-08-06T05:02:27
unless you destroy your forms
2019-08-06T05:02:46
no, i never destroy forms
2019-08-06T05:04:00
As you can see in the second tab the form is ok while in the \previous\ i have this error
2019-08-06T05:05:21
Clicking \MAIN_001\ as before
2019-08-06T05:06:40
the link should call \macchine.gotoRecord\ which has gone, when the second form register his callbacks and (I think) destroy the callbacks of the first
2019-08-06T05:08:18
the question is: what's your active form?
You need to put a breakpoint in that OnBackButton event and find out what's your VResyncInfo.Session.ActiveForm
2019-08-06T05:08:28
only the active form can execute a callback
2019-08-06T05:08:33
that's the whole point
2019-08-06T05:09:11
if your ActiveForm doesn't match the form you have on the browser, you need to set the active form (that's what that parameter SetActiveForm := True does)
2019-08-06T05:09:40
why your form is not being set? I don't know. Something else is going on there
2019-08-06T05:10:05
I have two tabs opened
2019-08-06T05:10:31
I don't think when I change tab, IW changes also the activeForm
2019-08-06T05:10:52
There are two pages opened in two different tabs
2019-08-06T05:11:54
I tried in debug and the OnBackButton never fires
2019-08-06T05:13:40
tomorrow I'll try another example and let you know
2019-08-06T05:13:51
ok
2019-08-06T05:13:59
thank you as always
2019-08-06T05:14:27
you said it never fires?
2019-08-06T05:14:36
it should
2019-08-06T05:14:46
unless our form is really screwed
2019-08-06T05:15:19
screwed!?
2019-08-06T05:15:54
no, never. I tries also change the backButton options
2019-08-06T05:16:40
I don't know why it is not firing.... Would have to debug it to find out
2019-08-06T05:16:48
you are using templates right?
2019-08-06T05:16:52
yes
2019-08-06T05:17:04
That's the only difference
2019-08-06T05:17:10
tomorrow I'll try one with templates
2019-08-06T05:17:14
and see how it goes
2019-08-06T05:17:30
ok thank you and good night
2019-08-06T05:17:36
or good party?
2019-08-06T05:17:41
;)
2019-08-06T05:17:53
better the second chanche
2019-08-06T05:18:33
night ??
2019-08-06T05:22:03
before I go... check this in your forms:
2019-08-06T05:22:05
2019-08-06T05:22:12
this is part of the HTML.
2019-08-06T05:22:39
in your browser, check the HTML of each form and find which is the form name
2019-08-06T05:22:55
the form name should be UNIQUE
2019-08-06T05:23:24
these fields will determine if IW will trigger the OnBackButton event or not
2019-08-06T05:23:39
if they are somehow incorrect, you need to fix it
2019-08-06T05:24:27
Check in Firebug or raw html Source?
2019-08-06T05:25:11
raw html
2019-08-06T05:26:15
Seocnd form in another tab
2019-08-06T05:27:08
Better view of the first form
2019-08-06T05:37:06
I have changed some backbutton option, and now it fires
2019-08-06T05:37:19
but the problem of callbacks is the same