Will NOT scramble ??
-
@dan rathbun said:
@ksor said:
Now I can't use the danish special signs æøåÆØÅ instide a string without fooling the interpretor !
Are you saying that UTF-8 characters do not work inside scrambled rubies ???
Did you save your unscrambled rb file as "UTF-8 without BOM" (aka "ANSI as UTF-8"), before scrambling ???
What I say is that I used some ordinary danish characters æøåÆØÅ and the the interpretor crashed with a lot of errors !
If I saved with or without BOM ... how should I know !
Tell me WHAT I should save it as - and I hope this BOM or not could be set up automatic - where do I do that ?
I think I'll HAVE to spend more time looking at your lesson on this matter to get this BEEP up and running !
-
@ksor said:
@dan rathbun said:
@ksor said:
Now I can't use the danish special signs æøåÆØÅ instide a string without fooling the interpretor !
Are you saying that UTF-8 characters do not work inside scrambled rubies ???
Did you save your unscrambled rb file as "UTF-8 without BOM" (aka "ANSI as UTF-8"), before scrambling ???
What I say is that I used some ordinary danish characters æøåÆØÅ and the the interpretor crashed with a lot of errors !
If I saved with or without BOM ... how should I know !
It is on the Notepad++ Status Bar:
@ksor said:
Tell me WHAT I should save it as -
"UTF-8 without BOM" on the menu. (aka "ANSI as UTF-8" on the Statusbar):
@ksor said:
... and I hope this BOM or not could be set up automatic - where do I do that ?
see the topic on Notepad++:
[Info] Notepad++ : Tip, Tricks & Plugins -
Dan - again you are there right before the ship goes down - a really nice lesson you've done !
BUT ...
I tried to use it and create the folder structure and replaced my name for AUTHOR and my plugin name for WIDGET and when I run SU I get this completely non-sence error message, and I think I've carefully watched upper and lowercase - done the scrambling:
Error Loading File C:/Program Files/Google/Google SketchUp 8/Plugins/KSOR/Remskive/remskive_loader.rb
(eval):39:inrequire': uninitialized constant KSOR::Remskive::ABSDIRError Loading File KSOR_remskive_ext.rb (eval):39:in
require': uninitialized constant KSOR::Remskive::ABSDIRis it "remskive_loader.rb" that's wrong ? the file has 1 line !!!!!!!!!!!!!!!
OR
is it "KSOR_remskive_ext.rb" that's wrong ? line 39 is a COMMENT !!!!!!!!!!!!
OR
-
@dan rathbun said:
@ksor said:
@dan rathbun said:
@ksor said:
Now I can't use the danish special signs æøåÆØÅ instide a string without fooling the interpretor !
Are you saying that UTF-8 characters do not work inside scrambled rubies ???
Did you save your unscrambled rb file as "UTF-8 without BOM" (aka "ANSI as UTF-8"), before scrambling ???
What I say is that I used some ordinary danish characters æøåÆØÅ and the the interpretor crashed with a lot of errors !
If I saved with or without BOM ... how should I know !
It is on the Notepad++ Status Bar:
[attachment=1:1waa5u4s]<!-- ia1 -->NPP_Status_Bar.png<!-- ia1 -->[/attachment:1waa5u4s]@ksor said:
Tell me WHAT I should save it as -
"UTF-8 without BOM" on the menu. (aka "ANSI as UTF-8" on the Statusbar):
[attachment=0:1waa5u4s]<!-- ia0 -->Encode_Menu_NPP.png<!-- ia0 -->[/attachment:1waa5u4s]@ksor said:
... and I hope this BOM or not could be set up automatic - where do I do that ?
see the topic on Notepad++:
[Info] Notepad++ : Tip, Tricks & PluginsIt IS this encoding !
-
OK... in scrambled rbs files, both
__FILE__
and__LINE__
do NOT work. The Ruby standardException
classes (and all it's subclasses, includingLoadError
, use both of those functions.)SO... the info will be INCORRECT for rbs files, in any exception error message. (We have asked and asked Google to fix this.. but they have not yet done so.)
The first thing that happens is the reported error line numbers are off.
They are a sum of the number of lines into the first unscrambled file, plus the number of lines into the scrambled rbs file, where the actual error happened.But the reason for your specific error, is actually a
NameError
exception, that occured during a file load via arequire()
method call, sorequire()
re-raises the error as aLoadError
exception.Basically the problem is that a line in the rbs file.. cannot see the
**KSOR::Remskive::ABSDIR**
constant, so you must be sure that it is actually defined before ANY line tries to access it's value. -
@ksor said:
It IS this ["ANSI as UTF-8"] encoding !
OK.. so you believe that the scrambler cannot scramble and unscramble UTF-8 encoded files correctly ??
I have not yet tried it myself. (And never did say that it would work.)
All Google's extensions that they scramble, use a separate UTF-8 language strings file, that gets loaded with the
**LanguageHandler**
class (Hash
) wrappers. (It is defined in the "Tools/langhandler.rb" file.) -
@ksor said:
This code samples sucks more and more of just killing time ! ...
Dan - again you are there right before the ship goes down - ...Do not give up the ship !
You are learning a hell of a lot, in a very short period of time.
-
@ksor said:
Error Loading File C:/Program Files/Google/Google SketchUp 8/Plugins/KSOR/Remskive/remskive_loader.rb (eval):39:in
require': uninitialized constant KSOR::Remskive::ABSDIRError Loading File KSOR_remskive_ext.rb
(eval):39:inrequire': uninitialized constant KSOR::Remskive::ABSDIR
is it "remskive_loader.rb" that's wrong ? the file has 1 line !!!!!!!!!!!!!!!
Please post the one line "remskive_loader.rb" file (within a bbCode box.)
-
OH wait !!
I can see the problem... BANG! (shooting self.)
STUPID DUMB error on my part.
The constants need to be defined BEFORE the Sketchup's extension loader tries to load the
@path
file, in line 19 of the "_ext.rb" file !!I am sorry Keld.
I'll fix the example. Sheesh that was a dumb one.
(I had actually tested it with the "load on start" parameter, set tofalse
. So this error did not happen for me in testing.)DONE
-
@dan rathbun said:
OH wait !!
I'll fix the example. Sheesh that was a dumb one.
(I had actually tested it with the "load on start" parameter, set tofalse
. So this error did not happen for me in testing.)DONE
Now I see the contours of a TEMPLATE for future plugins made in THE RIGHT WAY in a HURRY - that's good practice I think !
Still I have some claims and I'll try figure it out myself before I seek you help
Advertisement