Re: browserDocumentLoadComplete fired twice Mobile
Opps fix my post I learned something today, wow, the target not only records mouse clicks, but record what the message it going to ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: browserDocumentLoadComplete fired twice Mobile
Had to add hack for mobile. This works Local sHackDownloadCompleteFlag on browserDocumentLoadComplete pURL add 1 to sHackDownloadCompleteFlag ntinfo ("download flag: " & sHackDownloadCompleteFlag) if pURL is not empty then dispatch "hideloader" to me end if show widget "Body" show group "footer" put "true" into sLoadSuccessFlag put pURL into sBrowserURL browser_SetLastURL pURL put short name of the target into tBrowser ntInfo ( (the lockscreen) & "; show the target: " & tBrowser &"; " & pURL) if tBrowser = "Body" then if isMobile() = "true" then if sHackDownloadCompleteFlag = 2 then journal_AddEntry end if else journal_AddEntry end if end if if sHackDownloadCompleteFlag = 2 then put 0 into sHackDownloadCompleteFlag end if end browserDocumentLoadComplete Brahmanathaswami On 1/30/19, 4:02 AM, "use-livecode on behalf of Sannyasin Brahmanathaswami via use-livecode" wrote: I learned something today, wow, the target only records mouse click budget record what the message it going to This was useful. It is still being call twice on mobile. NetWork tracer output. I have to set a flag or same ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: browserDocumentLoadComplete fired twice Mobile
I learned something today, wow, the target only records mouse click budget record what the message it going to This was useful. It is still being call twice on mobile. NetWork tracer output. I have to set a flag or same ON desktop info1/30/19 3:50:49 AM from loader: true openCard2 card id 1419 of stack "view_SivaSivaBrowser" info1/30/19 3:50:49 AM from browser: true opencard18 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:50:50 AM begin load url , body is visible: false browserDocumentLoadBegin90 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:50:50 AM false; show the loader https://www.himalayanacademy.com/monastery/about browserDocumentLoadBegin97 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:50:50 AM browserDocumentLoadComplete browserDocumentLoadComplete 101 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:50:51 AM false; show the target: Body; https://www.himalayanacademy.com/monastery/about browserDocumentLoadComplete 112 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:50:51 AM saving journal entry for view_SivaSivaBrowser Journal_RecordEntry 157 stack "model_SivaSivaJournal" on Android info1/30/19 3:45:02 AM receive a click mouseup 2 widget id 8198 of card id 8169 of stack "Siva-Siva-Portal" info1/30/19 3:45:15 AM from loader: true openCard2 card id 1419 of stack "view_SivaSivaBrowser" info1/30/19 3:45:16 AM from browser: true opencard18 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:45:16 AM begin load url , body is visible: true browserDocumentLoadBegin90 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:45:16 AM false; show the loader https://www.himalayanacademy.com/monastery/about browserDocumentLoadBegin97 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:45:16 AM browserDocumentLoadComplete browserDocumentLoadComplete 101 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:45:16 AM true; show the target: Body; https://www.himalayanacademy.com/monastery/about browserDocumentLoadComplete 112 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:45:16 AM saving journal entry for view_SivaSivaBrowser Journal_RecordEntry 157 stack "model_SivaSivaJournal" info1/30/19 3:45:18 AM browserDocumentLoadComplete browserDocumentLoadComplete 101 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:45:19 AM false; show the target: Body; https://www.himalayanacademy.com/monastery/about browserDocumentLoadComplete 112 stack "behavior_view_SivaSivaBrowser" stack "view_SivaSivaBrowser" info1/30/19 3:45:19 AM saving journal entry for view_SivaSivaBrowser Journal_RecordEntry 157 stack "model_SivaSivaJournal" info1/30/19 3:45:26 AM receive a click mouseup 2 widget id 8198 of card id 8169 of stack "Siva-Siva-Portal" Brahmanathaswami On 1/29/19, 10:08 AM, "use-livecode on behalf of hh via use-livecode" wrote: >You could use "the target" do get the browser >that is calling the handler... .. and put the browserDocumentLoadComplete *only* in the card's script (or the stack's script if the widgets are on different cards). ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: browserDocumentLoadComplete fired twice Mobile
> You could use "the target" do get the browser > that is calling the handler... .. and put the browserDocumentLoadComplete *only* in the card's script (or the stack's script if the widgets are on different cards). ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: browserDocumentLoadComplete fired twice Mobile
You could use "the target" do get the browser that is calling the handler. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
browserDocumentLoadComplete fired twice Mobile
browserDocumentLoadComplete is not in the dictionary. It's in described in API doc for the browser widget. Maybe that is intentional At any rate, for some reason if you have two browses widgets on the same card, but you have this in the script of only 1 browser widget widget "loader" widget "Body" # has the script: On browserDocumentLoadComplete pURL # so do stuff End browserDocumentLoadComplete On desktop, it fires once, as expected. But using Network Tracer (a God Sent Plugin!) on mobile it fires twice and I can see that it is fired once when "loader" in invoked and once again when "body" in loader. If as if the widget "loader" has the script also, but it does not. Can anyone confirm this? if so I will report a bug. But it a nuisance really because I'm getting double entries in the "Journal" Now if there is no way to determine from browserDocumentLoadComplete which browser is calling the handler, I would provide a conditional (pseudo code) if the browser widget is "Loader" then # do nothing Else the browser widget is "body" setAddJournal pURL end if maybe a second parameter is needed browserDocumentLoadComplete pURL pTarget ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode