[comp.sys.mac.hypercard] Line number of field line that has insertion point in it?

sm196103@seas.gwu.edu (Scott Cherkofsky) (03/20/91)

I am at my wits end to try and find a way to get the field line # which has
the insertion point in it returned.  I need this so that I can make a tabkey
make the insertion point go to the same line in a sister field on the same
card.

I need either a nice code to accomplish this or a function like:

InsertionLine

Which would return the line number where the insertion point is.

Anybody have any ideas?  This is sorta urgent.

Thanx a bunch in advance,

Scott
-- 
Scott Cherkofsky			"The experience of going through
sm196103@seas.GWU.edu			 life may be intended as a warning
Mechanical Engineering student		 not to do it again."
Executive Office of the President		-- Ashleigh Brilliant

chuq@Apple.COM (Chuq Von Rospach, net.god {retired}) (03/20/91)

sm196103@seas.gwu.edu (Scott Cherkofsky) writes:

>I am at my wits end to try and find a way to get the field line # which has
>the insertion point in it returned.

>I need either a nice code to accomplish this or a function like:
>InsertionLine

Close. Under HC 2.0 (I'm not sure about 1.x) you can use clickline to find
out where the cursor is:

on idle
 put the clickline into msg
 pass idle
end idle 

in the stack script will show you how it works.

-- 
Chuq Von Rospach  >=<  chuq@apple.com  >=<  GEnie: CHUQ  >=<  AppleLink: CHUQ
     SFWA Nebula Awards Reports Editor    =+=    Editor, OtherRealms
Book Reviewer, Amazing Stories    ---@---    #include <standard/disclaimer.h>

Recommended reading: BONE DANCE by Emma Bull; BLIND JUSTICE by S.N. Lewitt;
SCIENCE FICTION IN THE REAL WORLD by Norman Spinrad

Susan.A.Tenney@dartmouth.edu (Susan A. Tenney) (03/20/91)

In article <50457@apple.Apple.COM>
chuq@Apple.COM (Chuq Von Rospach, net.god {retired}) writes:

> Close. Under HC 2.0 (I'm not sure about 1.x) you can use clickline to find
> out where the cursor is:
> 
> on idle
>  put the clickline into msg
>  pass idle
> end idle 
> 
> in the stack script will show you how it works.

I think it's selectedLine, not clickLine, that's needed.  clickLine
identifies the most recently clicked line in a *locked* field, whereas
selectedLine gives the line containing the current selection (of which
an insertion point is a special case). And it works in HyperCard 1.2.x.

Susan Tenney
Dartmouth College Computing Services