home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
hypercrd
/
xcmd
/
prctclxf.sit
/
DemoStack
/
background_4929.txt
< prev
next >
Wrap
Text File
|
1990-08-28
|
8KB
|
389 lines
-- background: 4929 from stack: in
-- bmap block id: 5817
-- flags: 0000
-- background id: 0
-- name: Legal
----- HyperTalk script -----
-- used to ask about saving changes to a field
function fieldModified value
global _fieldModified
if (value Γëá empty) then put value into _fieldModified
return _fieldModified
end fieldModified
on openCard
set cursor to watch
get fieldModified(false)
if (debugging()) then
-- show file name field for text
show bkgnd button "Save Text To:"
show field "FileName"
-- load text from file
put buildPath(field "FileName") into fileName
putFileIntoField fileName, "Description"
else
-- hide file name field
hide bkgnd button "Save Text To:"
hide field "FileName"
end if
pass openCard
end openCard
-- Append fileName to the full pathname for this stack's folder
function buildPath fileName
put uniqList("fileName") into templist
put last word of the long name of this stack into stackPath
delete first char of stackPath
delete last char of stackPath
get alist(new, templist)
get alist(insert, templist, stackPath, ":")
put alist(size, templist) into sz
put alist(get, templist&"[…"&sz-1&"]", ":") & ":" & filename into path
get alist(dispose, templist)
return path
end buildPath
on closeCard
if (debugging() and fieldModified()) then
answer "Save changes to text?" with "Discard" or "Save"
if (it = "Save") then
putFieldIntoFile "Description", field "FileName"
end if
end if
get fieldModified(false)
end closeCard
-- part 1 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=4 top=317 right=340 bottom=31
-- title width / last selected line: 0
-- icon id / first selected line: 30557 / 30557
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: First
----- HyperTalk script -----
on mouseUp
GoFirst
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=39 top=317 right=340 bottom=62
-- title width / last selected line: 0
-- icon id / first selected line: 20689 / 20689
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
GoHome
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=72 top=318 right=340 bottom=98
-- title width / last selected line: 0
-- icon id / first selected line: 26635 / 26635
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Previous
----- HyperTalk script -----
on mouseUp
GoHelp
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=224 top=317 right=340 bottom=247
-- title width / last selected line: 0
-- icon id / first selected line: 1014 / 1014
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Previous
----- HyperTalk script -----
on mouseUp
GoPrevious
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=266 top=317 right=340 bottom=289
-- title width / last selected line: 0
-- icon id / first selected line: 1013 / 1013
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Next
----- HyperTalk script -----
on mouseUp
GoNext
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=449 top=317 right=340 bottom=476
-- title width / last selected line: 0
-- icon id / first selected line: 1012 / 1012
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Back
----- HyperTalk script -----
on mouseUp
GoBack
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=482 top=317 right=340 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 26865 / 26865
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Last
----- HyperTalk script -----
on mouseUp
GoLast
end mouseUp
-- part 9 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=14 top=44 right=307 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Description
----- HyperTalk script -----
on closeField
get fieldModified(true)
end closeField
-- part 10 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=14 top=28 right=44 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name:
-- part 12 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=0 top=0 right=20 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 1280
-- line height: 16
-- part name: HeaderRight
-- part 13 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=0 top=2 right=20 bottom=150
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 1280
-- line height: 13
-- part name: HeaderLeft
-- part 14 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=413 top=2 right=20 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: HeaderNumber
-- part 15 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=107 top=319 right=339 bottom=149
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: Index
----- HyperTalk script -----
on mouseUp
GoIndex
end mouseUp
-- part 16 (button)
-- low flags: 80
-- high flags: A004
-- rect: left=10 top=27 right=47 bottom=94
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: Save Text To:
----- HyperTalk script -----
on mouseUp
putFieldIntoFile "Description", field "FileName"
end mouseUp
-- part 17 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=95 top=28 right=47 bottom=205
-- 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: FileName
-- part 11 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=0 top=0 right=20 bottom=512
-- 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: MenuHide
----- HyperTalk script -----
on mouseEnter
global debugging
if (debugging = false) then show menubar
end mouseEnter
on mouseLeave
global debugging
if (debugging = false) then hide menubar
end mouseLeave
-- part 20 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=319 top=319 right=340 bottom=384
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: THINK C
----- HyperTalk script -----
on mouseUp
GoThinkC
end mouseUp
-- part 21 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=161 top=316 right=342 bottom=199
-- title width / last selected line: 0
-- icon id / first selected line: 32670 / 32670
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ShowAll
----- HyperTalk script -----
on mouseUp
set cursor to watch
set lockRecent to true
set lockMessages to true
if (the shiftKey is down) then set lockScreen to true
show all cards
set lockScreen to false
set lockMessages to false
set lockRecent to false
end mouseUp