Re: Weird string comparison problem...

2012-11-27 Thread Kay C Lan
On Wed, Nov 28, 2012 at 10:20 AM, Robert Sneidar wrote: > I find frustration is my worst enemy when trying to debug a difficult bit > of code. Taking a deep breath and going about things systematically helps > me a lot. > > Absolutely. Whether explicitVars is Off or On, typos are the least of my

Re: Weird string comparison problem...

2012-11-27 Thread Robert Sneidar
Alternately you can "put the variableNames" at the end of a misbehaving script to see if there are similarly spelled variables. One leg is both the same. The salient point here is that there are lots of ways to skin this cat. Part of the skillset of debugging is to develop ways to reveal differe

Re: Weird string comparison problem...

2012-11-27 Thread Kay C Lan
I know everyone has their preference, and at the moment I'm trying to ween myself onto explicitVars for a big project, but I have never understood the argument that you can't *see* these spelling errors. As soon as a script doesn't behave, in goes a breakpoint, and you stop inside the script and 'i

Re: Weird string comparison problem...

2012-11-27 Thread Peter M. Brigham
I just use Jacque's scriptpaint (see previous thread), now apparently built into lcStackBrowser. No more typos for variable names. Love it. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Nov 27, 2012, at 5:46 PM, Peter Haworth wrote: > On Tue, Nov 27, 2012 at 1:5

Re: Weird string comparison problem...

2012-11-27 Thread Peter Haworth
On Tue, Nov 27, 2012 at 1:54 PM, Ben Rubinstein wrote: > But this sort of thing is exactly why I like explicitVars/Variable > Checking/Strict Compilation Mode (LiveCode's confusing three names for the > same thing applied in subtly different ways). +1 Pete _

Re: Weird string comparison problem...

2012-11-27 Thread Robert Sneidar
I didn't use my eyes, I used logic. I thought I would try something new. ;-) But seriously, after looking at the output of the first part of the script it was easy to determine that all that was functioning as expected, so the only thing left was his content comparison. Something had to be wrong

Re: Weird string comparison problem...

2012-11-27 Thread Ben Rubinstein
On 27/11/2012 20:23, Paul Dupuis wrote: Bob, Thank you. I clearly need a new set of eyes! I'm very impressed with Bob's eyes - I certainly couldn't see it! But this sort of thing is exactly why I like explicitVars/Variable Checking/Strict Compilation Mode (LiveCode's confusing three names for

Re: Weird string comparison problem...

2012-11-27 Thread Mark Schonewille
Paul, Because in the last line you're writing tExpectedSouceName instead of tExpectedSourceName. An "r" is missing. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553

Re: Weird string comparison problem...

2012-11-27 Thread Paul Dupuis
Bob, Thank you. I clearly need a new set of eyes! On 11/27/2012 3:15 PM, Robert Sneidar wrote: > BTW GLX2 would have helped here with it's clairvoyance feature. Remo also has > this feature. Very handy to have GLX2 or Remo complete your variable and > command/function names for you. > > Bob >

Re: Weird string comparison problem...

2012-11-27 Thread Robert Sneidar
BTW GLX2 would have helped here with it's clairvoyance feature. Remo also has this feature. Very handy to have GLX2 or Remo complete your variable and command/function names for you. Bob On Nov 27, 2012, at 10:07 AM, Paul Dupuis wrote: > put (tActualSourceName = tExpectedSouceName) afte

Re: Weird string comparison problem...

2012-11-27 Thread Robert Sneidar
Because you misspelled tExpectedSourceName Bob On Nov 27, 2012, at 10:07 AM, Paul Dupuis wrote: > put (tActualSourceName = tExpectedSouceName) after msg ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscr

Weird string comparison problem...

2012-11-27 Thread Paul Dupuis
Using LC 5.0.2, I have a really weird string comparison error occurring. The following code: put length(tActualSourceName),length(tExpectedSourceName)&cr after msg repeat with i=1 to the number of characters in tActualSourceName if char i of tActualSourceName is not char i of t