Hey there,
can you tell me what causes this B4A snippet to throw an exception in B4i? Is it just not compatible with XUI? I don´t get it.
Kind regards
CrunkFX
can you tell me what causes this B4A snippet to throw an exception in B4i? Is it just not compatible with XUI? I don´t get it.
Transition Template B4A:
Public Sub PrepareTransition_RadiusIn (Xui As XUI, RootWidth As Float, RootHeight As Float, CurrentPageRoot As B4XView, NewPageRoot As B4XView) As ResumableSub
Dim pnl As B4XView = Xui.CreatePanel("")
NewPageRoot.AddView(pnl, 0, 0, RootWidth, RootHeight) '<< stops here
Dim cnv As B4XCanvas
cnv.Initialize(pnl)
Dim frontBmp As B4XBitmap = CurrentPageRoot.Snapshot
Dim backBmp As B4XBitmap = NewPageRoot.Snapshot
Dim startingSize As Float = IIf(RootHeight>RootWidth,RootHeight,RootWidth)
cnv.ClearRect(cnv.TargetRect)
Dim frames As Int = 22
Dim stepSize As Float = startingSize/frames
For i = 0 To frames-1
cnv.DrawBitmap(backBmp,getRect(0,0,RootWidth,RootHeight))
Dim path As B4XPath
path.InitializeOval(getRect((RootWidth/2)-(startingSize)+(stepSize*i),(RootHeight/2)-(startingSize)+(stepSize*i),(startingSize*2)-((stepSize*2)*i) , (startingSize*2)-((stepSize*2)*i)))
cnv.ClipPath(path)
cnv.DrawBitmap(frontBmp,getRect(0,0,RootWidth,RootHeight))
cnv.RemoveClip
cnv.Invalidate
Sleep(16)
Next
pnl.RemoveViewFromParent
Return True
End Sub
ERROR:
Application_Start
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Application_Active
Page with this id already exists: location!
FCMConnected
Application_Pushtoken
Error occurred on line: 57 (B4x_Transition)
Object was not initialized (UIView)
Stack Trace: (
CoreFoundation 6B22DD81-3585-3BE6-BC77-BA19810EC0F2 + 627356
libobjc.A.dylib objc_exception_throw + 60
CoreFoundation 6B22DD81-3585-3BE6-BC77-BA19810EC0F2 + 983952
Mein Friseur -[B4IObjectWrapper object] + 120
Mein Friseur -[B4XViewWrapper asPanelWrapper] + 68
Mein Friseur -[B4XViewWrapper AddView:::::] + 76
CoreFoundation 6B22DD81-3585-3BE6-BC77-BA19810EC0F2 + 138020
CoreFoundation 6B22DD81-3585-3BE6-BC77-BA19810EC0F2 + 259600
Mein Friseur +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1400
Mein Friseur -[B4IShell runVoidMethod] + 208
Mein Friseur -[B4IShell raiseEventImpl:method:args::] + 1608
Mein Friseur -[B4IShellBI raiseEvent:event:params:] + 1360
Mein Friseur -[B4IDebugResumableSub resume::] + 352
Mein Friseur __21-[B4ICommon Sleep:::]_block_invoke + 56
libdispatch.dylib E3EA4F63-5D11-342A-AF19-9F58DBC8E259 + 7788
libdispatch.dylib E3EA4F63-5D11-342A-AF19-9F58DBC8E259 + 14896
libdispatch.dylib E3EA4F63-5D11-342A-AF19-9F58DBC8E259 + 73544
libdispatch.dylib _dispatch_main_queue_callback_4CF + 44
CoreFoundation 6B22DD81-3585-3BE6-BC77-BA19810EC0F2 + 333824
CoreFoundation 6B22DD81-3585-3BE6-BC77-BA19810EC0F2 + 46852
CoreFoundation CFRunLoopRunSpecific + 600
GraphicsServices GSEventRunModal + 164
UIKitCore 137A95AA-DA6D-332C-BC01-E13BB9B6E317 + 5327704
UIKitCore UIApplicationMain + 364
Mein Friseur main + 104
dyld start + 520
)
Kind regards
CrunkFX