Replies

rmakarev
25 Jan 2013, 16:08

Hello,

It would be a great solution. I do not need attributes in base classes. However the inheritance is still very important for me so I hope you can remove inheritance limitations in recent cAlgo updates.


Thanks.


@rmakarev

rmakarev
25 Jan 2013, 16:07

Hello,

I would be a great solution. I do not need attributes in base classes. However the inheritance is still very important for me so I hope you can remove inheritance limitations in recent cAlgo updates.


Thanks.


@rmakarev

rmakarev
24 Jan 2013, 01:49

Thanks a lot!

The actual reason is that I have a few robots inhereted from BaseRobot. BaseRobot contains some core functionality for advanced logging and configuration of my robots. This is about the object-oriented architecture of my system built on top of cAlgo. I do not want to merge all things to a single class and duplicate the code.

I have a couple of ideas how to change my architecture and work around your new limitation but I would prefer to keep it as is.

Just let me know if you are not going to remove the limitation or you want to change it back so I can change my code accordingly.

Thank you!


@rmakarev

rmakarev
24 Jan 2013, 01:30

Great! Awaiting the update!


@rmakarev

rmakarev
23 Jan 2013, 15:21

Hello,

I tried to recomplile my DLL many times. It does not work out.

The the problem is reproducible if my robot in cAlgo extends BaseRobot (from my own DLL) that extends Robot.

It works without any problems if my robot in cAlgo extends Robot directly.

I also tried to create a local instance of BaseRobot in OnStart() method in cAlgo:

 

class RobotInCAlgo : Robot

{

  OnStart()

  {

    Robot r = new BaseRobot();

  }

}

The code above also works perfect (without any class cast issues) which means that BaseRobot was correctly inherited from Robot.

I have a suspicion that cAlgo assembly loader checks if the parent is Robot and fails if it is not. In my case robots in cAlgo have BaseRobot as a parent class which causes the described problem.

 

It seems to be a problem of the latest cAlgo update.

 

Thanks.


@rmakarev

rmakarev
22 Jan 2013, 23:16

Hello,

I have a project in Visual Studio 2012 (DLL). My DLL contains class BaseRobot. BaseRobot is a direct subclass of cAlgo.API.Robot. I add a reference to my DLL and use my class BaseRobot as a superclass for all my robots in cAlgo. It used to work without any problems but know it does not work. I have a suspicion that the problems are caused by a recent cAlgo update.

Technically it seems to be caused by the fact that my robots in cAlgo are NOT DIRECT subclasses of cAlgo.API.Robot but they are subclasses of my own BaseRobot that is a DIRECT subclass of cAlgo.API.Robot. Everything seems to be correct on my side.

Is there any requirement to extend cAlgo.API.Robot ONLY DIRECTLY ???

Thanks.


@rmakarev