iOS Question B4i V6.80 , error when using Preferencedialog

janderkan

Well-Known Member
Licensed User
Longtime User
Working fine in B4i v6.50 but after upgrade to V6.80 I get this error :

B4X:
Error occurred on line: 70 (PreferencesDialog)
Object was not initialized (UIView)

The PreferenceDialog is showing OK but the error shows when I open the OptionsItem

This is my code:
B4X:
            prefDialog.Initialize(Page.RootPanel, "txt_contr", Page.RootPanel.Width-20, Page.RootPanel.Height-100)
            prefDialog.LoadFromJson(File.ReadString(File.DirAssets, "test.json"))
            prefMap.Initialize
            prefMap.Put("name","Hello")
            prefMap.Put("j2type","pref_type_none")

            Wait For (prefDialog.ShowDialog(prefMap, "mnu_save", "mnu_cancel")) Complete (Result As Int)
            If Result = xui.DialogResponse_Positive Then
                
            End If
and this is the Json.
JSON:
{
    "Version": 1.66,
    "Theme": "Light Theme",
    "Items": [
        {
            "title": "pref_name",
            "type": "Text",
            "key": "name",
            "required": false
        },
        {
            "options": [
                "pref_type_none",
                "pref_type_service"
            ],
            "title": "pref_j2type",
            "type": "Options",
            "key": "j2type",
            "required": false
        }
    ]
}
 

janderkan

Well-Known Member
Licensed User
Longtime User
Attached is a simple test project.

All works fine until I add this :

B4X:
private Sub Page1_KeyboardStateChanged (Height As Float)
    prefDialog.KeyboardHeightChanged(Height)
End Sub
 

Attachments

  • test.zip
    169.1 KB · Views: 262
Upvote 0
Top