A Albi Active Member Licensed User Longtime User Jun 1, 2015 #1 Hello, If I try to initialise an action sheet without any otheritems, it doesn't work. If I use an empty string in the list, it returns an option in the action sheet, but without text. (I want just a destructiveitem and a cancelitem) Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", Array As String("")) This returns a cancel item, destructive item, and an empty box for other options. Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", "") This returns an error (types do not match, and it doesn't compile. Expected: NSArray, object type: __NSCFConstantString Maybe this should be in the wishlist?
Hello, If I try to initialise an action sheet without any otheritems, it doesn't work. If I use an empty string in the list, it returns an option in the action sheet, but without text. (I want just a destructiveitem and a cancelitem) Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", Array As String("")) This returns a cancel item, destructive item, and an empty box for other options. Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", "") This returns an error (types do not match, and it doesn't compile. Expected: NSArray, object type: __NSCFConstantString Maybe this should be in the wishlist?
Erel B4X founder Staff member Licensed User Longtime User Jun 1, 2015 #2 The last parameter is an array. You cannot pass an empty string as an array parameter. Pass Null instead: Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", Null) You can also pass an empty array: Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", Array()) Upvote 0
The last parameter is an array. You cannot pass an empty string as an array parameter. Pass Null instead: Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", Null) You can also pass an empty array: Code: Copy actDelete.Initialize("actDelete", "", "Cancel", "Delete", Array())
A Albi Active Member Licensed User Longtime User Jun 1, 2015 #3 thanks! (I can't believe i didn't think to try those things) Upvote 0