41 |
|
# set up data |
42 |
|
$self->{UserQuery}=$UserQuery; |
43 |
|
$self->{objectstore}=ObjectStore->new(); |
44 |
< |
$self->{treenode}=ActiveDoc::TreeNode->new("/"); # create a root node |
45 |
< |
$self->{treenode}->setassociate($self); |
44 |
> |
#$self->{treenode}=ActiveDoc::TreeNode->new("/"); # create a root node |
45 |
> |
#$self->{treenode}->setassociate($self); |
46 |
|
|
47 |
|
# set our cache area - and ask user if not |
48 |
|
$self->{defaultcache}=$self->inputvalue('cache'); |
49 |
|
while ( ! defined $self->{defaultcache} ) { |
50 |
< |
$self->asksingleinputvalue( "cache", |
50 |
> |
$self->{UserQuery}->setquery( "basic", "cache"); |
51 |
> |
$self->{UserQuery}->askuser( |
52 |
|
"No cache directory Has Been Specified - Please enter a". |
53 |
|
"suitable directory to use as a cache"); |
54 |
< |
$self->{defaultcache}=$self->inputvalue('cache'); |
54 |
> |
$self->setcache($self->{UserQuery}->getparam("cache")); |
55 |
|
} |
56 |
|
|
57 |
|
# Determine the UserInterface |
65 |
|
return $self; |
66 |
|
} |
67 |
|
|
68 |
+ |
sub setcache { |
69 |
+ |
my $self=shift; |
70 |
+ |
my $cache=shift; |
71 |
+ |
|
72 |
+ |
$self->{defaultcache}=$cache; |
73 |
+ |
} |
74 |
+ |
|
75 |
|
sub newdoc { |
76 |
|
my $self=shift; |
77 |
|
my $filename=shift; |
78 |
|
|
79 |
|
# Set up the required service objects |
80 |
< |
$self->{base}=BaseTags->new($filename); |
80 |
> |
$self->{base}=ActiveDoc::BaseTags->new($filename); |
81 |
|
$self->{base}->{tags}->addtag("DocType", \&DocTypeTag, "", ""); |
82 |
|
$self->{base}->{gc}->include("doctype"); |
83 |
|
$self->{base}->{gc}->uninclude("all"); |
96 |
|
|
97 |
|
sub addobj { |
98 |
|
my $self=shift; |
99 |
+ |
my $obj=shift; |
100 |
|
|
101 |
|
# --- Add to our local objectstore |
102 |
< |
$self->{objectstore}->add(@_); |
102 |
> |
#$self->{objectstore}->add(@_); |
103 |
|
|
104 |
|
# Now indicate weve found one |
105 |
< |
$self->{object}=shift; |
105 |
> |
$self->{object}=$obj; |
106 |
|
} |
107 |
|
|
108 |
|
sub defaultcache { |