-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Using the extends method, and upon calling self:super("init",params) from within my extended class' init function It appears to recursively call.
[ERROR] gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7: stack overflow
1. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
2. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
3. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
4. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
5. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
6. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
7. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
8. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7
9. super - gamemodes/inpsb/gamemode/classes/../classes/hudpanel.lua:7HudPanel.lua:
local HudComponent = GM.class.getClass("HudComponent")
local C = HudComponent:extends()
function C:init(x, y, width, height, backgroundColor, autosize)
self:super("init",x, y, width, height)
... etcHudComponent.lua:
local C = GM.LCS.class()
function C:init(x, y, width, height)
self.x = x
self.y = y
... etcI can't see anything wrong with that as a class extension, any help is much appreciated.
NB - Not sure if I've given you enough to diagnose the issue here, but I would have to put the whole system on otherwise, due to the way I integrated the class system into my creation system.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels