Author Topic: Unable to reproduce Chat TextList [SOLVED]  (Read 7813 times)

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Unable to reproduce Chat TextList [SOLVED]
« on: February 15, 2014, 01:36:10 PM »
Hello,

first time i'm trying to realize a chat panel, the exemple inside NGUI looks really simple
but i'm unable to reproduce it and make it works...

each time i send a message, it is never written in the chat panel.

i made a short video to illustrate concretlly, if someone can see what i did wrong or missed...

http://www.youtube.com/watch?v=vHpGd0BZmXk
« Last Edit: February 19, 2014, 04:24:23 PM by blackant »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unable to reproduce Chat TextList
« Reply #1 on: February 16, 2014, 02:12:13 AM »
Well, did you set ChatInput.OnSubmit as the event notification delegate in the UIInput's On Submit section?

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Re: Unable to reproduce Chat TextList
« Reply #2 on: February 17, 2014, 11:54:28 AM »
yes, it is set:

On Submit
notify Text Enter
   - ChatInput.OnSubmit

Notify None()

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unable to reproduce Chat TextList
« Reply #3 on: February 17, 2014, 12:16:33 PM »
I suggest double-checking to see which ChatInput it's using. ChatInput can be added to any object has has a UIInput script attached. Put some Debug.Log statements inside ChatInput.OnSubmit. This one for example:
  1. Debug.Log(NGUITools.GetHierarchy(gameObject));

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Re: Unable to reproduce Chat TextList
« Reply #4 on: February 19, 2014, 04:24:03 PM »
thx, i finally fund the problem

the text is received correctly but it need  something like teen messages before the first appear.

it's because max line was set to 1.

by the way, when the game start, there is all the test message that prints:

the text list, testing line 26[-]
[AAAAAA]This is an example paragraph for
the text list, testing line 27[-]
[FFFFFF]This is an example paragraph for
the text list, testing line 28[-]
[AAAAAA]This is an example paragraph for

where do you remove this lines ?
« Last Edit: February 19, 2014, 04:48:00 PM by blackant »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unable to reproduce Chat TextList [SOLVED]
« Reply #5 on: February 20, 2014, 08:37:57 AM »
You can simply do a search for that line and find where it's coming from -- ChatInput.cs.