Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-20-2007, 07:17 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Having trouble with GuiTextListCtrl

I'm making a party menu for Thamhic, and inside it I want a list of all the players in the party. But I'm having a bit of trouble with the GuiTextListCtrl()
PHP Code:
new GuiScrollCtrl(PartyListScroll) {
  
725;
  
extent = {165150};
  
hScrollBar "alwaysOff";
  
vScrollBar "dynamic";
  new 
GuiTextListCtrl(PartyList) {
    
0;
    
width 145;
    
fitparentwidth true;
    
clearRows();
    
addrow(1"Test");
    
setSelectedRow(1);
  }

The Text list doesn't show at all...a bit frustrating.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #2  
Old 07-20-2007, 07:33 PM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
dunno but maybe you have to do
profile = GuiBlueTextListProfile;
and/or profile = GuiBlueScrollProfile;
Reply With Quote
  #3  
Old 07-20-2007, 07:38 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Well, it would be the default profiles anyways, but I did try that earlier, with no luck.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #4  
Old 07-20-2007, 07:54 PM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
set height :P
Reply With Quote
  #5  
Old 07-20-2007, 09:01 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Yeah, I tried that too, and it didn't work.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #6  
Old 07-20-2007, 09:25 PM
HolySheepy HolySheepy is offline
Registered User
Join Date: Apr 2007
Posts: 68
HolySheepy is on a distinguished road
well, dunno worked for me lol
Reply With Quote
  #7  
Old 07-21-2007, 02:10 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Try this example inside the scroll - does it work?

PHP Code:
   new GuiTextListCtrl("Test_List") {
     
profile GuiBlueTextListProfile;
     
0;
     
width 140;
     
fitparentwidth true;
     
     
clearrows();
     
addrow(0,"TextList");
     
addrow(1,"Second line");
     
setSelectedRow(1);
   } 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 07-21-2007, 02:25 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Nope...here's the entire code:
PHP Code:
//#CLIENTSIDE
public function showParty() {
  
PartyMain.destroy();
  new 
GuiWindowCtrl(PartyMain) {
    
GraalControl.width 1800;
    
extent = {180350};
    
alpha .5;
    
text "  Party";
    new 
GuiScrollCtrl(PartyListScroll) {
      
725;
      
extent = {165150};
      
hScrollBar "alwaysOff";
      
vScrollBar "dynamic";
      new 
GuiTextListCtrl("Test_List") {
        
profile GuiBlueTextListProfile;
        
0;
        
width 140;
        
fitparentwidth true;
     
        
clearrows();
        
addrow(0,"TextList");
        
addrow(1,"Second line");
        
setSelectedRow(1);
      }
    }
  }

__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #9  
Old 07-21-2007, 02:44 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Something is "wrong" with your Scroll profile. I haven't really tried to find out what exactly, but if I add this to the ScrollCtrl it works.

PHP Code:
profile GuiBlueScrollProfile
So either do that, or try messing around with your current Scroll profile.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #10  
Old 07-21-2007, 03:17 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Didn't work. D: I had tried that already...
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #11  
Old 07-21-2007, 03:21 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Odd, as it worked when I was testing it. Try replacing your GuiScrollCtrl with this:

PHP Code:
 new GuiScrollCtrl("Test_ListScroll") {
   
profile GuiBlueScrollProfile;
   
10;
   
10;
   
width 160;
   
height 80;
   
hScrollBar "dynamic";
   
vScrollBar "dynamic";

Any luck?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #12  
Old 07-21-2007, 03:29 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Hmm, yes...wtf. o.o
Edit: It was the profile of the scroll o.0
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #13  
Old 07-21-2007, 03:45 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Like I said in my last post that you said wasn't working
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #14  
Old 07-21-2007, 04:55 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Yeah, but for some reason it didn't work before, but then it did after awhile. o.0
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #15  
Old 07-21-2007, 05:02 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quotations!
new GuiScrollCtrl("PartyListScroll") {...
new GuiTextListCtrl("PartyList") {...
Reply With Quote
  #16  
Old 07-21-2007, 05:12 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quotes are for pansies ;o

Well, they aren't needed, anyways.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #17  
Old 07-21-2007, 05:33 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by DustyPorViva View Post
Quotations!
new GuiScrollCtrl("PartyListScroll") {...
new GuiTextListCtrl("PartyList") {...
Doesn't matter. In fact, I believe its recommended NOT to use them - I can't remember which is the prefferd way of doing it.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #18  
Old 07-21-2007, 05:53 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Did you even try it to see if it fixed the problem?
EDIT: tested it, quotations=fix.
Reply With Quote
  #19  
Old 07-21-2007, 07:09 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Profiles are objects: quotations shouldn't matter at all...
Reply With Quote
  #20  
Old 07-21-2007, 07:11 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well I put it into a WNPC and I had the problem he described. Wrapped the names in quotations and it fixed the problem.
Reply With Quote
  #21  
Old 07-21-2007, 07:26 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quotations are only needed when you put a space in the name

eg.

needed
new GuiWindowCtrl( "My Window") {

not needed
new GuiWindowCtrl( My_Window) {

other than the space it doesn't matter at all if you have them or not
__________________
Deep into the Darkness peering...
Reply With Quote
  #22  
Old 07-21-2007, 01:00 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Anytime you make an object in Graal the only parameter required for the constructor is the name of the object, the global reference to the object is made from the name which is a string.

And don't put spaces in variable names, jeeze thats horrible considering the lack of documentation of Graal, I think Stefan would be the only one who actually knows how those are handled if they work at all.

The only reason it even works without the quotes is because Graal creates a variable if there isn't one.
__________________
Reply With Quote
  #23  
Old 07-21-2007, 01:03 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Spaces in variables does work.


Bad example (doesnt work):
PHP Code:
this.I love scripting true
Good example(s):
PHP Code:
makevar("this.I love scripting") = true;
this.("I love scripting") = true
__________________
Follow my work on social media post-Graal:Updated august 2025.
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 11:36 PM.


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