home *** CD-ROM | disk | FTP | other *** search
- property aID, aOKCancel, aBoucleVerif, aNoStartup
-
- on new me, pId
- aID = "QA-" & string(pId)
- Subscribe(aID, me)
- addFrameObj(aID)
- aBoucleVerif = 0
- aNoStartup = 0
- return me
- end
-
- on done me
- if objectp(aOKCancel) then
- done(aOKCancel)
- end if
- Unsubscribe(aID)
- end
-
- on setTransition me
- VisibleManager(0)
- end
-
- on DoEnterFrame me
- if aNoStartup = 0 then
- startup(me)
- end if
- if aBoucleVerif = 1 then
- CheckCD(me)
- aBoucleVerif = 0
- ContinueStartup(me)
- end if
- end
-
- on show me
- if the colorDepth = 8 then
- FixPaletteMLX("Logo Q/A I bogus Palette")
- end if
- VisibleManager(1, [1])
- FixUpdateStage("QA-010")
- end
-
- on StartEva me
- global gCD
- delMDLst(0)
- delMDLst(1)
- delKeyLst(aID, #all)
- if gCD = 1 then
- URLManager("E")
- else
- URLManager("S")
- end if
- end
-
- on DoTimeout me
- StartEva()
- end
-
- on DoMouseDown me, pSprite, pFirst, pPrevSprite
- return #RIEN
- end
-
- on doKeyDown me, pKey
- return #RIEN
- end
-
- on doKeyUp me, pKey
- return #RIEN
- end
-
- on setCursor me
- nothing()
- end
-
- on getProperties me
- return 0
- end
-
- on startup me
- global gDriveCD, gDriveHD, cRecData, gLoaderObj, gCD, gHDDataPath, gHDRecPath
- GeneralCursor(4)
- FixUpdateStage("apres general cursor")
- if the machineType = 256 then
- PathDelimiter = "\"
- else
- PathDelimiter = ":"
- end if
- gHDRecPath = gDriveHD & getString(#HDRec, 1) & PathDelimiter
- gHDDataPath = gDriveHD & getString(#HDData, 0) & PathDelimiter
- checkRecettesFiles()
- CheckCD(me)
- if gCD = 0 then
- CreatePalette(me)
- else
- ContinueStartup(me)
- end if
- end
-
- on CreatePalette me
- global gDialogStrings
- if not objectp(aOKCancel) then
- aOKCancel = new(script("oCancelOK"), "QuitContinue", 1, 44, [479, 480, 484, 481], ["Continue", "QuitEva"], [point(320, 240), getaProp(gDialogStrings, "PalCQText"), getaProp(gDialogStrings, "PalCQQuit"), getaProp(gDialogStrings, "PalCQCont")], [#NoCDText, #NoCDGo, #NoCDQuit])
- OpenDialog(aOKCancel, 1)
- aNoStartup = 1
- end if
- end
-
- on checkRecettesFiles
- global gHDRecPath, cRecData, gExtension
- FileLst = GetFileLst(gHDRecPath)
- repeat with i = 1 to count(FileLst)
- setAt(FileLst, i, RemapWord(getAt(FileLst, i)))
- end repeat
- MasterChunkData = value(member(2, cRecData).text)
- PackageLst = getAt(MasterChunkData, 3)
- repeat with i = 1 to count(PackageLst)
- setAt(PackageLst, i, RemapWord(getAt(PackageLst, i)))
- end repeat
- repeat with i = 2 to count(PackageLst)
- if getPos(FileLst, getAt(PackageLst, i) & gExtension) = 0 then
- if the machineType = 256 then
- ShipError(getError(#FileMissing1) & getAt(PackageLst, i) & gExtension & getError(#FileMissing2) & getString(#HDRec, 1) & getError(#FileMissing4))
- else
- ShipError(getError(#FileMissing1) & getAt(PackageLst, i) & gExtension & getError(#FileMissing3) & getString(#HDRec, 1) & getError(#FileMissing4))
- end if
- QuitEva()
- abort()
- end if
- end repeat
- end
-
- on CheckCD me
- global gCD, gDriveCD, gCDCastsPath, gCDDataPath, gCDRecPath, gCDTourPath, gFromProjector
- BogusFileName = "speak.bab"
- if the machineType = 256 then
- gDriveCD = FindFile(BogusFileName)
- if stringp(gDriveCD) then
- gCD = 1
- else
- gCD = 0
- end if
- else
- if voidp(gFromProjector) then
- gDriveCD = "Station CD-ROM:00-Eva:CD-ROM:"
- gCD = 1
- else
- gDriveCD = getString(#MacCDName, 1) & ":"
- if FindFile(gDriveCD & BogusFileName) then
- gCD = 1
- else
- gCD = 0
- end if
- end if
- end if
- end
-
- on SetPath me
- global gCD, gDriveCD, gCDCastsPath, gCDDataPath, gCDRecPath, gCDTourPath
- if the machineType = 256 then
- PathDelimiter = "\"
- else
- PathDelimiter = ":"
- end if
- if gCD then
- gCDCastsPath = gDriveCD & getString(#CDData, 0) & PathDelimiter
- gCDDataPath = gDriveCD & getString(#CDData, 0) & PathDelimiter
- gCDRecPath = gDriveCD & getString(#CDData, 0) & PathDelimiter
- gCDTourPath = gDriveCD & getString(#CDTour, 0) & PathDelimiter
- else
- gCDCastsPath = 0
- gCDDataPath = 0
- gCDRecPath = 0
- gCDTourPath = 0
- end if
- end
-
- on ContinueStartup me
- global gCD, gLoaderObj, gAccesRecettes, cRecData, gDialogStrings
- UpdateRecettes()
- ReadChunkData(gLoaderObj)
- gAccesRecettes = getAt(value(member(2, cRecData).text), 3)
- if gCD = 1 then
- LoadRecettesOnIdle(gLoaderObj)
- else
- repeat with i = 1 to 5
- TerminateLoading(gLoaderObj, i, [point(320, 240), getaProp(gDialogStrings, "UnMomentPres")], 1)
- CheckCD(me)
- if gCD = 1 then
- exit repeat
- end if
- end repeat
- end if
- SetPath(me)
- initGlobals()
- LoadNever()
- addMDLst(aID, 0)
- addMDLst(aID, 1)
- addKeyLst(aID, #all)
- delFrameObj(aID)
- StartEva()
- end
-
- on DoAction me, pAction
- if voidp(pAction) then
- put "Void comme action => oPresentation"
- end if
- case pAction of
- "QuitEva":
- CloseDialog(aOKCancel)
- QuitEva()
- "Continue":
- CloseDialog(aOKCancel)
- GeneralCursor(4)
- aBoucleVerif = 1
- FixUpdateStage("48-010")
- otherwise:
- put "oPresentation : " & string(pAction)
- end case
- end
-