iOS Question B4XPreferenceDialog not working with B4I for me

tsteward

Well-Known Member
Licensed User
Longtime User
So PreferenceDialog was working and now its not again.
Ive been working in B4A for a while and came back to B4I to keep it up to date only to find I can't initialize Preference Dialog

My code
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    drawer.Initialize(Me, "Drawer", Root, 200dip)
    drawer.CenterPanel.LoadLayout("MainPage")
    xui.SetDataFolder("LARA_data") 'required in B4J
    B4XPages.SetTitle(Me,"LARA 4 alpha")
    B4XPages.GetManager.TransitionAnimationDuration = 0
    #if b4j
        toast.Initialize(Root1)
        prefdialog.Initialize(Root1,"Preferences",400dip,400dip)' B4XPages.MainPage.Root
    #Else
        toast.Initialize(Root)
    #end if
    #if b4a or b4i
        prefdialog.Initialize(Root,"Preferences",clvMakes.AsView.Width,400dip)
    #End If
    Options1.Initialize
    xui.SetDataFolder ("LARA_data")
    prefdialog.LoadFromJson(File.ReadString(File.DirAssets, "SettingsForm.json"))
    LoadSavedData

The error
Application_Start
Error loading bitmap: Error opening stream (/private/var/mobile/Containers/Data/Application/286A6C9B-C919-4DB0-A601-0AD57F03FFC6/tmp/virtual_assets/addcar.png): Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={_kCFStreamErrorCodeKey=2, _kCFStreamErrorDomainKey=1}
Class (b4i_bcpath) instance released.
Error occurred on line: 36 (PreferencesDialog)
Error opening stream (/private/var/mobile/Containers/Data/Application/286A6C9B-C919-4DB0-A601-0AD57F03FFC6/tmp/virtual_assets/listtemplate.bil): Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={_kCFStreamErrorCodeKey=2, _kCFStreamErrorDomainKey=1}
Stack Trace: (
CoreFoundation <redacted> + 252
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation <redacted> + 0
B4i Example -[B4IFile OpenInput::] + 440
B4i Example -[B4ILayoutBuilder loadLayout:::] + 604
B4i Example -[B4IPanelWrapper LoadLayout::] + 204
B4i Example -[B4XViewWrapper LoadLayout::] + 100
B4i Example -[b4i_preferencesdialog _initialize::::::] + 1564
CoreFoundation <redacted> + 144
CoreFoundation <redacted> + 292
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
B4i Example -[B4IShell runMethod:] + 448
B4i Example -[B4IShell raiseEventImpl:method:args::] + 2172
B4i Example -[B4IShellBI raiseEvent:event:params:] + 1580
B4i Example +[B4IDebug delegate:::] + 80
B4i Example -[b4i_b4xmainpage _b4xpage_created::] + 360
CoreFoundation <redacted> + 144
CoreFoundation <redacted> + 292
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
B4i Example -[B4ICommon CallSubDebug4::::] + 1080
B4i Example -[B4ICommon CallSubDebug2::::] + 372
B4i Example -[b4i_b4xpagesmanager _createpageifneeded::] + 1152
B4i Example -[b4i_b4xpagesmanager _showpage::] + 828
B4i Example -[b4i_b4xpagesmanager _addpage:::] + 1428
B4i Example -[b4i_b4xpagesmanager _addpageandcreate:::] + 640
B4i Example -[b4i_b4xpagesmanager _initialize:::] + 1892
CoreFoundation <redacted> + 144
CoreFoundation <redacted> + 292
B4i Example +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
B4i Example -[B4IShell runMethod:] + 448
B4i Example -[B4IShell raiseEventImpl:method:args::] + 2172
B4i Example -[B4IShellBI raiseEvent:event:params:] + 1580
B4i Example __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
libdispatch.dylib <redacted> + 24
libdispatch.dylib <redacted> + 16
libdispatch.dylib <redacted> + 1068
CoreFoundation <redacted> + 12
CoreFoundation <redacted> + 1924
CoreFoundation CFRunLoopRunSpecific + 436
GraphicsServices GSEventRunModal + 104
UIKitCore UIApplicationMain + 212
B4i Example main + 128
libdyld.dylib <redacted> + 4
)
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
 
Top