search
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: search
Hi Rob,
I think what you are asking for is "substacks" and "palette". While this lesson isn't focused on your question it talks about adding substacks;
http://lessons.runrev.com/m/4071/l/7869 ... resides-in
At any rate substacks can be made like the images you show, I'm thinking you have them already you just need to attach them to a "mainStack", which they will act upon. Take a look at those (words in quotes) in the dictionary.
Simon
I think what you are asking for is "substacks" and "palette". While this lesson isn't focused on your question it talks about adding substacks;
http://lessons.runrev.com/m/4071/l/7869 ... resides-in
At any rate substacks can be made like the images you show, I'm thinking you have them already you just need to attach them to a "mainStack", which they will act upon. Take a look at those (words in quotes) in the dictionary.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: search
Here more pics,
Simon
So you just take the stacks you already have and change their Main Stack to the cards you want to search.Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: search
I made myself not clear enough.
It is not that I want to import existing pictures.
I want to make a routine that asks for some letters in the name (my picture 1). then does a search (find?) and comes back with an answer (my picture 2).
Clicking on one of the founded cardnames will enter that card.
My problem: how to work with find.
It is not that I want to import existing pictures.
I want to make a routine that asks for some letters in the name (my picture 1). then does a search (find?) and comes back with an answer (my picture 2).
Clicking on one of the founded cardnames will enter that card.
My problem: how to work with find.
Re: search
Hi Rob,
With a field/variable that has all the names of your cards in it one per line:
In your top image on OK, it would filter all the lines of myVar (the list of your cards) with "br".
caseSensitive would be set to true for your first option
remove the wildcards "*" to get whole words only.
Simon
With a field/variable that has all the names of your cards in it one per line:
Code: Select all
filter myVar with "*" & fld "seachField" & "*"
caseSensitive would be set to true for your first option
remove the wildcards "*" to get whole words only.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: search
For the moment I have to stop. By accident I deinstalled Livecode 6.5 and nothing works anymore.
Anyway thanks. I keep your advise on a safe place.
Anyway thanks. I keep your advise on a safe place.
Re: search
Everything is OK again, so I continue to learn about search.
I understand this script but don't know what to do with it : filter myVar with "*" & fld "searchField" & "*"
I understand this script but don't know what to do with it : filter myVar with "*" & fld "searchField" & "*"

Re: search
Hi Rob,
Check out "filter" in the dictionary.
The simple form would be filter myVar with "*br*"
for
filter myVar with "*" & fld "searchField" & "*"
myVar would be a list of the names of your cards 1 per line
fld "seachField" is that field you show in the first image (I don't know it's real name)
"*" & fld "searchField" & "*" translates to "*br*" (using your example in the image)
Make any more sense?
Simon
Check out "filter" in the dictionary.
The simple form would be filter myVar with "*br*"
for
filter myVar with "*" & fld "searchField" & "*"
myVar would be a list of the names of your cards 1 per line
fld "seachField" is that field you show in the first image (I don't know it's real name)
"*" & fld "searchField" & "*" translates to "*br*" (using your example in the image)
Make any more sense?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: search
Hi Simon,The simple form would be filter myVar with "*br*"
Got it complitely. The quoted line is sufficient.
My script:
put fld "foo" into tVar
ask "what card"
filter tVar with it
go cd tVar
Great and many thanks

Rob
Re: search
No, not complitely.Got it complitely. The quoted line is sufficient.
I don't know what to to with filter myVar with "*" & fld "searchField" & "*".
Suppose my field "foo" contents
George
John
Johnson
Pete
I ask for "ohn". How do I get an answer showing me John and Johnson ??
Re: search
Hi Rob,
See the wildcards? ("*")
filter tVar with "*" & it & "*"
Simon
See the wildcards? ("*")
filter tVar with "*" & it & "*"
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: search
Hi Simon,See the wildcards? ("*")
filter tVar with "*" & it & "*"
Although I have a fine working script:
on mouseUp
put fld "inhoud" into tVar
ask "what card"
filter tVar with "*" & it & "*"
if number of lines of tVar=1 then
go cd tVar
else
put the number of lines of tVar into tNum
repeat with i = 1 to tNum
put lineoffset(line i of tVar,fld "inhoud") &"." before line i of tVar
end repeat
ask tVar
go cd ( line it of fld "inhoud")
end if
end mouseUp
I use your wildcards-line but I don't know what it means: filter tVar with "*" & it & "*"
What's the function of the asterix and what does "it" do?
BTW: I know how you can declare a local variable, but how and where to declare a systemic variable?
Thanks
Rob
Re: search
Hi Rob,
I think it best you test using the wildcards on these.
Rob
Robert
Bertrand
Egbert
Telrob (OK I made that one up)
What happens if you use
it & "*"
"*" & it
it
"*" & it & "*"
Start with "b" then "be" using the 4 combinations above
Then try "r" then "ro" again with the 4 combos
OK here: Simon
Edit: Not sure what your second question means.
I think it best you test using the wildcards on these.
Rob
Robert
Bertrand
Egbert
Telrob (OK I made that one up)

What happens if you use
it & "*"
"*" & it
it
"*" & it & "*"
Start with "b" then "be" using the 4 combinations above
Then try "r" then "ro" again with the 4 combos
OK here: Simon
Edit: Not sure what your second question means.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: search
Thanks Simon, I start understanding.
it & "*"
"*" & it
it
"*" & it & "*"
The combi asterix and it determines the place of the char(s) first or last or every char.
Right ?
Thanks for your splendid lesson.
Rob
it & "*"
"*" & it
it
"*" & it & "*"
The combi asterix and it determines the place of the char(s) first or last or every char.
Right ?
I want a variable that you may use everywhere. A local variable just works on the script where that variable is declared. A systemic variable workst in the whole stack.Not sure what your second question means.
Thanks for your splendid lesson.
Rob
Re: search
Hi ROb,
OK the second question...
"global variables"
Then in a button
The key to remember is that you have to declare the global everywhere you use it as in the button example.
Now back to the filter...
Actually you would use "?" if you are just talking about characters.
The asterisk symbol "*" is for any number of characters before or after or "in" the filter (I don't know the correct term for the search term (maybe that's it!)).
We didn't do "in"
"rob" & "*" & "t"
also good
Simon
OK the second question...
"global variables"
Code: Select all
global gVar
on openCard
put 12 into gVar
end openCard
Code: Select all
global gVar
on mouseUp
answer gVar
end mouseUp
Now back to the filter...
Actually you would use "?" if you are just talking about characters.
The asterisk symbol "*" is for any number of characters before or after or "in" the filter (I don't know the correct term for the search term (maybe that's it!)).
We didn't do "in"
"rob" & "*" & "t"
also good
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!