/* For building PowerViews */!!

inherit(Object, #Builder, nil, 2, nil)!!

now(class(Builder))!!

/* 8/6/1992 8:58 */
Def loadWorld(self | aFile aLine count)
{ /* NOTE: does NOT handle multi-line comments */
  aFile := new(TextFile);
  setName(aFile, "world.lod");
  if not(open(aFile, 0))
  then printLine( "File open failed for: " + fileName(aFile) ) ;
    ^nil;
  else 
    count := 0 ;
    printLine( "Opened file: " + fileName(aFile) ) ;
    now( Object ) ;
    loop
    while (aLine := readLine(aFile)) cand (count < 1000)
    begin
      count := (count + 1) ;
      if size(aLine) > 0
      then printNewLine( aLine ) ;
        eval(
        {using(x) x
        }, parse(aLine, nil) ) ;
      endif ;
    endLoop;

    cleanup();

    /* snapshot */
    snapshotAs( TheApp ) ;
  
    /* clean up */
    close(aFile);
  endif;

} !!

now(Builder)!!
