On Feb 2, 2012, at 9:30 AM, [email protected] wrote:
> Francis.
>
>
> You are right in that the (my) find hint seems not to work. I think it used
> to, but now am confused. I will ask to have it removed.
>
>
> This is a workaround, so that if your text is not on the card you are at, at
> least you will not be taken somewhere else. I am sure you could have written
> this yourself:
>
>
>
> on mouseUp
> lock screen
> put the number of this cd into tCard
> find yourText
> if the number of this cd <> tCard then
> put "not found here"
> go cd tCard
> end if
> end mouseUp
>
>
> It seems that what we really need is either:
>
>
> find yourText on cd yourCard --like I thought we had, or
> find yourText on marked cds --something like that
>
>
> Craig Newman
Craig's handler will work if you are already on the card you want to find in.
More generally, do something like this:
on doMyFind tStr, tFldName, tCardID
put the short id of this card into startCdID
lock screen
go cd id tCardID
find string tStr in fld tFldName
if the result = "not found" or the short id of this card <> tCardID then
go card id startCdID
beep
exit doMyFind
end if
end doMyFind
-- Peter
Peter M. Brigham
[email protected]
http://home.comcast.net/~pmbrig
> -----Original Message-----
> From: Francis Nugent Dixon <[email protected]>
> To: use-livecode <[email protected]>
> Sent: Thu, Feb 2, 2012 8:53 am
> Subject: Find string "xxx" in field yyy OF THIS CARD
>
>
> Hi from Beautiful Brittany,
>
> I have been having problems with the "find" command.
> In a stack with multiple cards, I want to find specific
> strings on a card of my choice (the card currently displayed),
> and NO other.
>
> If I code "find string xxx in fld yyy of this card" ..
>
> doesn't work.
>
> If I look in the dictionary for the "find" command, I find no
> information concerning a search on a specific card.
> However, a user comment (from Craig) shows that we can use :
>
> find yourtext in field yourfield of card cardOfInterest
>
> by which I understand that you can define a specific
> card by its number. This does not work either.
>
> Has anybody had problems like this, or have I reached
> my first LiveCode "bug" ?
>
> Is there any way of restricting a "find string" to a
> specific card. I'm on LiveCode Build 1080 Version 4.5.0
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode