[AC-6424] Setting TextField - hintTextColor in app.tss crashes app
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | IOS,, TextField, hintText |
| Reporter | Thomas Neerup |
| Assignee | Shak Hossain |
| Created | 2019-10-30T08:04:02.000+0000 |
| Updated | 2019-11-06T16:10:00.000+0000 |
Description
Because of the new dark mode in xCode 11 i wanted to set the hintTextColor for all my TextField's
but setting:
"TextField[platform=ios]": {
hintTextColor: 'gray'
}
in app.tss
Crashes the app in IOS when some of the TextField's do not have hintText.
[ERROR] : Script Error {
[ERROR] : column = 37;
[ERROR] : line = 302;
[ERROR] : message = "NSConcreteAttributedString initWithString:: nil value";
[ERROR] : nativeStack = "3 Foundation 0x00007fff2574efcd -[NSConcreteAttributedString initWithString:attributes:] + 27\n4 Crosspaddev0x0000000102c666ca -[TiUITextField setHintTextColor_:] + 330\n5 TitaniumKit0x00000001038d729a DoProxyDelegateReadValuesWithKeysFromProxy + 607\n6 TitaniumKit0x00000001038ba593 -[TiViewProxy firePropertyChanges] + 92\n7 TitaniumKit0x00000001038b8bef -[TiViewProxy view] + 249\n8 Crosspaddev0x0000000102c46302 -[TiUITextWidgetProxy setKeyboardToolbar:] + 3874\n9 Foundation 0x00007fff2563e130 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 325\n10 TitaniumKit0x00000001038d9e89 -[TiProxy setValuesForKeysWithDictionary:] + 1886\n11 CoreFoundation 0x00007fff23bb138c __invoking___ + 140\n12 CoreFoundation 0x00007fff23bae49f -[NSInvocation invoke] + 319\n13 TitaniumKit0x00000001038d62c3 -[KrollMethod call:] + 1385\n14 TitaniumKit0x00000001038d54f7 __KrollCallAsFunction_block_invoke + 30\n15 TitaniumKit0x00000001038d5311 KrollCallAsFunction + 425\n16 JavaScriptCore 0x00007fff269a38ec _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE4callEPNS_9ExecStateE + 524\n17 JavaScriptCore 0x00007fff26e77ffd _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 365\n18 JavaScriptCore 0x00007fff2696aa05 llint_entry + 93212\n19 ??? 0x00005a0c8f469cf3 0x0 + 99009989876979\n20 JavaScriptCore 0x00007fff2696aa13 llint_entry + 93226\n21 JavaScriptCore 0x00007fff2696aa13 llint_entry + 93226\n22 JavaScriptCore 0x00007fff2696aa13 llint_entry + 93226";
[ERROR] :
Hi! I tried to reproduce but got error in general when setting it to
grey. However, it worked fine when setting it to#666. Can you confirm this?No ... The problem is not the color but the fact that I'm setting the hintTextColor on all TextField's and some off them do not have a hintText
Hello [~thomas.neerup@eg.dk], So, the hintTextColor was workin for you when setting as hexadecimal color code? If so, I believe there is no issue here. Thanks.
[~thomas.neerup@eg.dk] What I meant with that, I got the same issue as you, but when setting it globally using a
hexcolor it didn't cause any issues on my side. Can you try setting ahexcolor like#666instead ofgrayRene Pot Below code stille causes my app to crash with "NSConcreteAttributedString initWithString:: nil value";
"TextField[platform=ios]" : { color: '#000000', hintTextColor: '#808080' }Hi [~thomas.neerup@eg.dk], I have this below and I don't have a crash. I use 8.2.1.GA SDK and iOS 13.1 simulator.
".tf": { backgroundColor: "#bbb", height: 50, width: 300, top: 10 } ".hint": { hintText: "Fill me in" } "TextField": { hintTextColor: "#080808" }I'm sorry. It looks like it was a combination of hintTextColor: '#80808' and a hintText = null (set in code, a simple null check fixed it) Guess this bug could be closed.. But I still think it is a bug that hintTextColor: 'gray' crashes the app :)