On Jul 18, 2012, at 10:50 AM, Micah Martin wrote:
> Chuck,
>
> You can pass variable to partials.
>
> rows :id => 'rows' do
> __install 'entry_window/row_partial.rb', :id => 1
> __install 'entry_window/row_partial.rb', :id => 2
> __install 'entry_window/row_partial.rb', :id => 3
> __install 'entry_window/row_partial.rb', :id => 4
> end
>
> row do
> symbol_box :players => 'text_box', :id => "symbol_box_#{@id}"
> ...
> end
>
> However, it's not clean why you need an id on symbol_box. Players are automatically applied based on the name of the prop, not the id. Also, if you wanted other players, besides the one associated with the name of the prop, you can add the attribute to the prop.
>
> my_prop :players => "other_player"
> my_prop :players => ["other_player", "another_player"]
>
> The "id" of a prop is usually just marker so it can be found later.
>
> my_prop = scene.find("my_props_id")
>
> Hope this helps.
That helped immensely. I now have most of that working.
My next issue is loading gems that are packaged as part of the production. I discovered a few things.
1. In production.rb, limelight no longer uses a Production module and calls #production_opening, #production_loaded, etc. It calls #on_production_created, #on_production_loaded, etc.
2. Gems should be stored in <project>/__resources/gems/gems
In my #on_production_created method I am trying to load up gems. I have this code:
on_production_created do
require 'rubygems'
Gem.path << File.expand_path(gems_directory)
require 'uuid'
require 'ffi-rzmq'
require 'time'
require 'json'
end
It dies on the require 'uuid' call with this backtrace:
https://gist.github.com/3138120
The sandbox example did not show how to use this new feature so I'm kind of stabbing in the dark. I tried the same code minus the modification to Gem.path and it fails the same way. What's the right way to do this now?
cr