ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/StarterDoc.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/StarterDoc.pm (file contents):
Revision 1.1 by williamc, Fri Dec 17 08:36:23 1999 UTC vs.
Revision 1.3 by williamc, Thu Jan 27 17:50:39 2000 UTC

# Line 4 | Line 4
4   # Originally Written by Christopher Williams
5   #
6   # Description
7 + # -----------
8 + # define a base document from which to get default ActiveDoc parameters
9 + # One of these need to be instantiated for each configuration area
10   #
11   # Interface
12   # ---------
13 < # new()         : A new StarterDoc object
13 > # new(ActiveConfig,userinterface,userquery)     : A new StarterDoc object
14  
15   package ActiveDoc::StarterDoc;
16   require 5.001;
# Line 29 | Line 32 | sub new {
32  
33   sub _init {
34          my $self=shift;
35 <        my $userquery=shift;
35 >        my $config=shift;
36          my $userinterface=shift;
37 +        my $userquery=shift;
38          
39 <        #-- All comunication with the outside world theorugh userquery object
39 >        #-- All comunication with the outside world through userquery object
40          $self->{Query}=$userquery;
41          $self->userinterface($userinterface);
42  
39        #-- Minimum requirements check
40        $dir=$self->{Query}->getparam('ActiveConfigdir');
41        while ( ! defined $dir ) {
42          $self->{Query}->querytype( "ActiveConfigdir", "basic");
43          $self->{Query}->querymessage("ActiveConfigdir",
44            "No Configuration directory Has Been Specified - Please enter a".
45                "suitable directory to use as workspace");
46        
47          $self->userinterface()->askuser($self->{Query});
48          $dir=$self->{Query}->getparam('ActiveConfigdir');
49        }
50
43          # set up default Configurations
44 <        $self->{ActiveConfig}=ActiveDoc::ActiveConfig->new($dir);
44 >        $self->{ActiveConfig}=$config;
45 >        $self->{ActiveConfig}->basedoc($self); # register as the basedoc
46 >        $self->_init2();#add a few things all docs should have
47          $self->init();
48   }
49  
50   sub init {
51          # dummy to be overriden
52   }
53 +
54 +
55 + #
56 + # oveerride the parseerror method so initiating calls dont break due to no url
57 + #
58 + sub parseerror {
59 +        my $self=shift;
60 +        $self->error(@_);
61 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines