revBrowserSet, search a second string

Terry Judd tsj at unimelb.edu.au
Wed Feb 10 19:57:38 EST 2010


OK - it looks like the OSX and Win versions of the browser function
differently here (nothing new about that). While the method I suggested
doesn't work with the Win browser, I did find that calling the revBrowserSet
command twice will do the trick.

For example, using the runrev home page as a testbed...

RevBrowserSet 1, "selected", "platform"
-- selects a single instance of the word platform in the footer section of
the page
RevBrowserSet 1, "selected", "enterprise"
-- selects a substring of a word a couple of lines down
RevBrowserSet 1, "selected", "platform"
-- does nothing but...
RevBrowserSet 1, "selected", "platform"
-- selects the previously selected instance of the string

I'd still report this as it doesn't work as reported and there is nothing
more painful than having to implement platform specific workarounds
(actually, not being able to come up with any satisfactory workaround for a
particular platform is definitely more annoying).

HTH,

Terry...

On 11/02/10 10:07 AM, "Claus Dreischer" <claus at dreischer.de> wrote:

> Hi Terry,
> 
> thanks for taking a look!
> I had no luck with handing the focus to another control here on Win XP.
> Didn't cured the problem here.
> 
> 
> But i have done some more tests:
> 
> (revBrowser alread open in a substack)
> 
> - revBrowserSet sBrowserId, "selected", "Mike"
>   works
> 
> - revBrowserSet sBrowserId, "selected", "John"
>   works too :-)
> 
> - focus on main stack
> 
> - focus back on substack with revBrowser
> 
> - revBrowserSet sBrowserId, "selected", "Mike"
>   doesn't work anymore  :-/
> 
> - revBrowserSet sBrowserId, "selected", "John"
>   doesn't work anymore  :-(
> 
> 
> So it looks like (at least here on Win XP), *loosing* the focus is
> somewhat related to the problem.
> 
> Can anyone shine a light on his?
> 
> Regards, 
> Claus.
> 
> 
> 
> Am 10.02.10 23:04, schrieb Terry Judd:
>> Claus - This looks like a bug (at least on OSX). As you point out the docs
>> say that setting the selectedtext to empty or a string that does not occur
>> in the text should 'reset' the selection - but doesn't. Certainly worth
>> reporting.
>> 
>> In the meantime it looks like you can work around it by handing the focus to
>> another control. This should remove the current selection in the browser
>> text and let you 'search' again. I just tried with with the browser example
>> stack and doing the following...
>> 
>> focus on btn "browser on" -- (button that toggle the browser on and off)
>> 
>> ... Before changing the search string had the desired effect.
>> 
>> HTH,
>> 
>> Terry...
>> 
>> 
>> On 11/02/10 7:35 AM, "Claus Dreischer" <claus at dreischer.de> wrote:
>> 
>>> Hi,
>>> 
>>> i see a strange behaviour when searching a second string in a revBrowser:
>>> 
>>> First i open a revBroser and i can see the web page i stated
>>> Then i search in that page with:
>>> 
>>> revBrowserSet sBrowserId, "selected", search_text
>>> 
>>> "sBrowserId" is the Browser ID i got from revBrowserOpen
>>> "search_text" is the variable containing my string to search, like "Mike"
>>> 
>>> I can do this repeatedly and i find the different occurences of that
>>> string in that page. All fine here.
>>> 
>>> 
>>> Now when i change the search_string to e.g. "John",
>>> nothing happens. "John" is not found (but he's on that page) :-/
>>> 
>>> Changing the search string again (even to "Mike"): Nothing happens. :-/
>>> 
>>> Resetting the search with an empty search string (like the doku said):
>>> Nothing happens :-/
>>> 
>>> 
>>> Any ideas what i could have done wrong?
>>> 
>>> Regards,
>>> Claus.
>> 
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list