Date index for Mar 2003


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [achievo] Overloading problem



Using the $this->m_type, I now get

*Fatal error*: Class unit_project: Cannot inherit from undefined class project in */usr/local/service/tidred/docs/achievo/modules/unit/class.unit_project.inc* on line *4
*
, where line 4 is


class unit_project extends project {

It looks like I must include class.project.inc, correct?

/Jonas

Ivo Jansch wrote:

Hi,

Jonas Lincoln wrote:

And of course, there is no node unit.project. I'd like to point to either project (naturally) or unit.unit_project. Is this a flaw in achievo, or have I missed something?


No this is a flaw. I'll look into what's the problem. In any case, there's a workaround:

Replace this:

>  function unit_project() {
>    $this->project();

with:

function unit_project()
{
  $this->project();
  $this->m_type = "unit_project";

The links created use this parameter to atkNode() to create the links.
This parameter is set to 'project' in the project baseclass.
So it goes wrong when you call $this->project() since it will then use 'project' as node name. This would be ok if it would then recognize that project is not in the unit module, but that's a second bug actually.


The second line resets the internal node type to the correct value.

It would be nice if the baseclasses would accept a parameter to their constructor to pass the new nodename ($this->project("myproject")), but that's not implemented at the moment.

Greetings,
Ivo



http://www.achievo.org/lists achievo.org - ©1999-2002 ibuildings.nl BV