Normal Topic Cannot use "@" in label (Read 851 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Cannot use "@" in label
May 14th, 2004 at 10:42pm
Print Post Print Post  
I have been trying to have an email address show up in a label for a static element.  But all text after and including the "@" character are dropped.

Line of text should be:
Send to rmhansense@sensiblesolutions.org
Actually get:
Send to rmhansense

First tried just by typing into the field for label.  Typing it in is OK, no indication of trouble.  But visually you can see that characters are dropped.

So I then tried programming the label on Form Entry.  Got the same results.
Quote:
LABEL(ElementName,"Send to rmhansense@sensiblesolutions.org")


Then I tried using @CHR(64), got same results.
Quote:
LABEL(ElementName,"Send to rmhansense" + @CHR(64) + "sensiblesolutions.org")


OK, need to get more complex I guess:
This:
Quote:
var vTemp as String
vTemp = "Send to rmhansense" + @CHR(64) + "sensiblesolutions.org"
Label(ElementName,vTemp)

and this:
Quote:
var vTemp as String
//vTemp = "Send to rmhansense@sensiblesolutions.org"
Label(ElementName,vTemp)
give the same results.

From page 8 of the Programming Guide, dealing with invalid field names:
Quote:
They contain operator characters. Sesame form element names cannot contain + - / * = < > [ ] ( ) { } ! ; @ and similar characters. They can include spaces, but it is not a good practice to do so. It is much better to use an underscore "_" between words, such as Home_Address or
Order_Number. If you find underscores distasteful, you can always use something like HomeAddress.

Keep in mind that we're talking about element names here -  that is, the identifiers you use to refer to them in programming. This shouldn't stop you from having a label next to an element, typed with a space like this:
Home Address:

I realize the example given is referencing "space" but would suspect that this applied to all of the invalid characters for field names, not just the space.  It specifically mentions that the invalid characters are for field names, and does not apply to Labels.

So, the question is: How do I get to use the "@" character in a label?
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Cannot use "@" in label
Reply #1 - May 15th, 2004 at 12:11pm
Print Post Print Post  
Double it: (i.e.: @@).

The "@" is used by FLTK (the library used to build the Sesame user interface) to indicate that a label is a "symbol label". It can used to make arrow labels, or VCR control button labels, etc...:

--------------------------------------------



The @ sign may also be followed by the following optional "formatting" characters, in this order:

    * '#' forces square scaling, rather than distortion to the widget's shape.
    * +[1-9] or -[1-9] tweaks the scaling a little bigger or smaller.
    * [1-9] - rotates by a multiple of 45 degrees. '5' and '6' do no rotation while the others point in the direction of that key on a numeric keypad.

Thus, to show a very large arrow pointing downward you would use the label string "@+92->".

-------------------------------------------

This was not disabled because it is too useful to get rid of. But, we do hope to transform it in SDesigner to *NOT* use another "micro-language" which must be learned and memorized.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Cannot use "@" in label
Reply #2 - May 15th, 2004 at 8:03pm
Print Post Print Post  
That did it Mark.Grin   Thanks for the solution, and thanks for the extra tools.  Grin Grin

Could I suggest that you make note of the @@ in the documentation section dealing with LABEL functions.?

And that image also needs to be inserted in it's own section.
I am adding both to my copy of the Documentation Addendum.

Also found that @0-9 also provides a set of arrow symbols.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Cannot use "@" in label
Reply #3 - May 17th, 2004 at 2:32am
Print Post Print Post  
Thats very cool. Thanks for the little secret!

Steve in Texas
  
Back to top
IP Logged