If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Ruby namespace best practice.
17 posts
• Page 2 of 2 • 1, 2
Re: Ruby namespace best practice.
Hmm,
did i miss something?
when i open ur
NoMethodError: undefined method 'open?' for
#<Trog::Door:0xa9a74f0 @open=false
did i miss something?
when i open ur
i always get the error:Simple Class Door.fsm
NoMethodError: undefined method 'open?' for
#<Trog::Door:0xa9a74f0 @open=false
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: Ruby namespace best practice.
Yes, that's right - I was demonstrating why Tronic's 'class method' style call would not work for an instance method - as in the comments...
- Code: Select all
# Trog::Door is a class, not a Door!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Ruby namespace best practice.
I understood... but even now?
- Attachments
-
- Class door.jpg (28.39 KiB) Viewed 14526 times
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: Ruby namespace best practice.
Aaah - now I see!
Didn't read my own API docs! - the correct method is, of course "is_open?" not plain old "open?" - D'oh!
Didn't read my own API docs! - the correct method is, of course "is_open?" not plain old "open?" - D'oh!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Ruby namespace best practice.
No prob -
i knew there must be a typo or...
ruby is 2 new 4 me - especially even w/o gems and some standard libs missing!
Even version conflicts/bugs inside ruby and the 'perfecto' editor in FS makes it more difficult 4 a beginner...
Keep on doing!
P.S: got an access denied error - damn where is that monster coming from (different schematic btw.)
i knew there must be a typo or...
ruby is 2 new 4 me - especially even w/o gems and some standard libs missing!
Even version conflicts/bugs inside ruby and the 'perfecto' editor in FS makes it more difficult 4 a beginner...
Keep on doing!
P.S: got an access denied error - damn where is that monster coming from (different schematic btw.)
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
Re: Ruby namespace best practice.
Walter Sommerfeld wrote:P.S: got an access denied error
What are you tying to access that it won't let you?
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Ruby namespace best practice.
It was a:
i changed it into this:
'Dir.mkdir(temp_subfolder_name) unless File.exists?(temp_subfolder_name) # make folder if not exist'
i changed it into this:
if File.directory?(temp_path) #sun mod 20130503
#do nothing
#watch 'temp_path exist', temp_path
else
#watch 'temp_path_dont exists', temp_path
Dir.mkdir(temp_subfolder_name) unless File.exists?(temp_subfolder_name) # make folder if not exist
end
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
17 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 79 guests