[1.0.1] Java: Settings.BundlePath not work --- use the ImageLocator methods

Bug #1360046 reported by Xian Wei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

Hi,
When i was used new Sikuli 1.0.1 Sikuli-Java.jar i find the Settings.BundlePath not work well, i write follow code to test:

 System.out.print(ImageLocator.getBundlePath()+"\n");

 Settings.BundlePath="E:/qa/automation/picpool/JAM/mainline/";

        System.out.print(ImageLocator.getBundlePath()+"\n");

Then find the output is :
E:\qa\automation\mainline\jam
E:\qa\automation\mainline\jam
I am not sure it is a bug or i am wrong, but i sure it is work on last version.
But i find another way to work around:
                System.out.print(ImageLocator.getBundlePath()+"\n");

   ImageLocator.setBundlePath("E:/qa/automation/picpool/JAM/mainline/");

   System.out.print(ImageLocator.getBundlePath()+"\n");
The output is :
E:\qa\automation\mainline\jam
E:/qa/automation/picpool/JAM/mainline/

Below is my environment information:
OS: windows 7 x64
Java: 1.7.0_06

I wait for your reply, thanks.

--BR
Xian

RaiMan (raimund-hocke)
summary: - Settings.BundlePath not work
+ [1.0.1] Java: Settings.BundlePath not work --- use the ImageLocator
+ methods
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
RaiMan (raimund-hocke) wrote :

this not rely a bug, but caused by weak documentation.

On the Java level with version 1.0.1 one should only use the ImageLocator methods to handle the image path.
... and the term BundlePath together with any setters and getters is there for historical reasons and internal usage in the IDE.

with respect to the image path this is simply the first entry in the list and the only entry, that can be handled directly.
For all other entries we have addImagePath (adds to the end) and removeImagePath (remove specified path).

On the Java level setBundlePath() can be seen as a convenience, if you only have the need to feel with one image folder at one time.

with version 1.1.0 all image path handling is moved to class ImagePath haven more features and the respective ImageLocator methods are deprecated and redirected.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.