Normal Topic Popup Menu Truncates Email Addresses (Read 842 times)
BWETTLAUFER
Full Member
***
Offline



Posts: 216
Location: Cambridge, Ontario
Joined: Apr 9th, 2010
Popup Menu Truncates Email Addresses
Mar 10th, 2015 at 2:48am
Print Post Print Post  
Hey all,

I'm trying to build a very cool function into our Sesame customer management system -- we have a section to type a note and press a button to post it.  I'm looking to add another button that gives the option of posting the note and emailing it to a list of optional emails (client, management, etc).  But when I try to pull a list of emails, it truncates the email at the '@' symbol. 

What can I do to work around this?

Here's a snippet of my test code:

Code
Select All
// =======================================================
// Email Note To Chosen Person -- BW 2015-03-09
// ========================================================

if vEmailNote <> ""
{
	vEmailDest = "bwettlaufer@kingstondc.com;pmt@kingstondc.com"
	vEmailDest = @replace(vEmailDest, ";", @newline())

	PopupSelectPosition(4, @Xpos(DBEmail), @Ypos(DBEmail))
	vEmailChoice = @popupmenu(vEmailDest,"EMAIL DESTINATION? ______________________________ ")
}
 

  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Popup Menu Truncates Email Addresses
Reply #1 - Mar 10th, 2015 at 4:41am
Print Post Print Post  
You need to double it up like this:
vStr = @Replace(vStr, "@", "@@")

Then once a selection is made, undo it from the result like this:
vStr = @Replace(vStr, "@@", "@")
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Popup Menu Truncates Email Addresses
Reply #2 - Mar 10th, 2015 at 5:09pm
Print Post Print Post  
Several of the FLTK (our GUI library) use the '@' symbol to indicate a formatting string. Doubling it, tells FLTK that you want to use the symbol literally.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BWETTLAUFER
Full Member
***
Offline



Posts: 216
Location: Cambridge, Ontario
Joined: Apr 9th, 2010
Re: Popup Menu Truncates Email Addresses
Reply #3 - Mar 11th, 2015 at 3:07am
Print Post Print Post  
That did it ... thanks guys!
  
Back to top
IP Logged