Michael Neumann <mneumann / ntecs.de> writes:

> Lloyd Zusman wrote:
>>
>> [ ... ]
>>
>> /usr/local/lib/ruby/gems/1.9/gems/wee-0.7.0/lib/wee/utils/helper.rb:29:
>>       in `app_for': uninitialized constant Wee::Md5IdGenerator (NameError)
>>       from ./hello-wee.rb:22
>> Here's my code:
>>   #!/usr/bin/ruby
>>   require 'rubygems'
>>   require 'wee'
>>   require 'wee/pageless'
>>   require 'wee/utils'
>>   require 'wee/adaptors/webrick'
>>   class HelloWorld < Wee::Component
>>     def click
>>       @clicks = (@clicks || 0) + 1
>>     end
>>     def render
>>       r.h1.onclick_callback(:click).with("Hello World!")
>>       r.text "#{ @clicks || 'No' } clicks"
>>     end
>>   end
>>   app = Wee::Utils.app_for(
>>     HelloWorld.new.add_decoration(
>>       Wee::PageDecoration.new("Hello World")),
>>     :session => Wee::PagelessSession,
>>     :application => Wee::PagelessApplication
>>   )
>
> First argument of app_for is the root-component class, not an object
> thereof. An object does not work, as each session needs it's own root
> component object. So you should use a block:
>
>     app = Wee::Utils.app_for(
>       nil,
>       :session => Wee::PagelessSession,
>       :application => Wee::PagelessApplication
>     ) {
>       HelloWorld.new.add_decoration(
>         Wee::PageDecoration.new("Hello World"))
>     }
>
> That should work, despite that it look a little bit ugly ;-)

Thank you very much ... but sadly, I did this and got the same error
message (see above).

???

-- 
 Lloyd Zusman
 ljz / asfast.com
 God bless you.