Thread: gui lister
View Single Post
  #2  
Old 02-27-2011, 07:18 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Well "this.bla1" won't work because this. will be referring to the test1_List, so you have to use thiso instead.

Quote:
Originally Posted by fowlplay4 View Post
No, only in the sections where you try to set GUI text to "this." values.

Reason: this. when used in the scope of another object refers to that object, so you have to get the values from the origin "thiso." object.

If you look at the output you'll see what's going on.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.example "Hello World!";
  new 
GuiWindowCtrl("Example") {
    
0;
    
0;
    
width height 200;

    
// Check F2 Logs for Output
    
echo("this.name: " this.name " this.example: " this.example);
    echo(
"thiso.name: " thiso.name " thiso.example: " thiso.example);

    
text thiso.example;
  }

If clientr.test is how you say it is, than it is an array and you can easily use a for each loop like this...

PHP Code:
clientr.test = {1234};
for (
temp.valueclientr.test) {
  echo(
temp.value); // echos: 1, 2, 3, 4

A quick guide for arrays: http://forums.graalonline.com/forums...21&postcount=4
__________________
Quote:
Reply With Quote