-- card: 3022 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 2591 -- name: -- part 1 (button) -- low flags: 80 -- high flags: 8003 -- rect: left=401 top=145 right=167 bottom=501 -- 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: NewBG ----- HyperTalk script ----- on opencard hide menubar set the name of button id 63 to "Menus On" put the size of this stack into card field "StackSize" put the freesize of this stack into card field "Wasted" end opencard on listButton ListName if the short name of the target is "Show List" then set name of target to "Hide List" set visible of card field ListName to true else set name of target to "Show List" set visible of card field ListName to false end if end listButton on controlbutton ref if the commandkey is down then visual dissolve to black visual dissolve go first card of background ref exit controlbutton end if --the following lines facilitate repair to the Developer Stack --repair stack by Dean Wette, XNet™ set cursor to 4 put Order(card field ref,return) into theList put stripReturn(theList) into theList ShowDialog 7,1999,"",Chicago,12,theList,1 get the result set lockMessages to true go this cd set lockmessages to false if it is not empty then push this card visual scroll left to gray visual scroll right go card line it of theList end if end controlbutton --StripReturn function by Dean Wette, XNet function stripReturn container repeat while charToNum(last char of container) = 13 delete last char of container end repeat repeat while charToNum(first char of container) = 13 delete first char of container end repeat return container end stripReturn on domenu which if which is "New Card" or which is "Cut card" or which is "Delete Card" then beep 3 exit domenu end if if which is "Protect Stack..." then beep 3 answer "You don't want to do that!" exit domenu end if if which is "Delete Stack..." then play boing answer "You really don't want to do that!" exit domenu end if pass domenu end domenu -- part 2 (button) -- low flags: 80 -- high flags: 8003 -- rect: left=401 top=169 right=191 bottom=501 -- 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: NewStack ----- HyperTalk script ----- on openStack hide message box set userlevel to 5 end openStack on mouseup if the optionkey is not down then exit mouseup else if the shiftkey is down then edit script of this background else edit script of target end if end mouseup --newCard handler modified by Dean Wette, XNet™ --modification required with repair to Developer Stack on newcard ask "What do you want to name this card?" set cursor to 4 put "Please wait while we fix things up for you..." put it into newName if newName is empty then domenu delete card hide message exit newcard end if set the name of this card to newName put newName into field name set lockscreen to true put the short name of this background into rememberThis push this card go first card put newName & return before card field rememberThis put newName & return before card field index pop card set lockscreen to false hide message window end newcard -- --this function will take a word passed to it by the calling script, --check if it is valid, and then go the card whose name is that wore. -- function HyperText selectedWord -- -- --hypertext technique by Steve Drazga, ART Incorporated --if you use this in your scripts please include these 2 lines. -- -- if space is in SelectedWord then --the user selected more than 1 word click at loc of target --so we will clear the selection exit HyperText --and exit to wait for another selection end if push this card visual dissolve to gray visual dissolve go card selectedWord if the result is not empty then play oops answer "Can't find that card" end if end HyperText -- --this function is used by the 'install' buttons in the --XFCN & XCMD cards. It needs the resource type and resource name --passed to it. It then attempts to install the resource into --a target stack & returns the result. -- function installres type, resname -- --Original script by Steve Drazga, AnalytX --XFCNs used: fileName, --XCMDs used: ResCopy, --HANDLERS used: none --FUNCTIONS used: none -- put (long name of this stack) into sourceStack delete first word of sourceStack delete first character of sourceStack delete last character of sourceStack put "Select a stack to copy this "&type&" resource into." put filename("STAK") into fname if fname is empty then exit installres if sourcestack=fname then play "oops" return "Get real. You can't install it in this stack" exit installres end if -- ResCopy sourceStack,fname,type,resname -- if first char of the result is "E" then play oops answer "Attempt to install resource has failed." else answer type&&"resource installation successful" end if hide message end installres -- -- LastPathComponent -- given a file pathname, returns the last -- component i.e. whatever comes after the last colon, if anything. -- From Dewi Williams -- function LastPathComponent name -- scan backwards for the last colon. repeat with i = the length of name down to 1 if character i of name is ":" then exit repeat end repeat if i is 1 then -- Name was of the form ":thing" or "thing". Check for leading -- colon, and adjust if necessary. Done for generality. if first character of name is ":" then put 2 into i end if else add 1 to i -- skip the colon end if -- Name was of the form "Thing:otherthing". Return "otherThing". put empty into lastpath repeat with j = i to the length of name put character j of name after lastpath end repeat return lastpath end LastPathComponent -- -- OsErr: for displaying Operating system error codes returned by -- Sublaunch, RenameFile, MoveFile and DeleteFile XFCNs. -- From Dewi Williams -- on OsErr err -- Translate the most common ones if err > 0 then -- XFCN convention put "Parameter error with function" into errstr else if err is -59 then put "Problem during rename" into errstr else if err is -54 then put "Attempt to open locked file for writing" into errstr else if err is -46 then put "Volume locked by software" into errstr else if err is -45 then put "File locked" into errstr else if err is -44 then put "Volume locked by hardware" into errstr else if err is -43 then put "File not found" into errstr else if err is -37 then put "Bad volume or file name" into errstr else if err is -36 then put "I/O error" into errstr else if err is -35 then put "No such volume" into errstr else if err is -34 then put "Disk is full" into errstr else if err is -49 then put "File already open for writing" into errstr else put "Failed with error" && err into errstr end if answer errstr with "OK" end OsErr -- part 5 (button) -- low flags: 00 -- high flags: A003 -- rect: left=153 top=99 right=121 bottom=350 -- 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: Repair Developer Stack... ----- HyperTalk script ----- on mouseUp put "Proceed with repair to Developer Stack?" into str1 put return &"The process will add some resources, and modify some" && "scripts in the Developer Stack." into str2 beep ShowDialog 2,7502,str1,str2,"","",true,40,90 get the result redraw if it is empty then exit to HyperCard put the value of word 2 of the long name of this stack into theSource put stackPath() into theStack doRepair theSource,theStack end mouseUp function stackPath put "Select a COPY of the “Developer Stack” for repair." into prompt get FileName("STAK",prompt) if it is empty then exit to HyperCard redraw return it end stackPath on doRepair source,dest put the script of btn id 1 into bgScript put the script of btn id 2 into stackScript put cd fld id 6 into theList showMessage return &"Repairing Developer Stack..." setLocks true push cd go stack dest if not (the name of this stack contains "Developer") then wrongStack rescopy source, dest, "XFCN", "Order" rescopy source, dest, "XCMD", "ShowDialog" rescopy source, dest, "DITL", "XNet" rescopy source, dest, "DLOG", "XNet" rescopy source, dest, "XFCN", "Substitute" if the result is not empty then pop cd setLocks false put "Sorry, problems copying resources. Repair aborted." into str1 ShowDialog 2,7400,str1,"","","",70,105 hideMessage exit to HyperCard end if set the script of this stack to stackScript set the script of this bg to bgScript repeat with i = 1 to the number of lines of theList put cd fld (line i of thelist) into indexList put substitute(",",return,indexList) into indexList put order(indexList,return) into indexList put stripReturn(indexList) into indexList put indexList into cd fld (line i of theList) end repeat hide msg pop cd hideMessage setLocks false beep ShowDialog 1,7671,"",true,55,110 end doRepair on wrongStack pop cd setLocks false put "Error! You cannot work on the stack you selected." into str1 beep ShowDialog 2,7400,str1,"","","",70,105 hideMessage exit to HyperCard end wrongStack -- part 6 (field) -- low flags: 80 -- high flags: 0001 -- rect: left=156 top=120 right=205 bottom=356 -- 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: -- part 7 (button) -- low flags: 00 -- high flags: A003 -- rect: left=153 top=73 right=95 bottom=350 -- 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: Please Read Me First... ----- HyperTalk script ----- on mouseUp set the visible of cd fld id 11 to not the visible of cd fld id 11 end mouseUp -- part 8 (field) -- low flags: 81 -- high flags: 0002 -- rect: left=145 top=67 right=148 bottom=358 -- 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: -- part 9 (field) -- low flags: 81 -- high flags: 0002 -- rect: left=148 top=70 right=145 bottom=355 -- 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: -- part 10 (field) -- low flags: 81 -- high flags: 0002 -- rect: left=149 top=71 right=144 bottom=354 -- 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: 14 -- part name: -- part 11 (field) -- low flags: 81 -- high flags: 2007 -- rect: left=4 top=213 right=337 bottom=507 -- 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: ----- HyperTalk script ----- on mouseUp hide me set the scroll of me to 0 end mouseUp -- part 12 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=482 top=187 right=211 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 19678 / 19678 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: About XNet... ----- HyperTalk script ----- on mouseUp set the visible of cd fld id 14 to not the visible of cd fld id 14 end mouseUp -- part 14 (field) -- low flags: 81 -- high flags: 2002 -- rect: left=7 top=212 right=338 bottom=504 -- 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: ----- HyperTalk script ----- on mouseUp hide me end mouseUp -- part contents for card part 6 ----- text ----- XFCNs XCMDs Functions Scripts Buttons Quick Ref Index -- part contents for card part 11 ----- text ----- DevStackFix 1.0 by Dean H. Wette, XNet™, 24 February 1989 The Developer Stack version 1.2 has problems with HyperCard 1.2. It uses an external function XFCN (Sortlines) that causes a system crash when the scrolling list dialog is invoked. This stack repairs Developer Stack by replacing those resources that cause the system error with newer, compatible ones. It also modifies some scripts to make Developer Stack work correctly with the new resources. This stack will modify both the resource and data component of Developer Stack--WORK ONLY ON A COPY! The repair is not guaranteed to work on modified copies of Developer Stack, although, in most cases, it should work fine. If you have modified Developer Stack and/or added resources to it, you may contact me directly for instructions on performing the repair manually. If you have added resources that share the same ID as the resources added by the repair, your original resources will be overwritten by the ones installed by the repair routine. To invoke the repair, click the appropriate button above. A standard GetFile dialog will prompt you to select a copy of the Developer Stack to work on. The process itself takes only a few moments. An alert will inform you if error is encountered, or when the repair is completed successfully. Please Note Well: You will need to RESTART HyperCard before the repair is functional. This is due to the way some resources are copied--they don't become active until after HyperCard is restarted. DevStackFix uses some resources that are copyrighted by other developers. They are: FileName XFCN by Steve Maller, Apple Computer ShowDialog XCMD by Jay Hodgdon Substitute and Order XFCNs by Eric Celeste My thanks to all of them for their excellent work providing freeware and shareware external resources. All other components of this stack, other than the non-modified parts of Developer Stack's scripts, are copyright ©1989 by Dean H. Wette. DevStackFix is an XNet™ product and is free of charge. It may be distributed freely only through non-profit channels, and through online services that do not charge for specific downloaded files. ShareWare/Freeware distributors, whose business is to distribute software, are forbidden from distributing DevStackFix or any other XNet product. If you have any problems, or need to perform the repair manually you may contact me at the following: MacNET: DWETTE CIS: 72317,2034 GEnie: D.WETTE Dean Wette 921 DeMun Ave. Clayton MO 63105 -- part contents for card part 14 ----- text ----- XNet™ is the HyperCard and Externals Developers Network, a coalition of developers in HyperTalk and of XCMD's and XFCN's. The members of the group are available via various ID's and Addresses on all the major networks and information services (CONNECT/MacNET, CompuServe, GEnie and AppleLink). Soon, the group as a whole, may be contacted through one central ID or Address on your service of preference. For now, inquire with the System Operator or Forum Manager of your service's HyperCard areas for info regarding the contacting of XNet™ members. The group members, made up of a growing and changing number of experienced HyperTalk and Externals Developers, produce various freeware products for public distribution under the XNet™ name, as well as provide responsive assistance and information at both novice and expert levels of HyperCard Development.