Does "C" equal "C" ?
-
puts foo = 'foo: "' + foo + '"'
puts bar = 'bar: "' + bar + '"'Of course they are not the same.
-
@jim said:
try using
p str
orputs str.inspect
instead ofputs str
to see the exact string including the escape chars.Good idea, tho in this case it wasn't an escape chars issue.
@thomthom said:what is the intent of the code?
To replace a call to my routine with a better use of Ruby:
# this code works, PC and Mac, any way that __FILE__ was loaded pathname = File.expand_path( File.dirname(__FILE__) ) pathname = File.join( pathname, 'myFile.HTML' ) wd.set_file( pathname )
@unknownuser said:
puts foo = 'foo: "' + foo + '"'
puts bar = 'bar: "' + bar + '"'Of course they are not the same.
Snow-blind coder error.
-
Back to Uncle Holly stuff ... sigh
-
Everyone's done it. Yesterday I wrote this as an example:
def = Sketchup.active_model.selection[0].definition
-
@jim said:
Everyone's done it. Yesterday I wrote this as an example:
def = Sketchup.active_model.selection[0].definition
...and I can't see what's wrong... ...time to go home...
-
I'm glad that I've nevre mis-typed or mis-comprehended a single line of code, so I don't even begin to comprehend what you guys are talking about
-
-
duh! I would have seen that with syntax highlighting...
-
@unknownuser said:
@jim said:
Everyone's done it. Yesterday I wrote this as an example:
def = Sketchup.active_model.selection[0].definition
def
is a reserved word.WOW, good catch Todd, will you provided your eagle eye services to debug some of my code?
PS: i hope your rates are "reasonable"
-
@ Todd it seems that you are actually replying to ThomThom and not Jim and in that context your comment makes sense. The way you quoted it it looked like you where replying to Jim directly so looks like i am the boob here!
<<<<<<<<<<<<<|;-)
-
@martinrinehart said:
... I stumbled acrossthe Ruby
File.expand_path()
method that looks like a better replacement for the littlefixup()
function I wrote. If youFile.expand_path(__FILE__)
you get the full path back to the root, on a Mac, or the drive, on a PC. Perfect!If you look back at the original thread, and reread more carefully, you'll see ThomThom told you to use
File.expand_path()
two weeks before you "stumbled across" it!I've been wondering why you didn't take his advice... (and do you have a copy of the 'Pick-Axe' Ruby book in chm format?)
Advertisement