fundamental misunderstanding

8 views
Skip to first unread message

frpaulas

unread,
Nov 10, 2009, 12:15:55 PM11/10/09
to limelight
I am missing something key here. I have a props.rb file with a couple
of props in it (nextweek, showdate) and a player file (nextweek.rb).
In the module Nextweek I say...
prop = scene.find('showdate')
hoping eventually to change the text of the date, but prop is always
nil.

What am I missing here?

emeyer

unread,
Nov 10, 2009, 1:13:39 PM11/10/09
to limelight
Can you show how your props.rb file looks? From what I can
understand, I would have to guess you aren't giving the props id's,
and scene.find("showdate") looks for the prop with the id of
showdate. To give a prop an id of showdate, you need to pass it in as
an option.
Example props.rb:
showdate :id => "showdate"
showdate :id => "showdate2"

The first part sets the name of the prop and what player defines its
behavior.
scene.find("showdate") will return the first prop.
scene.find("showdate2") will return the second prop.
scene.find_by_name("showdate") will return an array containing both
props.

Eric

Paul Sutcliffe

unread,
Nov 10, 2009, 3:05:56 PM11/10/09
to limelig...@googlegroups.com

On Nov 10, 2009, at 1:13 PM, emeyer wrote:

> Example props.rb:
> showdate :id => "showdate"
> showdate :id => "showdate2"

That is what I missed.
Like I said, fundamental.
I had thought that just declaring a prop such as...
prop_1 :text => "Hello"
would make prop_1 findable.
Thank you for the help!

Calvin Spiff.jpg
Reply all
Reply to author
Forward
0 new messages