2006/5/19, Patrick Spence <patrick / pkspence.com>:
> Still trying to get my head wrapped around the concepts regarding
> Modules, Classes and their methods.
>
> Once an instance of the MyErrorLogger::ErrorLogger class has been
> instanciated, shouldn't Komodo be displaying the intellisense for the
> object? Using the example below, when I type "errorLogger.", why isn't a
> list of the properties and methods of the object displayed?
>
> Back on topic, consider the following...
>
> #-- myErrorLogger.rb
> module MyErrorLogger
>
>   class ErrorLogger
>
>     def initialize()
>       puts "Instance of MyErrorLogger::ErrorLogger has been created"
>     end
>
>     def ErrorLogger.PostError(ex)
>       puts "Exception error message: " + ex.to_s
>     end
>
>   end # class ErrorLogger
>
> end # module MyErrorLogger
>
>
> #-- testErrorLogger.rb
> require 'myErrorLogger'
> include MyErrorLogger
>
> def testBed
>
>   #-- message is displayed in console window as expected
>   errorLogger = MyErrorLogger::ErrorLogger.new
>
>   #-- "undefined method 'PostError'" error gets thrown on this line
>   errorLogger.PostError(Exception.new("test error message"))

PostError is a method of MyErrorLogger::ErrorLogger, i.e. of the class
instance.  errorLogger is an instance of MyErrorLogger::ErrorLogger so
it cannot know this method.

Kind regards

robert