Tab is being added to my link.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Tab is being added to my link.

Post by shawnblc » Sun Jun 14, 2015 8:38 pm

Here's part of my code. Notice in the second code section how I have a `tab` in my link. How can I correct this?

Code: Select all

tDate & tDash & tCategory & tDash & tFileName & tDash into tDestination
the above tDash is simply a -

Code: Select all

Correspondence						-Logo.jpg
When I click the link %09%09%09%09%09%09 is in the URL.

Using OSX 10.10.3 and LC Commercial 7.0.5 Build 10034.

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Tab is being added to my link.

Post by SparkOut » Sun Jun 14, 2015 10:36 pm

You have missed a bit in copy/pasting the line so there may be something in the code, but I would guess at first you need to check the data that's coming in.
if you answer tDate and tCategory and tFilename before trying to construct tDestination, does it look like there is valid content?
It looks like your result is tCategory, 6 tabs and a dash and tFilename. This makes me wonder if tCategory is being retrieved from wherever correctly, and maybe there are some %08 (backspaces) included in the beginning of the string wiping out the date and previous dashes and some %09 (tabs) included after it.
Oh wait. There should be an extra dash after the filename too?
Answer tDash too - is it really just a "-" character?
To strip out any strange characters at the beginning and end of the data values, try

Code: Select all

function fnW pText
   return word 1 to -1 of pText
end fnW

put fnW(tDate) & fnW(tDash) & fnW(tCategory) & fnW(tDash) & fnW(tFileName) & fnW(tDash) into tDestination
Apart from that, I'm not sure. We could do with a little more sample data, and code.

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Tab is being added to my link.

Post by shawnblc » Sun Jun 14, 2015 11:06 pm

I copied my option menu items to TextWrangler and noticed that every menu item had a tab after the text. I corrected it in TextWrangler and pasted it back to the optionMenu. All is well now. Thank you for the response.

Post Reply