Page 1 of 1

Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 2:31 pm
by Youks
Hi All,

It's been quite some time now hoping you're all well!!!

I am having a little stupid problem...............does anyone have found a "very fast" way of "Un-Hilite or De-Hilite" a line that has previously hilited with the clickline function??

I tried selecting line 0 of the field but kind of very slow on iOS!!!

Many thx for help!!

Rgds :)

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 2:37 pm
by Klaus
Hi Youks,

...
set the hilitedlines of fld "xyz" zo 0
...

Best

Klaus

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 3:30 pm
by Youks
Hi Klaus,

Thx for your fast reply, but actually this what i did on my code but it can take up to 1s or + before the line become dehilited on iOS!!

If there's no other method i will have to improve my code....

on mouseUp
select the clickLine
put the value of the clickLine into textOfClickedLine
answer textOfClickedLine with "No" or "Yes"

if it is "No" then
set the hilitedLine of field "Contacts" to 0
else
--do something else...etc....

Thanks!

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 3:36 pm
by Klaus
Hi Youks,

is this a "list" field?

"hilitedlines" will only work with listfields.
Or why are you dealing with (value) "the clickline"?

Is the "mouseup" in the fields script?


Best

Klaus

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 3:47 pm
by Youks
Hi Klaus,

Actually i am using a field containing a list of items, all running under scroller.
The "Mouse Up" hdlr is relative to field containing the list.When i user clicks on an item of the list it triggers an Answer msg with "No" or "yes". If the answer is "No" then i return to the list an dehilite the line , if "Yes" a move to another card.

That's what i am trying to achieve but on iOS sometimes the dehilite process is not immediate!

Thx! :?

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 3:50 pm
by Youks
Hi Klaus,

Maybe it has to do with the "Delay touches" property of the scroller?

Rgds :?

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 4:17 pm
by Klaus
Hi Youks,

maybe, I have no experience with iOS yet.


Best

Klaus

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 4:32 pm
by sturgis
Since i can't test on IOS there isn't a way for me to help directly, but wanted to point out something klaus hinted at.

You don't need to use value to get the value of the clicked line. Since it sounds like you are correctly using a field with the listbehavior property, you also don't need to "select the clickline"

Code: Select all

-- simple script in the list field
on mouseUp
    put the clicktext into tText -- puts the text of the clicked line into variable tText
    answer tText with "No" or "Yes" -- your answer dialog
    if it is "no" then
        set the hilitedline of me to empty -- empty and 0 both work. Can use the "of me" form since the field is referencing itself. 
    else
        put tText into field "outField" 
    end if
end mouseUp
Like Klaus, I have no IOS experience yet (though this works on android)

Re: Hilited Line- How to un-hilite it quickly???

Posted: Tue Jun 12, 2012 4:52 pm
by Youks
Thx Klaus & Sturgis for your Help, looks like (my impression!) the code of Sturgis and using "empty" instead of "0" run a little faster!

Again even if "0" & "empty" is the same!!


Regards. :D