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 06-30-2008, 12:05 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Issues With HTML I Suppose

Recently, I've been working on something of a file editor for my own personal use during server developement. But, I seem to be having a problem when it comes to placing the data I've loaded from the server into a GuiMLTextEditCtrl you see. It's not quite having the effect I wanted. :O

Code:
PHP Code:
public function onNodeSelected(objnodenodeslashpathnodedotpath) {
  
temp.data null;
  
temp.text "";
  
  if (!
node.isfile) return;
  if (
node.filedata.length() > 0) {
    
player.chat "Have data!";
    for (
datanode.filedata) {
      
temp.text @= "<br>" data "</br>";
    }
    
FileEdit.text temp.text;
  }

PIC BELOW.
Attached Thumbnails
Click image for larger version

Name:	importantpic.png
Views:	187
Size:	89.0 KB
ID:	45053  
Reply With Quote
  #2  
Old 06-30-2008, 12:11 AM
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
Can you show us your creation method for FileEdit? (new GuiMLTextCtrl("FileEdit") {, etc)

Also, try debugging it using
NPC Code:

player.chat = temp.text;

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 06-30-2008, 12:14 AM
Stephen Stephen is offline
Boom!
Stephen's Avatar
Join Date: May 2004
Location: San Francisco
Posts: 10,410
Stephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud of
Quote:
Originally Posted by TheStan View Post
Recently, I've been working on something of a file editor for my own personal use during server developement. But, I seem to be having a problem when it comes to placing the data I've loaded from the server into a GuiMLTextEditCtrl you see. It's not quite having the effect I wanted. :O

Code:
PHP Code:
public function onNodeSelected(objnodenodeslashpathnodedotpath) {
  
temp.data null;
  
temp.text "";
  
  if (!
node.isfile) return;
  if (
node.filedata.length() > 0) {
    
player.chat "Have data!";
    for (
datanode.filedata) {
      
temp.text @= "<br>" data "</br>";
    }
    
FileEdit.text temp.text;
  }

PIC BELOW.
<br /> is the newline command in HTML. there is no </br> If you want your text to stay as you stylize it use the predefined tags

<pre>
dogs
cats
kittens
</pre>
__________________
Reply With Quote
  #4  
Old 06-30-2008, 01:15 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
Quote:
Originally Posted by Stephen View Post
<br /> is the newline command in HTML. there is no </br> If you want your text to stay as you stylize it use the predefined tags

<pre>
dogs
cats
kittens
</pre>
No no no, the problem is that the files are being saved with HTML tags in them, if I understand.
__________________
Reply With Quote
  #5  
Old 06-30-2008, 01:22 AM
Stephen Stephen is offline
Boom!
Stephen's Avatar
Join Date: May 2004
Location: San Francisco
Posts: 10,410
Stephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud of
Ah. Well all he's doing is putting new lines in - couldn't he just \n?
__________________
Reply With Quote
  #6  
Old 06-30-2008, 01:58 AM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Quote:
Originally Posted by Stephen View Post
Ah. Well all he's doing is putting new lines in - couldn't he just \n?
Ah, thank you Stephen. It turns out when I originall had tried that I had the slash the wrong way. :O
Reply With Quote
  #7  
Old 06-30-2008, 02:06 AM
Stephen Stephen is offline
Boom!
Stephen's Avatar
Join Date: May 2004
Location: San Francisco
Posts: 10,410
Stephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud ofStephen has much to be proud of
Quote:
Originally Posted by TheStan View Post
I had the slash the wrong way. :O
I do that all the time...
__________________
Reply With Quote
  #8  
Old 07-13-2008, 08:25 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
oh so do i, i was doing something on Era and i had /n instead of \n and it took me a few minutes to figure out why it didn't do a new line
Reply With Quote
  #9  
Old 07-14-2008, 07:18 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Don't see how people get / and \ confused considering one is used for division and commenting while the other is for special characters.
// This is a comment
"\\ This is a backslash"
__________________
Do it with a DON!
Reply With Quote
  #10  
Old 07-14-2008, 07:28 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
And you call yourself a scripter.
__________________
Reply With Quote
  #11  
Old 07-14-2008, 08:31 PM
TheStan TheStan is offline
Stan?
Join Date: May 2008
Location: U.S.
Posts: 100
TheStan is on a distinguished road
Send a message via AIM to TheStan Send a message via MSN to TheStan
Quote:
Originally Posted by Inverness View Post
And you call yourself a scripter.
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 10:22 PM.


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