home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
msysjour
/
vol04
/
02b
/
project
/
act
/
projapp.act
< prev
Wrap
Text File
|
1988-11-30
|
3KB
|
83 lines
/* ProjApp.act --based on the skeleton file UserApp.act.
This file is used during the seal off process to define
methods specific to the project application.
*/
/* Define the application class */
inherit(Object, #ProjApp, #(pw cmdLine), nil, nil)!!
/* Define an init method for ProjApp. This is executed when the
application starts up, and must create the windows and objects
necessary for the application.
*/!!
now(ProjApp)!!
Def init(self , str | dlg)
{ initSystem(self);
register(ProjWindow);
register(GanttWindow);
cmdLine := str;
pw := new(ProjWindow, nil, nil, loadString(PW_APPNAME), nil);
show(pw, CmdShow);
pw.isMain := true;
dlg := new(Dialog);
runModal(dlg, ABOUT_BOX, pw);
/* move the cursor to the top in case there's no mouse */
setCursorPos(pw, point(pw.boxHSpace, pw.boxHeight));
}!!
/* Check if it's ok to close the window. */
Def shouldClose(self)
{
^shouldClose(pw);
}!!
/* The installation method for the application.
This removes the compiler and miscelaneous junk and then
takes a snapshot.
Note: This method must be invoked via abort(installProj));
or abort(Object.methods[#installProj]);
*/
now(Object)!!
Def installProj(self)
{ setName(VImage, "Project.ima");
removeCompiler();
removeJunk(); /* unused methods */
TheApp := new(ProjApp);
printLine("sealing off...");
cleanup();
create(VImage);
snap(VImage, 59, 25); /* Static and Dynamic memory */
/* adjust later with MemChg.EXE */
close(VImage);
exit();
}!!
/* Remove unused methods during seal off. */
Def removeJunk(self)
{
removeGlobal(#OrderedDictionary);
removeGlobal(#TextCollection);
printLine("removing...");
removeMethods(Number, #(cos sqrt tan sin exp log arcCos arcSin degToRad
radToDeg));
removeMethods(Int, #(random));
removeMethods(Rect, #(inflate offset intersect union));
removeMethods(Object, #(removeCompiler));
removeMethods(Network, #(show));
removeMethods(Node, #(show));
removeMethods(Date, #(asLongString asVeryLongString asDayString
diff inc dec next previous dayOfWeek));
removeMethods(DateClass, #(current));
/* automatically generated by optimize utility */
removeJunk1();
removeJunk2();
removeMethods(Object, #(removeJunk1 removeJunk2));
}!!