Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5717] MobileWeb: remove __VARIABLE__ like syntax from project

GitHub Issuen/a
TypeStory
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2011-06-07T05:57:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterIngo Muschenetz
AssigneeIngo Muschenetz
Created2011-05-26T05:54:45.000+0000
Updated2017-03-10T18:55:23.000+0000

Description

They are done by compiler.py using simple substitution - it doesn't care about context, quotes, escaping and so on. Instead start using variables passed into titanium.js
		file_contents = file_contents.replace('__PROJECT_NAME__',self.project_name)
		file_contents = file_contents.replace('__PROJECT_ID__',self.appid)
		file_contents = file_contents.replace('__DEPLOYTYPE__',deploytype)
		file_contents = file_contents.replace('__APP_ID__',self.appid)
		file_contents = file_contents.replace('__APP_ANALYTICS__',ti.properties['analytics'])
		file_contents = file_contents.replace('__APP_PUBLISHER__',ti.properties['publisher'])
		file_contents = file_contents.replace('__APP_URL__',ti.properties['url'])
		file_contents = file_contents.replace('__APP_NAME__',ti.properties['name'])
		file_contents = file_contents.replace('__APP_VERSION__',ti.properties['version'])
		file_contents = file_contents.replace('__APP_DESCRIPTION__',ti.properties['description'])
		file_contents = file_contents.replace('__APP_COPYRIGHT__',ti.properties['copyright'])
		file_contents = file_contents.replace('__APP_GUID__',ti.properties['guid'])

Comments

  1. Andrew Kulinich 2011-06-07

    They are useful for substituting into HTML pages, for example
  2. Lee Morris 2017-03-10

    Closing ticket as the issue will not fix.

JSON Source