A "find" command for variables??

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10534
Joined: Wed May 06, 2009 2:28 pm

A "find" command for variables??

Post by dunbarx »

I recall that somewhere there is a command that covers finding a string in a container, such as a variable. Something like “revFind…” This would expand the command from being limited to fields.

Does anyone recall such a thing? I am sure it was discussed on this forum, though a decade or more ago.

Craig
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10112
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: A "find" command for variables??

Post by FourthWorld »

Describe what you need, and one of us can write a function for that in a few minutes. If you want to write it yourself see either lineOffset or offset, noting the placeholder variable (linesToSkip or charsToSkip) from the description.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10534
Joined: Wed May 06, 2009 2:28 pm

Re: A "find" command for variables??

Post by dunbarx »

Richard.

Thanks, but I can do that as well.

But your post implies that there is no such variable-based command in LC. Perhaps I was dreaming when I thought there was, that it was discussed here, that it was either poorly documented or not at all, and that it took the form "RevFind...".

I really expected someone to say, "sure there is, and it is ..."

Craig
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10112
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: A "find" command for variables??

Post by FourthWorld »

dunbarx wrote: Mon Oct 12, 2026 2:42 am But your post implies that there is no such variable-based command in LC.
True. The "find" command is a user-interface feature, finding and hiliting instances of a search term. To return a list of of such occurrences would require a function, one made very efficient in LC with the placeholder param.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Post Reply