iOS Question Have they signed?

David Elkington

Active Member
Licensed User
Longtime User
Hi All,

I'm using the B4XDialog and B4XDialoSignatureTemplate and it works well. I was wondering if there was a way of checking if they actually made a mark and not just hit the green tick. Also, is there a way of swapping the tick and the cross around? For me, the right hand icon would be better as the tick.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can change the buttons order with:
B4X:
Dialog.ButtonsOrder = Array As Int(XUI.DialogResponse_Cancel, XUI.DialogResponse_Positive, XUI.DialogResponse_Negative)
Or any other order you like.

if there was a way of checking if they actually made a mark
Upgrade to XUI Views v2.47 and change check Signature.NumberOfPoints
 
Last edited:
Upvote 0

David Elkington

Active Member
Licensed User
Longtime User
Except now, when I try and set the colours it gives an error

B4X:
Dialog.Title=lbl.text & " - Please Sign Below"   
Dialog.ButtonsOrder = Array As Int(xui.DialogResponse_Cancel, xui.DialogResponse_Negative,xui.DialogResponse_Positive)
Dialog.GetButton(xui.DialogResponse_Cancel).TextColor = xui.Color_Red
Dialog.GetButton(xui.DialogResponse_Positive).TextColor = xui.Color_Green
Dialog.ButtonsFont = xui.CreateFontAwesome(20)

Wait For (Dialog.ShowTemplate(SignatureTemplate, Chr(0xF00C), Chr(0xF00D),"")) Complete (Result As Int)



Error:

Application_Active
Error occurred on line: 213 (B4XDialog)
Object was not initialized (UIView)
Stack Trace: (
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 1217992
libobjc.A.dylib objc_exception_throw + 60
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 124480
GTMS -[B4IObjectWrapper object] + 144
GTMS -[B4XViewWrapper asPanelWrapper] + 68
GTMS -[B4XViewWrapper GetAllViewsRecursive] + 24
GTMS -[b4i_b4xdialog _getbutton::] + 596
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 1239156
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 7076
GTMS +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1528
GTMS -[B4IShell runMethod:] + 448
GTMS -[B4IShell raiseEventImpl:method:args::] + 1648
GTMS -[B4IShellBI raiseEvent:event:params:] + 1580
GTMS -[B4ICommon CallSub4::::] + 312
GTMS -[B4ICommon CallSub3:::::] + 444
GTMS -[ResumableSub_customlistview_PanelClickHandler resume::] + 1944
GTMS -[b4i_customlistview _panelclickhandler:] + 184
GTMS -[b4i_customlistview _panel_click] + 224
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 1239156
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 7076
GTMS +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1528
GTMS -[B4I raiseEvent:event:params:] + 520
GTMS __33-[B4I raiseUIEvent:event:params:]_block_invoke + 56
libdispatch.dylib FFC93E7E-8360-32A0-9EB5-FE3761B8C90A + 10836
libdispatch.dylib FFC93E7E-8360-32A0-9EB5-FE3761B8C90A + 18412
libdispatch.dylib _dispatch_main_queue_callback_4CF + 884
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 668152
CoreFoundation 58500388-BF36-397C-84CF-17315A3445B6 + 643280
CoreFoundation CFRunLoopRunSpecific + 600
GraphicsServices GSEventRunModal + 164
UIKitCore 186C18FD-1082-3811-A761-88E8376C7E69 + 12363748
UIKitCore UIApplicationMain + 168
GTMS main + 128
libdyld.dylib B08AB7C2-64E8-3937-9487-C33D0175FD34 + 7416
)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You should only call GetButton after you showed the dialog. The buttons are not available before.
B4X:
Dim rs As Object = Dialog.ShowTemplate(SignatureTemplate, Chr(0xF00C), Chr(0xF00D),"")
Dialog.GetButton(xui.DialogResponse_Cancel).TextColor = xui.Color_Red
Dialog.GetButton(xui.DialogResponse_Positive).TextColor = xui.Color_Green
Wait For (rs) Complete (Result As Int)
 
Upvote 0
Top