Game Development Community

Can't save gui control

by Paul Sprague · in Torque Game Engine · 07/07/2005 (9:28 pm) · 0 replies

I have a problem where I can't save a guicontrol, other controls which I haven't hand edited save fine.

The control loads and works just fine. Then I save it just gives me the only error message there is "The file may be read-only." which of course it isn't.

I when into the engine and set a break point in at the top of this console method:

ConsoleMethod(SimObject, save, bool, 3, 4, "obj.save(fileName, <selectedOnly>)")
{
   static const char *beginMessage = "//--- OBJECT WRITE BEGIN ---";
   static const char *endMessage = "//--- OBJECT WRITE END ---";
   FileStream stream;
   FileObject f;
   f.readMemory(argv[2]);

This gets called fine for other gui controls I save, but this 1 damn gui when i click save it doesn't even trigger the break point.

so somehow it's executing this method:
function GuiEditorSaveGuiCallback(%name)
{
   %obj = GuiEditorContent.getObject(0);
   
   // make sure it is saved...
   if(!%obj.save(%name))
   {
      MessageBoxOK("GuiEditor Save Failure", "Failed to save '" @ %name @ "'. The file may be read-only.");
   }
}

it clearly gets inside the if statement but it does it without calling the save function... I must have screwed something up really bad... :-)

i'm using tge1.3, if anyone has ever seen anything like this I would love to know how to fix it.

Thanks,
paul