Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2552] Alloy platform specific XML causing JavaScript error at runtime

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-07-29T18:21:49.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Titanium SDK & CLI
Labelsalloy, ios, mobile, xml
ReporterJulian Fraser
AssigneeMauro Parra-Miranda
Created2013-07-29T15:23:49.000+0000
Updated2016-03-08T07:41:37.000+0000

Description

The following Alloy view XML is causing a JavaScript error (see attached) at runtime when platform specific code is used in iOS. In this case, the XML handles MapViews for platform specific map namespaces. WORKING
<View ns="Ti.Map" platform="ios" id="map" onRegionchanged="mapZoomed" onClick="mapClicked">
	<!-- map annotations added programatically -->
</View>
BREAKING
<View ns="Ti.Map" platform="ios" id="map" onRegionchanged="mapZoomed" onClick="mapClicked">
	<!-- map annotations added programatically -->
</View>
<View ns="Alloy.Globals.Map" platform="android" id="map" onRegionchanged="mapZoomed" onClick="mapClicked">
	<!-- map annotations added programatically -->
</View>

Attachments

FileDateSize
Screen Shot 2013-07-29 at 4.01.19 PM.png2013-07-29T15:23:49.000+0000154719

Comments

  1. Julian Fraser 2013-07-29

    This is only occurring when adding event listeners via the XML. XML without onEvent parameter runs without issue.
  2. Daniel Sefton 2013-07-29

    Hi Julian, Please can you provide a complete test case for this? Either an attached project, or the full code in the description. Thanks!

JSON Source