[TIMOB-996] Android: Text Field/Area needs hasText method
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-05-21T16:50:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2012-07, Release 2.0.1 |
Components | Android |
Labels | core, qe-testadded, training |
Reporter | Don Thorp |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:41:08.000+0000 |
Updated | 2013-11-07T05:31:27.000+0000 |
To test the fix for this, create a simple project that has the following code in app.js:
After building and running the project, the log should read:
Closing as Fixed. SDK: 2.1.0.v20120328100312 Android: V8, Rhino Studio: 2.0.0.201203271933 OS: Snow Leopard Devices Tested: Emulator 2.3.3
Reopening/closing to add/remove labels
The test case provided in the comments above causes an exception on iOS and Android
Test case
The test case is actually invalid. The event object for click doesn't have a hasText() method. Instead, you should be using e.source.hasText(). I tested this on the lastest master build and it works correctly.
hasText method working on TextField/TextArea.Verified on: Titanium Studio: 2.1.1.201207121732 Titanium SDK: 2.1.1.v20120712160111 Android: V8 Device: Emulator2.2
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4863