Strict name matching in core.selectObjectByName

Asked by Martin Unwin on 2017-01-21

The script file "zodiac.ssc" distributed with Stellarium includes the code:

var constellations = new Array("Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpius", "Ophiuchus", "Sagittarius", "Capricornus", "Aquarius", "Pisces", "Aries", "Taurus");

followed later by:

for(i = 0; i < constellations.length; i++)
{
 core.selectObjectByName(constellations[i], false);
 core.wait(0.6);
}

Running this script on my system displays 12 of the 13 constellations correctly, but Taurus is not shown while Centaurus is. This suggests that the text matching algorithm in selectObjectByName (presumably some variant of grep) is based on a partial, case-insensitive match and thus matches to Centaurus rather than Taurus.

Can you confirm whether this is the case, and - if so - suggest a fix?

Thanks
Martin Unwin

Question information

Language:
English Edit question
Status:
Answered
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Last query:
2017-01-21
Last reply:
2017-01-22
Martin Unwin (unwinm) said : #2

Yes, I can see from the transcript for bug 1655055 that searching for "Taurus" using the Search dialog runs into a similar problem. georg-zotti on 2017-01-09 (#4) offers what looks like a helpful suggestion:

        Search options: "Use autofill only from the beginnings of words". Else looking for "TAURUS" also finds "cen-TAURUS" :-)

However, this selecting this option has no effect on my system (Stellarium 0.15.1), so I'm still stuck with my original problem.

Alexander Wolf (alexwolf) said : #3

No, no, no - it was bug in the code, who has been fixed in revision 9111. Change option in Search Tool shouldn't help here.

I can propose updating your stable version of Stellarium to the development edition for usage solution of bug (important note: development edition should have version over or equal to 0.90.0.9111)

Alexander Wolf (alexwolf) said : #4

Please check this issue on version 0.90.0.9115: https://launchpad.net/stellarium/trunk/0.90.0

Can you help with this problem?

Provide an answer of your own, or ask Martin Unwin for more information if necessary.

To post a message you must log in.