[TIMOB-2475] Android: Platform - displayCaps.platformHeight is undefined
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-23T13:21:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | module_platform, qe-testadded |
Reporter | Ian Hawes |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:20:46.000+0000 |
Updated | 2012-01-23T13:21:30.000+0000 |
Description
var scrollHeight = Titanium.Platform.displayCaps.platformHeight - 110;
Crashes and gives an "undefined" error.
Update: FIXED
Mind telling us how you fixed this? I'm having the same problem...
Oh, I think I've sorted it. I just needed to do a full rebuild by touching the tiapp.xml file.
I, too, get the same Run-time error which said:
"Cannot read property from displayCaps from undefined"
Forcing a full rebuild by editing tiapp.xml file solved the problem as mentioned by StinkyPickle, but this issue needs to be solved perhaps?
Assigning to Don for triage.
This is occurring quite frequently for me, I'm not sure I understand the workaround.
Note the case, ie
displayCaps
rather thanDisplayCaps
Correction - on Android 1.8.0.1 both work - on iOS, case matters.
As per the user's update in the description, this was fixed. For anyone experiencing this, please verify that you are using
displayCaps
rather thanDisplayCaps
.Tested with 1.9.0.v20120117114633 on Droid 3 2.3.4
Updating tags