Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
ankitgaur
Level 7

How to print “@“ Symbol in the XML label node?

We have developed one Roku web app and we want to add the functionality to Make login of user .
In App we will be getting Email address from the user. Which we want to display in xml label node.
We want to set email address suppose “abc@gmail.com” but it only displays “abc gmail.com” in the label node.

so how to display “@“ symbol in label node ?
0 Kudos
3 Replies
destruk
Level 10

Re: How to print “@“ Symbol in the XML label node?

You could try replacing it with the chr code.  "abc"+chr(64)+"gmail.com" ?

8.4 Chr (ch As Integer) As String
Performs the inverse of the ASC function: returns a one-character string whose character has the specified ASCII, or control. Example:
print chr(35) 'prints a number-sign #
Using CHR, you can assign quote-marks (normally used as string-delimiters) to strings. The ASCII code for quotes - is 34. So A$=CHR(34) assigns the value " to A$.
0 Kudos
ankitgaur
Level 7

Re: How to print “@“ Symbol in the XML label node?

Hi destruk,

Thanks for the reply.


We have tried the solution you provided but it still not showing "@" character of email address in the XML Label Node (Scene graph).
It successfully prints "@" character on the terminal.[/font]
Please provide any other solution for this scenario.
0 Kudos
belltown
Level 7

Re: How to print “@“ Symbol in the XML label node?

I don't think your problem is that the Label node does not display the "@" character -- because it does. Most likely, you're not passing an "@" character into the Label node's text field.

Try a simple experiment: create a plain Label node in your Scene, with a hard-coded value containing an "@" character, i.e. not read from your XML and not computed in any way.
https://github.com/belltown/
0 Kudos