Hi,
I wonder if anyone can help me out?
I have a class defined as a module specification to deal with time
values. This extract shows the beginning.
functor
import Tk at 'x-oz://system/Tk.ozf'
export Time
define
class Time from BaseObject
................
The functor is compiled as 'Time.ozf' and works perfectly on it's own.
I have then tried to inherit from this to produce a specialised class I
need for a project. This is the beginning of that one.
functor
import Time at 'Time.ozf'
export AgentTime
define
class AgentTime from Time
.................
This is compiled as a separate functor 'Agenttime.ozf'
Both of these classes worked perfectly when they were developed in the
OPI but now I have them as functors, I can't seem to use them.
I've copied both functors to my ~/.oz/ directory, I've even tried ozl
Agenttime.ozf -o NewTime.ozf hoping that the linker would solve the
problem but whatever I do, when I try ('now($)' being a working method
within the inherited 'Time' class)
declare AgentTime
[AgentTime]={Module.link ['~/.oz/AgentTimeozf']}
{Browse {AgentTime.now $}}
The *best* I get is
%********************** Error: object system ********************
%**
%** Inheritance from non-class
%**
%** Non-class used as parent: 'export'(time:<C: Time>)
%** Class to be created: 'AgentTime'
%**
%** Call Stack:
%** procedure 'CheckParents' in file
"/usr/staff/raph/devel/trunk/mozart/share/lib/base/Object.oz", line 258,
column 6, PC = 166135836
%** procedure 'NewFullClass' in file
"/usr/staff/raph/devel/trunk/mozart/share/lib/base/Object.oz", line 292,
column 6, PC = 166106124
%** procedure in file
"/home/mark/Dev/Ozsource/agent/v3/in-progress/Agenttime.oz", line 1,
column 0, PC = 168489028
%** procedure 'RootManager,Pickle/fast' in file
"/build/buildd/mozart-1.3.2.20060615+dfsg/mozart/share/lib/init/Module.oz",
line 244, column 6, PC = 165890800
%** procedure in file
"/usr/staff/raph/devel/trunk/mozart/share/lib/base/Base.oz", line 92,
column 7, PC = 166009972
%**--------------------------------------------------------------
If anyone can help here I'd be extremely grateful. I feel like I've been
banging my head against a brick wall for the past few hours. I initially
wondered if there was some problem with the url for Time.ozf so I've
tried a number of different styles, none of which work!
Incidently, when I tried
import Time at '.oz/Time.ozf'
I got an error 'could not load functor at /home/mark/.oz/.oz/Time.ozf'
which seemed to be contra to the information at
http://www.mozart-oz.org/documentation/apptut/node4.html#chapter.modman
Regards
Mark R
--
Mark Richardson
Research Assistant
University of Teesside, UK
Email: [email protected]
[email protected]
Skype: mark.richardson.
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users