Game Development Community

T3D 1.1 Preview PlayGui::onWake() Callbacks Do Not Function - not a bug - RESOLVED

by Steve Acaster · in Torque 3D Professional · 05/10/2011 (5:53 am) · 2 replies

T3D 1.1 Preview

win7 32bit

target:
PlayGui onWake callback

issue:
The onWake callback for PlayGui does not work.
It does not work in previous versions either, so not sure if this is on purpose - in which case it is not a bug - but I would have expected it to work like other *.gui files.

NOTE: onSleep() does not function either

repeat:
Open up art/gui/PlayGui.gui and at the bottom append this function.

function PlayGui::onWake(%this)//not working
{
   echo("*************PlayGui::onWake***************** you won't see this in the console");
}

Save, start up T3D, load a mission see playGui start, check the console, confirm that no echo is visible, discern that the function was not called. In the console type:
playgui.dump();
Hit return and scroll down to the bottom and see that it claims to have the callback "onWake".

Suggest:
If there is no specific reason for PlayGui not to have this callback -> fix it!
If there is a specific reason for PlayGui not to have this callback -> mark this report's title as "not a bug"


SOLUTION:

Problem was between chair and keyboard ...

#1
05/10/2011 (9:17 am)
It's probably because you've most likely got two onWake definitions in your code. The stock PlayGui::onWake lives in scripts/gui/playGui.cs. The onWake call is definitely working as a good chunk of the game wouldn't function without it.
#2
05/10/2011 (9:25 am)

DOH!


www.thecartoonpictures.com/data/media/30/homer_funny.gif
Listed as not a bug and moved to resolved.
:P