home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
hypercrd
/
hc1_2_x
/
drgryrct.bin
/
draggrayrect.bin
/
background_3044.txt
< prev
next >
Wrap
Text File
|
1989-05-16
|
7KB
|
318 lines
-- background: 3044 from stack: in.bin
-- bmap block id: 3708
-- flags: 0000
-- background id: 0
-- name: bg1
----- HyperTalk script -----
DESCRIPTION:
` ----------
SYNTAX:
` ----------
RETURN:
` ----------
NOTE:
on NewCard
put script of me into temp
put strxlate(char 1 to (offset("on NewCard",temp)-1)of temp,"`","") into temp
put temp after fld "description"
select after char 1 of fld "Name"
end NewCard
on who
send who to fld "Author"
end who
on byMe
put " " into space5
put space5 &"Wing Eng"&return& space5 &"Cornell University"&return& space5 &"Ithaca,NY 14853"&return& space5 &"ygxj@cornella.bitnet"&return& space5 &"ygxj@vax5.cit.cornell.edu"&return& space5 &"3/21/89" into fld "Author"
show fld "Author"
end byMe
on by
show fld "Author"
end by
-- part 4 (field)
-- low flags: 00
-- high flags: 2007
-- rect: left=11 top=57 right=280 bottom=237
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Description
----- HyperTalk script -----
on mouseUp
global SelectionLinks
if SelectionLinks then
set lockText of me to false
click at the clickLoc
click at the clickLoc
if the selection is not empty then
put the selection into temp
visual zoom out
go card temp
if the result is not empty then
Answer "Couldn't find card named ""e&temp"e
end if
end if
set lockText of me to true
end if
end mouseUp
-- part 14 (button)
-- low flags: 00
-- high flags: 0002
-- rect: left=236 top=57 right=280 bottom=444
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DemoArea
----- HyperTalk script -----
--
-- So that Groups will work on this DemoArea
--
on mouseDown
send mouseDown to this card
end mouseDown
-- part 17 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=11 top=179 right=281 bottom=199
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: install list
----- HyperTalk script -----
--
-- This field contains the list of item
-- for installation.
--
on mouseUp
hide me
end mouseUp
-- part 25 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=20 top=254 right=287 bottom=201
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: SeeAlso
----- HyperTalk script -----
on mouseUp
--ΓÇó Delete name from the list
put lineLoc() into N
if N > 0 then
select line N of me
answer "Delete"&&line N of me &&"from See Also?" with "yes" or "no"
if it is "yes" then
delete line N of me
put StrTrim(me)&return into me
if the number of lines in me < 1
then hide bg btn "See Also"
end if
end if
hide me
end mouseUp
--
-- Displays a list of cards in the stack
-- and returns the item that you clicked on.
--
on ShowIndexList
global saveContents
put target into saveContents
put cd fld "index" of cd "firstCard" into me
set style of me to scrolling
send pop to me
put rect of me into scrollRect
put left of me - 15 into item 1 of scrollRect
repeat forever
if the mouse is down then
--ΓÇó allow scrolling of field
if the mouseLoc is not within scrollRect
then exit repeat
end if
end repeat
wait until the mouse is down
put empty into rStr
put the mouseH&","&the mouseV into pt
if pt is within rect of me then
--ΓÇó Add name to the list
put lineLoc(name of me,item 2 of pt) into N
if N > 0 then
select line N of me
put line N of me into rStr
end if
end if
hide me
put saveContents into me
put empty into saveContents
set style of me to rectangle
return rStr
end ShowIndexList
--
-- pop up this field.
-- Make the height equal to the number of lines in
-- the field * lineHeight.
--
on pop
Lock Screen
put textHeight of me into height
put number of lines in me into N
put bottom of me into bottom
put rect of me into r
put bottom - (height * N + 1) into top
if top < 20 then put 20 into top
put top into item 2 of r
set rect of me to r
show me
UnLock Screen
end pop
on unpop
hide me
end unpop
on selectItem
set style of me to rectangle
send pop to me
put TrackField() into N
send unpop to me
return N
end selectItem
-- part 28 (field)
-- low flags: 83
-- high flags: 0007
-- rect: left=4 top=53 right=311 bottom=236
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: index list
----- HyperTalk script -----
on mouseUp
global insertWhere
put lineLoc() into N
put line N of me into cName
if N > 1 and insertWhere <> empty and cName <> empty then
select line N of me
answer "Add" && cName && "to" && insertWhere with "yes" or "no"
if it is "yes" then
do "put" && insertWhere && " into temp"
put return & cName after temp
put ShellSort(temp,return) into temp
put StrTrim(temp)&return into temp
do "put uniqueLines(temp) into" && insertWhere
end if
end if
if fld "SeeAlso" <> empty then show bg btn "See Also"
hide me
put empty into insertWhere
put empty into me
end mouseUp
--
-- Displays a list of cards in the stack
-- and returns the item that you clicked on.
--
on pop
set scroll of me to 0
put cd fld "index" of cd "firstCard" into me
put "┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░ Cancel ┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░┬░" & return before me
show me
end pop
-- part 32 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=22 top=77 right=189 bottom=235
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Author
----- HyperTalk script -----
on mouseUp
hide me
end mouseUp
--
-- show the name of the author
--
on who
Lock Screen
put textHeight of me into height
put number of lines in me into N
if N > 0 then
put top of me into top
put rect of me into r
put top + (height * (N + 1)) into bottom
if bottom > 300 then
put 300 into top
set style of me to scrolling
end if
put bottom into item 4 of r
set rect of me to r
UnLock Screen
show me
else
answer "Unknown Author."
end if
end who
on mouseUp
hide me
end mouseUp