Message from discussion
props.scene.find
X-BeenThere: limelight_users@googlegroups.com
Received: by 10.204.152.2 with SMTP id e2ls571883bkw.0.p; Mon, 23 Nov 2009
08:47:00 -0800 (PST)
Received: by 10.204.175.20 with SMTP id v20mr170510bkz.24.1258994819884;
Mon, 23 Nov 2009 08:46:59 -0800 (PST)
Received: by 10.204.175.20 with SMTP id v20mr170509bkz.24.1258994819854;
Mon, 23 Nov 2009 08:46:59 -0800 (PST)
Return-Path: <meyer.eri...@gmail.com>
Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227])
by gmr-mx.google.com with ESMTP id 11si261293bwz.11.2009.11.23.08.46.58;
Mon, 23 Nov 2009 08:46:58 -0800 (PST)
Received-SPF: pass (google.com: domain of meyer.eri...@gmail.com designates 209.85.220.227 as permitted sender) client-ip=209.85.220.227;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of meyer.eri...@gmail.com designates 209.85.220.227 as permitted sender) smtp.mail=meyer.eri...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-fx0-f227.google.com with SMTP id 27so6015395fxm.23
for <limelight_users@googlegroups.com>; Mon, 23 Nov 2009 08:46:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:in-reply-to:references
:date:message-id:subject:from:to:content-type;
bh=acFiEe7wc+YeIOyHImOzJasqSeHpVy3APAhaKyhO9jM=;
b=a6I7ICgpSXc+EvOqocsSPnTvmf6N2IhNLMJGUuxQsF6zuZb4jygF/5CAS02xl8F1aA
xfTghvmsLVMaxzZ+G6XZJSE98QUx/KGPvYk0kApBd8eHLd2VdIrfoXMTJJO3pn1Hyd2f
Q151C70NKcKiv2d3UiyIeQedbGjuXU6mJur28=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
b=eIVS2F6JMc2BeaWK96VJMQ7bIU49an6eI1ZO+AI79zzVuy21Q+vUouFeoL+wT6TMTW
p3Y8OHR1fVxzEie0WHJK4AunbGMRX5DlYldlchK/iL8g/500YWUWJ2fM8P4Z5Tjn+4Xz
WFGoi0+oUUKkVzSHT0ZtX7zbxjVU4F4A9yoPQ=
MIME-Version: 1.0
Received: by 10.216.85.143 with SMTP id u15mr1482358wee.205.1258994818667;
Mon, 23 Nov 2009 08:46:58 -0800 (PST)
In-Reply-To: <4103cd2b-f9bd-4261-9d24-de80bf089...@j9g2000vbp.googlegroups.com>
References: <4103cd2b-f9bd-4261-9d24-de80bf089...@j9g2000vbp.googlegroups.com>
Date: Mon, 23 Nov 2009 10:46:58 -0600
Message-ID: <1ad358610911230846t5d0de095ycbb05721ea8be...@mail.gmail.com>
Subject: Re: [limelight] props.scene.find
From: Eric Meyer <meyer.eri...@gmail.com>
To: limelight_users@googlegroups.com
Content-Type: multipart/alternative; boundary=0016e6da7db8f0d3ac04790c920c
--0016e6da7db8f0d3ac04790c920c
Content-Type: text/plain; charset=ISO-8859-1
The reason the display is nil the first time is because the new_date prop is
being built on the screen before the display. In the second version of the
props.rb file, the display is already on the screen when the new_date prop
gets extended.
Also, what is the reasoning behind using self.extended?
Eric
On Mon, Nov 23, 2009 at 7:51 AM, frpaulas <frpau...@gmail.com> wrote:
> I don't understand the following behavior...
> when my props.rb is...
>
> __ :name => "screen"
> buttons do
> newdate :text => "New", :width => "25%"
> thisweek :text => "This Week", :width => "75%"
> end
> display :id => "display", :text => "Welcome"
>
> and players file newdate.rb is...
>
> def self.extended(prop)
> prop.display = prop.scene.find("display")
> #prop.display.text = "WHAT"
> puts "PROP nil?: #{prop.display.nil?}"
> end
>
> prop.display.nil? yields true
> but when the props.rb is...
>
> __ :name => "screen"
> display :id => "display", :text => "Welcome"
> buttons do
> newdate :text => "New", :width => "25%"
> thisweek :text => "This Week", :width => "75%"
> end
>
> prop.display.nil? yields false.
> I would have expected both to yield false.
> what am I missing?
>
> Thanks for your help
> Paul+
>
>
--0016e6da7db8f0d3ac04790c920c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
The reason the display is nil the first time is because the new_date prop i=
s being built on the screen before the display.=A0 In the second version of=
the props.rb file, the display is already on the screen when the new_date =
prop gets extended.<br>
<br>Also, what is the reasoning behind using self.extended?<br><br>Eric<br>=
<br><div class=3D"gmail_quote">On Mon, Nov 23, 2009 at 7:51 AM, frpaulas <s=
pan dir=3D"ltr"><<a href=3D"mailto:frpau...@gmail.com">frpau...@gmail.co=
m</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I don't under=
stand the following behavior...<br>
when my props.rb is...<br>
<br>
__ :name =3D> "screen"<br>
buttons do<br>
=A0newdate :text =3D> "New", :width =3D> "25%"<b=
r>
=A0thisweek :text =3D> "This Week", :width =3D> "75%&=
quot;<br>
end<br>
display :id =3D> "display", :text =3D> "Welcome"<=
br>
<br>
and players file newdate.rb is...<br>
<br>
=A0def self.extended(prop)<br>
=A0 =A0prop.display =3D prop.scene.find("display")<br>
=A0 =A0#prop.display.text =3D "WHAT"<br>
=A0 =A0puts "PROP nil?: #{prop.display.nil?}"<br>
=A0end<br>
<br>
prop.display.nil? yields true<br>
but when the props.rb is...<br>
<br>
__ :name =3D> "screen"<br>
display :id =3D> "display", :text =3D> "Welcome"<=
br>
buttons do<br>
=A0newdate :text =3D> "New", :width =3D> "25%"<b=
r>
=A0thisweek :text =3D> "This Week", :width =3D> "75%&=
quot;<br>
end<br>
<br>
prop.display.nil? yields false.<br>
I would have expected both to yield false.<br>
what am I missing?<br>
<br>
Thanks for your help<br>
Paul+<br>
<br>
</blockquote></div><br>