View Single Post
  #1  
Old 09-20-2008, 08:19 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
GuiWindowCtrl bug/error.

For the life of me, I cannot figure out what's going wrong here. I'm creating 4 GuiWindowCtrls, and the first 3 work as intended. However, the fourth one is driving me crazy. Since Inverness is dealing with Ike, you guys will have to help me.

Here's the function that creates the controls. System.destroyobject(obj), checks to see if the object exists, then if so, it destroys it. All of the windows should not be visible, as their visibility is toggled by a fade script. However, if you look at the top left-hand corner, you will see a GuiTextEditCtrl and a GuiButtonCtrl.

It's either a really stupid mistake on my part (I tend to do that), or some kind of bug with Graal. As you can see from the engine log, TradeWindow4.fadein() does not exist, however fadein() is in the util_guifade class, which is joined to TradeWindow4 upon creation.

PHP Code:
function createcontrols() {
  
System.destroyobject("TradeWindow");
  
System.destroyobject("TradeWindow2");
  
System.destroyobject("TradeWindow3");
  
System.destroyobject("TradeWindow4");
  new 
GuiWindowCtrl("TradeWindow") {
    
this.join("util_guifade");
    
this.profile GuiGrayWindowProfile;
    
this.clientrelative true;
    
this.clientextent = {320,320};
    
this.canclose true;
    
this.canmaximize false;
    
this.canminimize false;
    
this.canmove true;
    
this.canresize true;
    
this.closequery false;
    
this.destroyonhide false;
    
this.= (screenwidth 2) - (this.width 2);
    
this.= (screenheight 2) - (this.height 2);
    
this.visible false;
    
this.alpha 0;
    
this.text "Your Offer";
    
thiso.catchevent(this.name"onMove""movewindows");
  }
  new 
GuiWindowCtrl("TradeWindow2") {
    
this.join("util_guifade");
    
this.profile GuiGrayWindowProfile;
    
this.clientrelative true;
    
this.clientextent = {220,320};
    
this.canclose false;
    
this.canmaximize false;
    
this.canminimize false;
    
this.canmove true;
    
this.canresize true;
    
this.closequery false;
    
this.destroyonhide false;
    
this.TradeWindow.TradeWindow.width 5;
    
this.TradeWindow.y;
    
this.visible false;
    
this.alpha 0;
    
this.text "TestAccount's Offer";
  }
  new 
GuiWindowCtrl("TradeWindow3") {
    
this.join("util_guifade");
    
this.profile GuiGrayWindowProfile;
    
this.clientrelative true;
    
this.clientextent = {120,80};
    
this.canclose false;
    
this.canmaximize false;
    
this.canminimize false;
    
this.canmove false;
    
this.canresize false;
    
this.closequery false;
    
this.destroyonhide false;
    
this.= (screenwidth 2) - (this.width 2);
    
this.= (screenheight 2) - (this.height 2);
    
this.visible false;
    
this.alpha 0;
    
this.text "Trade Invite";

    new 
GuiTextCtrl("TradeInvitationAccount") {
      
this.profile GuiGrayTextProfile;
      
this.text "From: TestAccount";
      
this.0;
      
this.0;
      
this.height 20;
      
this.width 120;
    }
    new 
GuiButtonCtrl("TradeInvitationAccept") {
      
this.profile GuiGrayButtonProfile;
      
this.text "Accept";
      
this.10;
      
this.25;
      
this.height 20;
      
this.width 100;
    }
    new 
GuiButtonCtrl("TradeInvitationDeny") {
      
this.profile GuiGrayButtonProfile;
      
this.text "Deny";
      
this.10;
      
this.50;
      
this.height 20;
      
this.width 100;
    }
  }
  new 
GuiWindowCtrl("TradeWindow4") {
    
this.join("util_guifade");
    
this.profile GuiGrayWindowProfile;
    
this.clientrelative true;
    
this.clientextent = {120,80};
    
this.canclose true;
    
this.canmaximize false;
    
this.canminimize false;
    
this.canmove false;
    
this.canresize false;
    
this.closequery false;
    
this.destroyonhide true;
    
this.= (screenwidth 2) - (this.width 2);
    
this.= (screenheight 2) - (this.height 2);
    
this.visible false;
    
this.alpha 0;
    
this.text "Account:";

    new 
GuiTextEditCtrl("TradeSendInviteAccount") {
      
this.profile GuiGrayTextEditProfile;
      
this.0;
      
this.0;
      
this.height 20;
      
this.width 120;
    }
    new 
GuiButtonCtrl("TradeSendInvite") {
      
this.profile GuiGrayButtonProfile;
      
this.text "Send";
      
this.10;
      
this.25;
      
this.height 20;
      
this.width 100;
    }
  }

Attached Thumbnails
Click image for larger version

Name:	GUI Window Screenshot.gif
Views:	111
Size:	160.8 KB
ID:	45938  
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote