Game Development Community

Having to TAB/ENTER away from input box before saving

by Ty Newton · in Torque Game Builder · 01/23/2007 (2:44 pm) · 2 replies

Hi,

I ran into the *feature* where I have to TAB or ENTER out of an input box, in TGBX, before the value is accepted. This has caused me some grief when saving levels: the data I have entered isn't saved and I get weird problems. I posted on the TGBX forums and was told about this *feature* so I decide to have a look at the code to see if I can fix it. Here's the post I put on the TGBX forum; it was suggested that I move it here since I am discussing the inner working of TGB.


I just had a quick look at the code for TGB. Unfortunately like most programs I've looked at there is woeful documentation. If GG strip the in-code doco on purpose can I get an unstripped version please?

In any case, I muddled through for a little while and came to this conclusion. Please correct me if I'm off on the wrong track.

- a scenegraph is created that abstracts a container holding all the objects in TGB
- if I were to traverse the graph I could find all the user editable controls (I may have to add a way to identify user editable controls)
- if I force all the controls to poll for their current state when 'save' or 'save as' is called then I should get fully up to date data (I may have to add a way for the controls to poll for their current state).

It looks like TGB currently has the controls telling something (not sure how this fits together) that they have been changed and this triggers their state to be retrieved when 'save' or 'save as' is called.

#1
01/23/2007 (7:38 pm)
I'm not all that familiar with the c++ part of the engine, but are you talking about a scenegraph in the general, graphics sense of a scenegraph or in the sense of T2DScenegraph. Because if you mean T2DScenegraph then it does not contain any of the gui stuff.

#2
01/24/2007 (2:44 pm)
Hi, I was thinking of the T2DScenegraph. hmmm.

I have to get it to compile first and then I'll have another look for a way to get the 'save'/'save as' to pickup changes to edit controls without the user having to TAB/ENTER out of the control.