B4J Question [ABMaterial] Page.Pause Issue

Harris

Expert
Licensed User
Longtime User
ABM Version - 4.51 (aka Dragonfly - like the horse Basil Fawlty bet on... and won.. then lost... Mrs. Richards... very funny...)

Seems page.pause will only work in debug mode....
Tried on tablet, phone and desktop.

Even tried page.PauseDelayed(10)... with long running process that takes 3 seconds to complete and no success.

Even tried with a short Sleep(0) or Sleep(100). Same thing. Works in debug but not in Release.
On a distant server, this issue becomes even more pronounced because it seems the app is frozen...

Thanks
 

Harris

Expert
Licensed User
Longtime User
I never experienced this problem before...
Any tips as what I might look for?
Thanks
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Geezzz, never checked....
Just like phoning into customer support for your PC - reboot the PC and see if the problem still exists...
Will check and report. Workin on tutorial right now...
 
Upvote 0

vp2020

Member
Licensed User
I recently upgrade my apps to ABM 4.95, B4J 9.5 JDK 11.0.1
I found that page.pause seems not works on release mode, running circle not showing,
but on the debug mode, page.pause works fine.

Also page.SetLoaderDEVICESWITCH on BuildPage, the animation not showing on release mode,
but debug is ok.

Any idea how to solve this?
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Below is an email I wrote to Alain on this subject - and promptly forgot to post this solution here...


Solution - page pause:
Alain,

Page.Pause...

Well, just before I put 2 bullets in the chamber for a little game of Russian Roulette, cause I spent the past two days screwing endlessly with this issue - and at witt's end...  I Found IT!  (dog with a bone... just can't let it go...)

Like I said, it always worked in debug - not in release...  WHY?
I tried everything - until it dawned on me: - #if Release
( I looked at this before but it wasn't obvious )...

My code from ABMApplication:

Public Sub Initialize

' bla, bla....

ABM.PreloadAllJavascriptAndCSSFiles = True      ' NEW - acutally handles 2 lines below - NOW commented out...

#if Release
ABM.ActivateGZip("Gh2TwFJAyTAIJnb", 1000) ' NEW

'''  *********************   TWO LINES BELOW THE ISSUE - Commented Out  **********************************
' ABM.AppDefaultPageCSSInline=True ' NEW
' ABM.AppDefaultPageJSInline=True ' NEW

Dim folders As List ' NEW
folders.Initialize
folders.Add(File.DirApp & "/www/" & ABMShared.AppName & "/images")
ABM.ActivatePNGOptimize("Gh2TwFJAyTAIJnb", folders, False , 9, False,  False)
#end if

BuildPage
End Sub

I looked at your 451 Demo and FeedBack examples and noticed these 2 lines did not exist in the modules / subs, -  so I commented them out....
Low and Behold, PAGE.PAUSE / RESUME Now Work....  In RELEASE Mode....

Looks like a left-over when updating from one version to another higher release....  Shame on ME!...

So, I put the gun away and carried on with more productive things.... - like posting terse responses on the forum...  

Thanks bro...  I live for another day....
 
Upvote 0

vp2020

Member
Licensed User
Thank alwaysbusy and Harris,
I commented out three lines:
'ABM.PreloadAllJavascriptAndCSSFiles=True
'ABM.AppDefaultPageCSSInline=True
'ABM.AppDefaultPageJSInline=True
and now page.pause works on release mode.

I want to further cofirm that whether 'ABM.PreloadAllJavascriptAndCSSFiles=True' need to be commented out or not?
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Thank alwaysbusy and Harris,
I commented out three lines:
'ABM.PreloadAllJavascriptAndCSSFiles=True
'ABM.AppDefaultPageCSSInline=True
'ABM.AppDefaultPageJSInline=True
and now page.pause works on release mode.

I want to further cofirm that whether 'ABM.PreloadAllJavascriptAndCSSFiles=True' need to be commented out or not?
Try it... You tell us - because I don't know...
 
Upvote 0

vp2020

Member
Licensed User
I decided to leave 'ABM.PreloadAllJavascriptAndCSSFiles=True' intact not commented out,
my Apps are all running smoothly now.

By the way, I wonder that where these two lines came from which version?
'ABM.AppDefaultPageCSSInline=True
'ABM.AppDefaultPageJSInline=True

Best regards
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Don't know...

But it "seems" to be covered by the PreloadAllJavascriptAndCSSFiles statement... where the extra lines cause a tizzy...

Anyway, it's all better now... We can go back to our regular programming channel.
 
Upvote 0
Top