THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700


S U M M A R Y


DIARY: May 16, 2003 08:38 PM Friday; Rod Welch

Internal links improve mark and return for creating summary.

1...Summary/Objective
2...000007 - Mark For Linking Controls Mark 2
3...000008 Macro 136 Enter Sets Mark 2 at Anchor Location
4...000006 Macro 982 Open Links in SDS Records
5...0121 Macro File Modify to Avoid Mark 2 for Jumping to Internal Link


..............
Click here to comment!

CONTACTS 

SUBJECTS
Citations in Same Record "0" Link
Citations Create Link SDS to SDS, macro 985
F5 Mark for Linking
Links Internal Need Way to Mark and Return

0706 -
0706 -    ..
0707 - Summary/Objective
0708 -
070801 - Follow up ref SDS 12 0000, ref SDS 11 0000.
070802 -
070803 - Gary Johnson recently asked for improvements to the mark and return
070804 - system, as a way to facilitate writing summary/objective and linking
070805 - to relevant details. ref SDS 0 HY7V  Modified code that creates
070806 - internal links.  When Enter or double click is used to jump to an
070807 - anchor location within a record, mark 2 is now maintained as the
070808 - target location for a link set by F5. ref SDS 0 FH7N  This change
070809 - facilitates using existing links to find other related narrative for
070810 - linking, and occurs often when writing summaries where links are
070811 - clustered at the top of the record.  If F5 has not been pressed to
070812 - turn linking on when an internal link is pressed, then mark 2 will be
070813 - assigned to the anchor location, as has been the case up until today.
070814 - So, the change is that when F5 turns linking on, the system works
070815 - differently now.
070816 -
070817 -     [On 030521 notified Gary that new mark and return system seems
070818 -     like a big improvement. ref SDS 13 QX9P
070819 -
070820 -
070821 -
070823 -  ..
0709 -
0710 -
0711 - Problem
0712 -
0713 -
071301 - When writing a summary at the top of a record, there is a need to mark
071302 - a location for an anchor, and then use an existing link to jump back
071303 - to the linked location and move to execute a new link.  Right now SDS
071304 - does not support this.  There is capability like this for external
071305 - linking, but not for internal links.  So, this exercise improves using
071306 - mark and return for internal links, because this is a big help in
071307 - writing the summary/objective, per Gary Johnson's prompting the past
071308 - day or so.
071310 -  ..
071311 - When Enter or double click is executed for an internal link, mark 1 is
071312 - entered for the initial position, and mark 2 is entered at the link
071313 - anchor, i.e., at the destination.  This is helpful for ease of return
071314 - using Shift F1 and using Shift F2 to jump back forth between the link
071315 - and the the anchor.  Seems like we should preserve this.
071317 -  ..
071318 - Similarly, when F5 is pressed to mark a location for a link, mark 2
071319 - is entered as the target for entering a link.  This means mark 2 is
071320 - doing double duty....
071321 -
071322 -     a.  Mark 2 is target for the link when F5 is pressed.
071323 -
071324 -         This sets a flag 258 676 on or off. ref SDS 0 FU6G
071326 -          ..
071327 -     b.  Mark 2 is location of anchor when pressing Enter on an
071328 -         existing link.  Alt F1 returns to the link location and then
071329 -         Alt F2 returns to the anchor location.
071331 -  ..
071332 - It is very convenient to preserve mark 1 and mark 2 in the present
071333 - configuration.  Also, want to avoid creating a proliforation of marks
071334 - and returns, becomes this confusing, and so degrades productivity that
071335 - is sought by using marks.  System should be simple, intuitive and
071336 - robust, i.e., not easily fooled or breakable.
071338 -  ..
071339 - Can we set something up so that if linking is on and Enter is pressed
071340 - on a link, then mark 2 is not assigned to the destination anchor?
071341 - Seem to have accomplished this per below. ref SDS 0 FH7N
071342 -
071343 -
071344 -
071345 -
071347 -  ..
0714 -
0715 -
0716 - Progress
0717 -
071701 - 000007 - Mark For Linking Controls Mark 2
071702 -
071703 - Line 2890, ref OF 3 ET5I, -entry 122 in 000007
071704 -
071705 - This is the code executed by F5 to mark a location for linking.
071706 -
071707 -
071709 -  ..
071710 - Line 2910, ref OF 3 1U7J, -label mflkng
071711 -
071713 -  ..
071714 - Line 2960, ref OF 3 NT7J, -label m8fdl in 000007
071715 -
071716 -    macro 1222
071717 -    macro 8
071718 -
071719 -      Turn linking off, we start with a clean slate.  Enter mark 2 for
071720 -      the target location of a link.
071721 -
071723 -  ..
071724 - Line 3140, ref OF 3 7095, -entry 1221 in 000007
071725 -
071726 -    setgbl 257 1690
071727 -    setcnt 258 676
071728 -    markcur 67
071729 -
071730 -       This sets global 257 to say linking is on; local 258 = 676 says
071731 -       internal linking is on, and the file is identified as 67 as the
071732 -       target of a link.  The only one we need is 258 = 676.
071734 -        ..
071735 -       When this is on, we should be able to avoid setting mark 2 when
071736 -       Enter is pressed to open an internal link.
071737 -
071739 -  ..
071740 - 000008  Macro 136 Enter Sets Mark 2 at Anchor Location
071741 -
071742 - Line 1040, ref OF 4 3592, -entry 136 in 000008
071743 -
071744 -    This code executes Enter and double clicking.
071746 -     ..
071747 -    It needs to verify that the file where Enter is pressed on a link
071748 -    is the same as where the cursor winds up after finding the link.
071749 -    One way to accoplish this might be use the SDS "0" internal link
071750 -    identification.  When this occurs, we know an internal link is
071751 -    being processed.  In that case when 258 = 676, do not set mark 2.
071753 -  ..
071754 - Line 1190, ref OF 4 664M, -label clfE in 000008 about 70 lines below
071755 -
071756 -    fl /ref /
071757 -    -if @0 = 0 -goto lSDS
071758 -
071759 -        If there is any ref on the line, then go process it.
071761 -  ..
071762 - Line 1600, ref OF 4 8461, -label lSDS in 000008
071763 -
071764 -    macro 982
071765 -
071766 -        Call macro 982 to figure out what kind of reference has been
071767 -        encountered and open it.
071768 -
071770 -  ..
071771 - 000006  Macro 982 Open Links in SDS Records
071772 -
071773 - Line 1480, ref OF 2 1718, -entry 982 in 000006
071774 -
071775 -    This code reads a reference in an SDS record and processes it.
071777 -  ..
071778 - Line 1520, ref OF 2 5618, -entry 982 about 60 lines below
071779 -
071780 -    -if @1 = 83 -if @2 = 68 -if @3 = 83 setcnt 93 1
071781 -
071782 -        If this is SDS record setcnt 93 1
071783 -
071785 -  ..
071786 - Line 1570, ref OF 2 7666, -label lu1 in 000006
071787 -
071788 -    chrcnt 115 0
071789 -    rel_cur 0 1
071790 -    chrcnt 116 0
071791 -
071792 -        Capture the Reference number.
071794 -         ..
071795 -        We now have everything we need to mange the issue at hand.
071796 -
071797 -            If 258 = 676
071798 -               115 = 48
071799 -               116 = 32
071801 -         ..
071802 -        This should establish that the op is jump to an internal link.
071803 -
071805 -  ..
071806 - Line 1650, ref OF 2 4129, -label gNumC in 000006
071807 -
071808 -    -if @115 = 48 -goto cur88r
071809 -
071810 -        This code recognizes an op for jumping to an internal link is
071811 -        underway.
071812 -
071814 -  ..
071815 - Line 1760, ref OF 2 2846, -label cur88r in 000006
071816 -
071817 -    -label cur88r
071818 -    markcur 30
071819 -    -label eCur8
071820 -    @c:\sd\03\0121
071821 -
071822 -        For op that jumps to an Internal link, use macro file 0121.
071823 -
071825 -  ..
071826 - 0121  Macro File Modify to Avoid Mark 2 for Jumping to Internal Link
071827 -
071828 - Line 90, ref OF 1 8I4M,
071829 -
071830 -    macro 6
071831 -    setcnt 237 0
071832 -    top
071833 -
071834 -       The code enters mark 1 at the link, and evidently intends to
071835 -       turn off the linking flag.  However, per above, linking flags
071836 -       are setgbl 257 1690 setcnt 258 676, ref SDS 0 FU6G,
071837 -
071839 -  ..
071840 - Line 260, ref OF 1 FH7G, -label nadjus in 0121
071841 -
071842 -    -if @258 != 676 macro 8
071843 -
071844 -        Try adding conditional so that if internal link flag is on, set
071845 -        by F5 calling macro 1221 in 000007, per above. ref SDS 0 FU6G
071846 -        do not enter Mark 2, so that Mark 2 set by F5 remains in
071847 -        effect.
071849 -         ..
071850 -        This seems to solve the problem.
071851 -
071852 -
071853 -
071854 -
071855 -
071856 -
071857 -
071858 -
071859 -
071860 -
071861 -
071862 -