Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-503] Titanium.include path not relative to file calling it 0.9.2

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2011-04-15T02:30:29.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
Reporterjhicks (at cteh)
AssigneeReggie Seagraves
Created2011-04-15T02:30:28.000+0000
Updated2017-03-09T21:20:27.000+0000

Description

When you use Titanium.include from script that was itself included, the path is computed as if you called Titanium.include from the originating script.

Assuming these files:

Folder1
-> OriginalScript.js

Folder2
-> Include1.js
-> Include2.js

If from OriginalScript.js you call Titanium.include("../Folder2/Include1.js") and then from Include1.js you call Titanium("Include2.js"), it will fail to find Include1.js because it is looking in Folder1.

Comments

  1. Jae Hess 2011-04-15

    +1 for this

  2. hal 2011-04-15

    Is this related to ticket #802 ?
    https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/802"> https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...

    createImageView suffers from the same problem, where the calling script specifies the image location in a parent/grandparent directory (or subdirectory thereof) the ../ parts (signifying "go up one directory) of the relative location is ignored.

  3. Stephen Tramer 2011-04-15

    Duplicate of #802.

  4. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source