home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global dgBlueColor
- global dgYellowColor
- global dgDkBlueColor
- put the foreColor of member "blueModel" into dgBlueColor
- put the foreColor of member "yellowModel" into dgYellowColor
- put the foreColor of member "dkBlueModel" into dgDkBlueColor
- initCreate
- end startMovie
-
- on stopMovie
- closeCreate
- end stopMovie
-
- on closeWindow
- put the windowList into theList
- repeat with i = 1 to count(theList)
- put string(getAt(theList,i)) into theItem
- delete word 1 of theItem
- delete char 1 of theItem
- put the number of chars of theItem into theChar
- delete char theChar-1 to theChar of theItem
- if (theItem contains "Database Designer") or (theItem contains "FFDESIG") then
- forget window theItem
- end if
- end repeat
- tell the stage to puppetPalette 0
- tell the stage to updateStage
- end closeWindow
-
- on initCreate
- global topPointsToLine, baseSprite, spriteArray
- global dgBlueColor, dgYellowColor
- set baseSprite to 28
- -- preload
- puppetSprite 23,TRUE -- trash
- set the loc of sprite 23 to point(228, 356)
- puppetSprite 45,TRUE -- draggin' panel
- puppetSprite 46,TRUE
- puppetSprite 47,TRUE
- locHide 45
- locHide 46
- locHide 47
- hideDefineField
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- set the textHeight of member "visNameList" to 16
- set the textHeight of member "visTypeList" to 16
- set the textHeight of member "visWidthList" to 16
- set the textHeight of member "visDecimalsList" to 16
- set the textSize of member "visNameList" to 12
- set the textSize of member "visTypeList" to 12
- set the textSize of member "visWidthList" to 12
- set the textSize of member "visDecimalsList" to 12
- set the foreColor of member "visNameList" to dgYellowColor
- set the foreColor of member "visTypeList" to dgYellowColor
- set the foreColor of member "visWidthList" to dgYellowColor
- set the foreColor of member "visDecimalsList" to dgYellowColor
- put 1 into topPointsToLine
-
- set the loc of sprite (baseSprite) to point(-29, -9)
- set the loc of sprite (baseSprite+1) to point(291, 186)
- set the loc of sprite (baseSprite+2) to point(274, 262)
- set the loc of sprite (baseSprite+3) to point(437, 80)
- set the loc of sprite (baseSprite+4) to point(369, 79)
- set the loc of sprite (baseSprite+5) to point(257, 245)
- set the loc of sprite (baseSprite+6) to point(413, 188)
- set the loc of sprite (baseSprite+7) to point(334, 161)
- set the loc of sprite (baseSprite+8) to point(369,151)
- set the loc of sprite (baseSprite+9) to point(374, 195)
- set the loc of sprite (baseSprite+10) to point(286, 163)
- set the loc of sprite (baseSprite+11) to point(288, 214)
- set the loc of sprite (baseSprite+12) to point(269, 107)
- repeat with i = baseSprite to (baseSprite+12)
- locHide i
- end repeat
- end initCreate
-
- on closeCreate
- locHide 45
- locHide 46
- locHide 47
- puppetSprite 45,FALSE -- draggin' panel
- puppetSprite 46,FALSE -- draggin' panel
- puppetSprite 47,FALSE -- draggin' panel
- puppetSprite 23,FALSE -- trash
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- end closeCreate
-
- on showDefineField panel
- global baseSprite, fieldSpec, keyEditOK
- locHide 45
- locHide 46
- locHide 47
- updateStage
- put 28 into baseSprite -- allows me to move the sprite down
- repeat with i = (baseSprite) to (baseSprite+12)
- puppetSprite i,TRUE
- end repeat
- updateStage
- -- show the dialog box
- locShow baseSprite
- locShow baseSprite+1
- -- build the fieldSpec from the panel
- put word 1 of panel into theType
- case (theType) of
- "text":
- put ",C,25" into fieldSpec
- "numeric":
- put ",N,3,2" into fieldSpec
- "boolean":
- put ",L" into fieldSpec
- "memo":
- put ",M" into fieldSpec
- "date":
- put ",D" into fieldSpec
- end case
- setDefineField
- put TRUE into keyEditOK
- end showDefineField
-
- on setDefineField
- global baseSprite, fieldSpec, dgDkBlueColor
- set the itemDelimiter to ","
- -- parse the standard field specification
- put item 1 of fieldSpec into theName
- if theName = EMPTY then
- put "_" into field "FieldEntry"
- else
- put theName into field "FieldEntry"
- end if
- put item 2 of fieldSpec into theType
- if theType = "C" or theType = "N" then
- put item 3 of fieldSpec into theWidth
- end if
- if theType = "N" then put item 4 of fieldSpec into theDecimals
- -- set up the location of the type selection rect
- case theType of
- "C":
- set the loc of sprite (baseSprite+2) to point(274, 262)
- "N":
- set the loc of sprite (baseSprite+2) to point(312, 262)
- "L":
- set the loc of sprite (baseSprite+2) to point(350, 262)
- "D":
- set the loc of sprite (baseSprite+2) to point(388, 262)
- "M":
- set the loc of sprite (baseSprite+2) to point(426, 262)
- otherwise
- set the loc of sprite (baseSprite+2) to point(274, 262) -- text
- end case
- -- show the OK and Cancel buttons
- locShow baseSprite+3 -- OK
- locShow baseSprite+4 -- Cancel
- -- enable the button selection bar
- locShow baseSprite+5
- --updateStage
- -- initialize the counter fields
- set the text of member "widthData" to ""
- set the text of member "decimalsData" to ""
- locHide baseSprite+8
- locHide baseSprite+9
- -- initialize the block fields
- locShow baseSprite+10
- locShow baseSprite+11
- set the textStyle of member "decimalsData" to "bold"
- set the textFont of member "decimalsData" to "helvetica"
- set the textSize of member "decimalsData" to 9
- set the textStyle of member "widthData" to "bold"
- set the textFont of member "widthData" to "helvetica"
- set the textSize of member "widthData" to 9
- set the textAlign of member "widthData" to "right"
- set the textAlign of member "decimalsData" to "right"
- set the foreColor of member "decimalsData" to dgDkBlueColor
- set the foreColor of member "widthData" to dgDkBlueColor
-
- if theType = "C" then
- locShow baseSprite+8
- -- show the drag bar for Field Width
- locShow baseSprite+6
- fieldWidthValue theWidth, 255 -- 255 for char field
- -- update the blocker rects
- locHide baseSprite+10
- end if
- if theType = "N"then
- locShow baseSprite+8
- locShow baseSprite+9
- -- show the drag bar for Field Width
- locShow baseSprite+6
- fieldWidthValue theWidth, 10 -- 10 for numeric field
- -- show the drag bar for Decimals Width
- locShow baseSprite+7
- decimalsWidthValue theDecimals, 8 -- 8 for numeric field
- -- update the blocker rects
- locHide baseSprite+10
- locHide baseSprite+11
- end if
- locShow baseSprite+12
- updateStage
- end setDefineField
-
- on hideDefineField
- global baseSprite, spriteArray, keyEditOK
- put FALSE into keyEditOK
- put 28 into baseSprite -- allows me to move the sprite down
- --put EMPTY into spriteArray
- repeat with i = (baseSprite) to (baseSprite+12)
- locHide i
- end repeat
- updateStage
- repeat with i = baseSprite to (baseSprite+12)
- puppetSprite i,FALSE
- end repeat
- end hideDefineField
-
- on fieldWidthValue width, widthMax
- global fieldSpec
- global dgDkBlueColor
- -- point(xxx,173)
- -- max is point(439,173)
- -- min is point(136,173)
- global baseSprite
- locHide baseSprite+6
- put 173 into dragY
- put 136 into dragMin
- put 439 into dragMax
- put dragMax - dragMin into zoneSize
- put float(zoneSize)/float(widthMax) into perItemWidth -- max field width
- if width<1 then put 1 into width
- put float(width) * float(perItemWidth) into pixelsOver
- put dragMin + integer(pixelsOver) into theX
- set the loc of sprite (baseSprite+6) to point(theX,dragY)
- set the text of member "widthData" to string(integer(width))
- put string(integer(width)) into item 3 of fieldSpec
- set the textStyle of member "widthData" to "bold"
- set the textFont of member "widthData" to "helvetica"
- set the textSize of member "widthData" to 9
- set the textAlign of member "widthData" to "right"
- set the foreColor of member "widthData" to dgDkBlueColor
- end fieldWidthValue
-
- on fieldWidthPixel Xcoord, widthMax
- -- point(xxx,173)
- -- max is point(439,173)
- -- min is point(136,173)
- global baseSprite, fieldSpec, dgDkBlueColor
- put 173 into dragY
- put 136 into dragMin
- put 439 into dragMax
- put dragMax - dragMin into zoneSize
- put float(zoneSize)/float(widthMax) into perItemWidth -- max field width
- if Xcoord < dragMin then put dragMin into Xcoord
- if Xcoord > dragMax then put dragMax into Xcoord
- put Xcoord - dragMin into Xoffset
- put integer(float(Xoffset)/float(perItemWidth)) into width
- if width<1 then put 1 into width
- put float(width) * float(perItemWidth) into pixelsOver
- put dragMin + integer(pixelsOver) into theX
- set the loc of sprite (baseSprite+6) to point(theX,dragY)
- set the text of member "widthData" to string(integer(width))
- put string(integer(width)) into item 3 of fieldSpec
- set the textStyle of member "widthData" to "bold"
- set the textFont of member "widthData" to "helvetica"
- set the textSize of member "widthData" to 9
- set the textAlign of member "widthData" to "right"
- set the foreColor of member "widthData" to dgDkBlueColor
- updateStage
- end fieldWidthPixel
-
- -- admittedly fieldWidth... and decimalsWidth.. handlers are
- -- virtually identical, but keeping them as separate handlers
- -- makes tweaking and pixel pushing way easier
- on decimalsWidthValue width, widthMax
- -- point(xxx,217)
- -- max is point(439,217)
- -- min is point(241,217)
- global baseSprite, dgDkBlueColor
- locHide baseSprite+7
- put 217 into dragY
- put 241 into dragMin
- put 439 into dragMax
- put dragMax - dragMin into zoneSize
- put float(zoneSize)/float(widthMax) into perItemWidth -- max field width
- put float(width) * float(perItemWidth) into pixelsOver
- put dragMin + integer(pixelsOver) into theX
- set the loc of sprite (baseSprite+7) to point(theX,dragY)
- set the text of member "decimalsData" to string(integer(width))
- put string(integer(width)) into item 4 of fieldSpec
- set the textStyle of member "decimalsData" to "bold"
- set the textFont of member "decimalsData" to "helvetica"
- set the textAlign of member "decimalsData" to "right"
- set the textSize of member "decimalsData" to 9
- set the foreColor of member "decimalsData" to dgDkBlueColor
- end fieldWidthValue
-
- on decimalsWidthPixel Xcoord, widthMax
- -- point(xxx,217)
- -- max is point(439,217)
- -- min is point(241,217)
- global baseSprite, fieldSpec, dgDkBlueColor
- put 217 into dragY
- put 241 into dragMin
- put 439 into dragMax
- put dragMax - dragMin into zoneSize
- put float(zoneSize)/float(widthMax) into perItemWidth -- max field width
- if Xcoord < dragMin then put dragMin into Xcoord
- if Xcoord > dragMax then put dragMax into Xcoord
- put Xcoord - dragMin into Xoffset
- put integer(float(Xoffset)/float(perItemWidth)) into width
- put float(width) * float(perItemWidth) into pixelsOver
- put dragMin + integer(pixelsOver) into theX
- set the loc of sprite (baseSprite+7) to point(theX,dragY)
- set the text of member "decimalsData" to string(integer(width))
- put string(integer(width)) into item 4 of fieldSpec
- set the textStyle of member "decimalsData" to "bold"
- set the textFont of member "decimalsData" to "helvetica"
- set the textSize of member "decimalsData" to 9
- set the textAlign of member "decimalsData" to "right"
- set the foreColor of member "decimalsData" to dgDkBlueColor
- updateStage
- end fieldWidthPixel
-
-
- on locHide theSprite
- global spriteArray
- set the itemDelimiter to "|"
- put the loc of sprite theSprite into thePoint
- if thePoint <> point(-900,-900) then
- put string(thePoint) into item theSprite of spriteArray
- set the loc of sprite theSprite to point(-900,-900)
- end if
- set the itemDelimiter to ","
- end locHide
-
- on locShow theSprite
- global spriteArray
- set the itemDelimiter to "|"
- put item theSprite of spriteArray into theStringPoint
- set the loc of sprite theSprite to value(theStringPoint)
- set the itemDelimiter to ","
- end locShow
-
- on initIndex
- global topPointsToLine, baseSprite, spriteArray, dgYellowColor, dgDkBlueColor
- puppetSprite 23,TRUE -- trash
- -- set the loc of sprite 23 to point(358,356) -- under the line, under index expr
- set the loc of sprite 23 to point(358,300) -- directly under index expr
- updateStage
- puppetSprite 45,TRUE -- draggin' panel
- puppetSprite 46,TRUE
- puppetSprite 47,TRUE
- locHide 45
- locHide 46
- locHide 47
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- put EMPTY into field "indexExpr"
- set the textHeight of member "visNameList" to 16
- set the textHeight of member "visTypeList" to 16
- set the textHeight of member "visWidthList" to 16
- set the textHeight of member "visDecimalsList" to 16
- set the textSize of member "visNameList" to 12
- set the textSize of member "visTypeList" to 12
- set the textSize of member "visWidthList" to 12
- set the textSize of member "visDecimalsList" to 12
- set the foreColor of member "visNameList" to dgYellowColor
- set the foreColor of member "visTypeList" to dgYellowColor
- set the foreColor of member "visWidthList" to dgYellowColor
- set the foreColor of member "visDecimalsList" to dgYellowColor
- put 1 into topPointsToLine
-
- -- for alert dialogs
- set the loc of sprite (baseSprite) to point(-29, -9)
- set the loc of sprite (baseSprite+1) to point(291, 186)
- set the loc of sprite (baseSprite+3) to point(437, 80)
- locHide baseSprite
- locHide baseSprite+1
- locHide baseSprite+3
-
- -- index area highlight
- set the loc of sprite 14 to point(343, 192)
- locHide 14
-
- put "This area is used to construct an index expression:" into field "indexMessage"
- set the foreColor of member "indexMessage" to dgDkBlueColor
- set the textSize of member "indexMessage" to 9
- set the textStyle of member "indexMessage" to "bold"
- set the textFont of member "indexMessage" to "Helvetica"
- updateStage
- end initIndex
-
- on closeIndex
- locHide 45
- locHide 46
- locHide 47
- puppetSprite 45,FALSE -- draggin' panel
- puppetSprite 46,FALSE -- draggin' panel
- puppetSprite 47,FALSE -- draggin' panel
- puppetSprite 23,FALSE -- trash
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- put "This area used to construct an index expression:" into field "indexMessage"
- end closeIndex
-
- on moveIt theSprite, theLoc
- set the loc of sprite theSprite to theLoc
- updateStage
- end moveIt
-
- on initBrowse
- global topPointsToLine, baseSprite, spriteArray, dgYellowColor, dgDkBlueColor
- puppetSprite 23,TRUE -- trash
- set the loc of sprite 23 to point(-900,-900) -- directly under index expr
- updateStage
- puppetSprite 45,TRUE -- draggin' panel
- puppetSprite 46,TRUE
- puppetSprite 47,TRUE
- locHide 45
- locHide 46
- locHide 47
- put EMPTY into field "visNameList"
- put EMPTY into field "visContentList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterContentList"
- set the textHeight of member "visNameList" to 16
- set the textHeight of member "visContentList" to 16
- set the textSize of member "visNameList" to 12
- set the textSize of member "visContentList" to 12
- set the foreColor of member "visNameList" to dgYellowColor
- set the foreColor of member "visContentList" to dgYellowColor
- put 1 into topPointsToLine
-
- -- for alert dialogs
- set the loc of sprite (baseSprite) to point(-29, -9)
- set the loc of sprite (baseSprite+1) to point(291, 186)
- set the loc of sprite (baseSprite+3) to point(437, 80)
- locHide baseSprite
- locHide baseSprite+1
- locHide baseSprite+3
-
-
- put "" into field "browseMessage"
- set the foreColor of member "browseMessage" to dgDkBlueColor
- set the textSize of member "browseMessage" to 9
- set the textStyle of member "browseMessage" to "bold"
- set the textFont of member "browseMessage" to "Helvetica"
- updateStage
- end initBrowse
-
- on closeBrowse
- global dgDkBlueColor
- puppetSprite 23, FALSE
- puppetSprite 23,FALSE -- trash
- put EMPTY into field "visNameList"
- put EMPTY into field "visContentList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterContentList"
-
- put "" into field "browseMessage"
- set the foreColor of member "browseMessage" to dgDkBlueColor
- set the textSize of member "browseMessage" to 9
- set the textStyle of member "browseMessage" to "bold"
- set the textFont of member "browseMessage" to "Helvetica"
- end closeBrowse
-