Hey all,
Using the Grey Alien Games Framework, I've got a type for my playing card (TCard) extended from TSprite (has lots of good stuff for manipulating images).
TSprite has its own Create() function. When I try to redefine that in TCard, I get a compile error, "Overriding method differs by type." I tried resolving this by overloading TCard.Create()'s parameters, but it doesn't look like is supported in BlitzMax.
So... I know I could just run TSprite's Create() and then do an Init method for other things, but that causes problems for the way I currently have things set up. It'd be much easier to make this work if there was some way I can pass in extra info when calling TCard.Create().
I'm guessing one way around this is to, within TCard.Create(), call Super.Create() with some dummy parameters, cast that to create the TCard, and set all the fields for real. But that seems really kludgey. Anyone have any ideas?
Thanks. I can post code if needed, I just figured it wasn't worthwhile.
Using the Grey Alien Games Framework, I've got a type for my playing card (TCard) extended from TSprite (has lots of good stuff for manipulating images).
TSprite has its own Create() function. When I try to redefine that in TCard, I get a compile error, "Overriding method differs by type." I tried resolving this by overloading TCard.Create()'s parameters, but it doesn't look like is supported in BlitzMax.
So... I know I could just run TSprite's Create() and then do an Init method for other things, but that causes problems for the way I currently have things set up. It'd be much easier to make this work if there was some way I can pass in extra info when calling TCard.Create().
I'm guessing one way around this is to, within TCard.Create(), call Super.Create() with some dummy parameters, cast that to create the TCard, and set all the fields for real. But that seems really kludgey. Anyone have any ideas?
Thanks. I can post code if needed, I just figured it wasn't worthwhile.