class_one < class_two problem <.< [solved :D]

Started by Apidcloud, April 29, 2011, 12:41:59 pm

Previous topic - Next topic

Apidcloud

April 29, 2011, 12:41:59 pm Last Edit: April 29, 2011, 12:58:58 pm by Apidcloud
Hey there :P

I'm with a little problem here...

When I was starting rgss, I was told that parent classes should be able to acess child classes methods


Is this right? lol
Today I was doing some changes on Game_Event that descends from Game_Character, and from this last I can't acess Game_Event method, it raises 'NoMethodError' <.<

Why is this happening? xD

Thanks xD
Instead of wanting to be somebody else, rather become somebody else



"I will treasure the knowledge like a squirrel treasures acorns."


Gibbo Glast 2D Engine - The sky is no longer a limit

winkio

you have that backwards.  child has all the properties of parent, not the other way around.  So Event could access methods of Character, but Character can't access methods of Event.

Apidcloud

Instead of wanting to be somebody else, rather become somebody else



"I will treasure the knowledge like a squirrel treasures acorns."


Gibbo Glast 2D Engine - The sky is no longer a limit