Hi all,
I'm having problems populating a listbox with text. The log is giving me an "Accessed None" error. Here's the relevant code (I'm using the runtime version):
The empty listbox shows up fine; when I click the button the log shows the "Button clicked!" message but immediately follows it with
ScriptWarning: GUIList Transient.GUIList9 (FunctionG UI.GUIListBase.Clear:001F) Accessed None
ScriptWarning: GUIList Transient.GUIList9 (Function GUI.GUIList.Add:0091) Accessed None
My guess is that somehow the variable isn't getting connected to the control in the MyList=MyNewList statement?
I'm having problems populating a listbox with text. The log is giving me an "Accessed None" error. Here's the relevant code (I'm using the runtime version):
Code:
var GuiListBox MyList;
function FillList()
{
MyList.List.Clear();
MyList.List.Add("Foo");
}
function bool ButtonClick( GUIComponent Sender )
{
Log "Button clicked!" );
FillList();
return True;
}
defaultproperties
{
Begin Object class=GuiListBox Name=MyNewList
bvisibleWhenEmpty=True
//Winwidth,height,wintop=blahblahblah
End Object
Controls(4)=GuiListBox'MyNewList'
MyList=MyNewList
}
The empty listbox shows up fine; when I click the button the log shows the "Button clicked!" message but immediately follows it with
ScriptWarning: GUIList Transient.GUIList9 (FunctionG UI.GUIListBase.Clear:001F) Accessed None
ScriptWarning: GUIList Transient.GUIList9 (Function GUI.GUIList.Add:0091) Accessed None
My guess is that somehow the variable isn't getting connected to the control in the MyList=MyNewList statement?