ClickLine woes

SimPLsol at aol.com SimPLsol at aol.com
Mon Jun 6 12:51:08 EDT 2005


Jeanne et al.,
One area where I've found the transition from HC to Rev to be difficult is 
the different ways they handle the clickLine.

I have two fields. The one on the left is a label field, shared text which 
appears on all cards. The one on the right contains data that changes from card 
to card. The one on the right is no problem.

With HyperCard, I could trap for Option clicks in the left field, put up an 
Ask dialog that asked the user if they wanted to edit line (word two of the 
clickLine) of the field clicked, and then do some things based on their response.

With Rev, the clickLine returns the number of the line clicked only if you 
click on a line with text. For example: if there are two lines of text in the 
field and 
1. you click on line one, word 2 of the clickLine is 1
2. you click on line two, word 2 of the clickLine is 2
3. you click line three (or any higher number), word 2 of the clickLine is 0. 

4. If there is no text in the field, word 2 of the clickLine is 0 - no matter 
where you click.

Different situation: I have third field, a scrolling field that goes to the 
left of the label field described above. This is a locked field used for 
putting checkmarks in front of items that have been completed. I get the same 
clickLine problem - if the user first clicks on line five the checkmark will go into 
line 1, if this field is empty. But if a lower line (say, line 9) contains 
text, then the checkmark will go into line 5 (or any other line clicked if it is 
lower than 9).

I suppose I could put a space (or X) on line 25,000 of each of these fields 
but the user might get confused to see really tiny proportional scrollbars on 
an empty field.

Is there a better way?

Jeanne, could we document this clickLine behavior? I would have found it very 
helpful just to know what was happening.

Paul Looney


More information about the use-livecode mailing list