Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 07-20-2011, 04:48 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Changing the parent of a GuiTextListCtrl causes it to lose all its rows

When you add a GuiTextListCtrl inside a GuiScrollCtrl, then change the text list's parent using otherScroll.addParent, the text list no longer has any rows in it.

This is happening on the latest v6.

The following code can be used to replicate the problem:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  if (
Test_Window != null) {
    
Test_Window.destroy();
  }
  
  
// draw a window with two scrolls, one of which has a list in it
  
new GuiWindowCtrl("Test_Window") {
    
profile GuiBlueWindowProfile;
    
    
clientWidth 200;
    
clientHeight 200;
    
    
clientRelative true;
    
    new 
GuiScrollCtrl("Test_ScrollOld") {
      
profile GuiBlueScrollProfile;
      
      
width Test_Window.clientWidth;
      
height = (Test_Window.clientHeight 2) - 5;
      
      new 
GuiTextListCtrl("Test_List") {
        
profile GuiBlueTextListProfile;
        
        for (
temp.0temp.10temp.++) {
          
this.addRow(0"Row " temp.i);
        }
      }
    }
    
    new 
GuiScrollCtrl("Test_ScrollNew") {
      
profile GuiBlueScrollProfile;
      
      
width Test_Window.clientWidth;
      
height = (Test_Window.clientHeight 2);
      
      
Test_ScrollOld.height 5;
    }
  }
  
  
// now, move Test_List from Test_ScrollOld to Test_ScrollNew
  
echo("rows before: " Test_List.rows.size());
  
Test_ScrollNew.addControl(Test_List);
  echo(
"rows after: " Test_List.rows.size());

In F2, the output is:
Quote:
Originally Posted by F2
rows before: 10
rows after: 0
The expected output is:
Quote:
Originally Posted by F2
rows before: 10
rows after: 10
__________________
Reply With Quote
  #2  
Old 07-23-2011, 08:46 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
I'm really not sure what's causing this but I hope it gets fixed because it's really holding us back on some things for Ol' West. :S
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 07-23-2011, 09:46 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Not sure why it did this, but it was clearing itself when being removed from the parent. It will be fixed in the next version.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.