Find oddity?

dunbarx at aol.com dunbarx at aol.com
Thu Jan 19 12:34:51 EST 2012


Kay.


Interesting, but I did not mean to cloud the issue. I was just fooling around,


So you do see that, with a single instance of text in a field, successive find commands will alternately box and then unbox the foundtext?


To me, this is a bug.


Craig



-----Original Message-----
From: Kay C Lan <lan.kc.macmail at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Wed, Jan 18, 2012 5:06 pm
Subject: Re: Find oddity?


Hi Craig,

Basically confirmed in 5.0.2 but after a little further investigation I've
discovered this is a feature, not a bug.

I added 2 fields to a new stack, one for the text, the other to display
which loop of the repeat I was in - handler below:

on mouseUp
   put empty into fld "Field2" --loop readout field
   repeat with x = 1 to 5
      find "oddity"
      put x & "," after fld "Field2"
      wait 60
   end repeat
end mouseUp

For only 1 instance of the word to be found, it was as you say, the
displayed blinked, but for multiple instances it sort of worked, and then
didn't, I thought it was random until I discovered that when ever the Find
got to the end of the text it sort of missed a beat before it started again.

So to clarify, in 5.0.2 on my machine, on a single card, with multiple
fields, the Find command sequentially finds all instances of the text, and
boxes all of them, but once at the last instance if the Find command is
issued again, the Box is removed and no find occurs, if you then issue the
Find command again it starts at the beginning. Looking at the Dictionary
this is sort of explained. I believe this is similar to other software I
use which typically comes up with a dialog to say you've reached the end of
the document do you want to start again. With the Find command you could
test for "not found", the result of the find command is empty if it finds
the text, otherwise it returns "not found", at which point you present a
dialogue asking if you want to start at the beginning.

HTH

On Thu, Jan 19, 2012 at 10:16 AM, <dunbarx at aol.com> wrote:

> Peter.
>
>
> I am the user.
>
>
> It isn't hidden fields with strange properties that I cannot see, it is
> naked ones I can. I made a new stack, placed one field and one button. Put
> some text into the field.
>
>
> Are you seeing continued find boxes? I am using LC 4.5.3.
>
>
> Just playing around:
>
>
> on mouseup
> repeat 5
>  find myText
>  wait 30
> end repeat
> end mouseup
>
>
> "Find" box winks in and out.
>
>
> Craig Newman
>
>
>
> -----Original Message-----
> From: Peter M. Brigham, MD <pmbrig at gmail.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Wed, Jan 18, 2012 1:19 pm
> Subject: Re: Find oddity?
>
>
> The old HC behavior is what I see on LC. However, if the text string is in
> a
> hidden field for which the dontsearch property = false, you will not see
> the
> find box in that field, then if you find again and the next find is in a
> searchable visible field, the box will appear again. You may have to set
> the
> dontsearch property of various fields in the mouseup handler before you
> perform
> the find in order not to confuse things for the user.
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
> On Jan 18, 2012, at 5:20 PM, DunbarX at aol.com wrote:
>
> >
> >
> > In good ol' HC, if you have a field somewhere with text (someText) in
> it, and
> a button that contains:
> >
> >
> > on mouseUp
> >  find someText
> > end mouseUp
> >
> >
> > The text is found, and a box is drawn around it. If you press the button
> again
> > the box disappears for a moment, and then is redrawn. This is known as
> finding
> once more.
> >
> >
> > In LC, however, the second find makes the box disappear altogether, You
> can
> get it back if you find
> > for a third time. (or fifth, etc.)
> >
> >
> > Annoying, unless it is just me and mine.
> >
> >
> > Craig Newman
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list