Jump to content

Valid search syntax fails with errors


Λύχνις Δαν

Recommended Posts

Hi ya,

 

I was working on a simple search for my flashcard tool on windows. I entered a very simple search which is valid on Mac. The search string is this :

 

[count 1-50] < AND> [range john]

 

When run with the search mode set to Words I get this error :


post-32023-0-33392900-1380855021_thumb.jpg

 

When run in Verse mode I get :

 

post-32023-0-44850000-1380855096_thumb.jpg

 

Running in either mode on the Mac works just fine as auto context flips verses to words and words is happy with it.

 

Running this instead works fine in either mode :

 

[range john] <AND> [count 1-50]

 

So it really seems to be related to the order of the predicates.

 

Thx

D

Edited by Daniel Semler
Link to comment
Share on other sites

**This isn't a response to the question/report, but there is a typo in the warning. It should read, "…it represents a word…" not "…it represents an word…"***

Link to comment
Share on other sites

Nice one - I would usually notice such a thing but not this time. Thx James.

Link to comment
Share on other sites

Daniel, I'm having trouble reproducing this. The search [COUNT 1-50] [RANGE john] works just fine on my Windows. Are you typing the search in by hand, or using the command keys (Shift-Control-U, Shift-Control-A, Shift-Control-R)? Also, I noticed in your first example you had a space between the '

Link to comment
Share on other sites

In the first case it has a space and yes that seems to be the problem. I am not sure how it got there exactly.

It was not typed in - it was programmatically inserted by a GUI macro programming language. I then used the same string manually - probably by c & p.

You are correct though that removing the space sorts it out. I've gone back to my script and its inserting the right thing now so I have now idea how it happened at this point.

Thanx for clearing that one up.

 

Actually I think I know how it happened and I must have corrected it to the range first form and at the same time removed a typo.

Sorry - false alarm on that front.

 

The error however doesn't highlight the space issue, but rather the 1-50] is highlighted and the message doesn't mention the < and> at all. So perhaps there is a case to improve the error reporting. I re-read the error message text and I'm not exactly sure how I should understand it in this context with the 1-50] being highlighted : "The command "%@" must be surrounded by the characters "[]", since it represents an word or is used to modify a word" I just tried this on Mac and its consistent there. I then tried swapping the range and count clauses to opposite sides of the "< AND>". In that case the first < is highlighted and the message changes to "The command "[TAG]" must be surround by the characters "[]", since it represents an word or is used to modify a word". Here the highlight is better.

 

Thx

D

Edited by Daniel Semler
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...