About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
Chatbox issues
Author Message
dbuman Offline
Member

Post: #1
Chatbox issues
I am having trouble with a chatbox. I have it functioning for the most part, but when i set the text in the region to the textline, it comes out like "0x0353443" or something. I have a feeling there is a conversion error.

What could cause this?
06-30-2011 03:42 AM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #2
RE: Chatbox issues
you're probably setting the text to the address of the textline. Check if you there's a & there and remove it.
06-30-2011 03:58 AM
Find all posts by this user Quote this message in a reply
dbuman Offline
Member

Post: #3
RE: Chatbox issues
well when I take it out, it come up with an error. for example it says Cannot convert EE:Button to EE:Button.

Code:
Region *chatlog;
TextLine *chattext;
Text *chatlog1;
Button *enter;

Code:
chatlog=&gui_objs4.getRegion("chatlog");
      chattext=&gui_objs4.getTextLine("chattext");
      chatlog1=&gui_objs4.getText("chatlog1");
      enter=&gui_objs4.getButton("enter");
(This post was last modified: 06-30-2011 05:07 AM by dbuman.)
06-30-2011 05:02 AM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #4
RE: Chatbox issues
leave the & there though, you need it for TextLine *, else they will be two different types and compiler won't allow that.

is it always 0x0353443 no matter what you type? are you setting the text on the region (updating it) each time after you hit enter/etc? ie: chatlog1->set(chattext->operator ()()); 0x0353443 could be a null value
06-30-2011 08:11 AM
Find all posts by this user Quote this message in a reply
dbuman Offline
Member

Post: #5
RE: Chatbox issues
I have enter as a button function, and when I hit it, it adds more.

So its adding addresses and not actual text. Why would it do that?
Meh, I did it again! lol

so in addition to this code, I had to add this:

Str text = gui_objs4.getTextLine("chattext")();

then do:

chatlog1.set(S+text);

bam!, set.
now the next issue is to set it so it will scroll with the text if it excedes the region, how would I do that?
(This post was last modified: 06-30-2011 02:18 PM by dbuman.)
06-30-2011 01:50 PM
Find all posts by this user Quote this message in a reply
Post Reply