Can you do attribute referencing with colon notation for objects within slides?

840 views
Skip to first unread message

Adam Osth

unread,
Jul 6, 2009, 1:39:11 PM7/6/09
to e-p...@googlegroups.com
I ask the question in the subject line because I have tried attribute referencing with different objects and can't seem to get it to work.

I have slides with sounds that reference the attribute "Reference:0", so it reads as [Reference:0] under filename for a soundout.

Yet, everytime I try to run the program, it reads "The following error was found while attempting to compile the E-Basic script. Encountered: <identifier> Expecting: end of line."

Under the line that it's referencing, it reads: DemoSlide_SoundBuffer.Filename = "c.GetAttrib("Reference"

...when the syntax should be something like ... = c.GetAttrib("Reference:0")

Strangely, the compilation seems to work just fine without colon notation. Does anybody know why this might be?

Adam

David McFarlane

unread,
Jul 6, 2009, 2:44:58 PM7/6/09
to e-p...@googlegroups.com
Adam,

I tried and could not get this error to happen for me. If it were
me, at this point I would look *very* carefully at *exactly* what I
typed in to the Filename field, and try typing it in fresh, maybe
even delete the object and start over. When this sort of thing
happens to me I almost always find that I just mistyped something
that my eyes automatically look over, sometimes it's even a
non-printable character that gets stuck in there. If find your
example particulary odd because with that quote mark before the
c.GetAttrib, i.e., you say the script comes out as

DemoSlide_SoundBuffer.Filename = "c.GetAttrib("Reference"

but I cannot imagine any way of getting E-Prime to put that initial
quote mark there.

Finally, if you really get stuck you might have better luck with PST
Web Support at http://support.pstnet.com/e%2Dprime/support/login.asp .

Regards,
-- David McFarlane, Professional Faultfinder

David McFarlane

unread,
Jul 6, 2009, 2:52:30 PM7/6/09
to e-p...@googlegroups.com
Adam,

Oops, once again I spoke in haste. I did not really try making the
error with a slide sub-object, I got lazy and just used a SoundOut
object. I re-read your subject line more carefully (next time, do an
old guy like me a favor and fully restate your question in the body
of your message :) ) and just now tried it with a slide sub-object,
and indeed I now get your error, complete with that weird initial
quote mark, and that really stumps me. So I do suggest you submit
this to PST Web Suppport.

BTW, I got this error with EP1.2.1.847 (what version do you use?). I
have not tried this with EP2, I will do that next.

My humble apologies,

David McFarlane

unread,
Jul 6, 2009, 3:34:49 PM7/6/09
to e-p...@googlegroups.com
Adam,

Wow! I believe you really uncovered an oversight in E-Prime (I stop
short of calling it a "bug" because a bug would be a behavior that
fails to follow the design, whereas I suspect here that the makers of
E-Prime simply failed to include this feature in their design). I
tried this in EP2 (EP2.0.8.22) and got exactly the same error. More
specifically, colon syntax works just fine for a Text sub-object in a
Slide; a SoundOut sub-object produces the compile-time error that you
described; and with an Image sub-object you get the error "Unable to
load image" as soon as you apply the change in the Properties dialog
-- in this case it acts as if adding the colon makes the E-Prime GUI
no longer recognize the square brackets as introducing an attribute
reference. (I did not try a Movie sub-object in EP2.) I do not know
what would happen if you tried to work around this by using inline
script to do the colon syntax references with the sub-objects, I will
leave that as an exercise for the reader.

I did a search for "colon" on the PST Knowledge Base and did not find
any report about this, so I suspect PST does not yet know about this
problem. I may submit this myself to PST Web Support, but you should
not wait for me and you should submit this yourself. Good job in
finding and reporting this problem.

Hats off,

David McFarlane

unread,
Jul 7, 2009, 10:31:07 AM7/7/09
to e-p...@googlegroups.com
[Sorry to re-post this, but somehow my addition ended up as a fresh
post on the Google Groups page rather than getting added to the
original thread. In order to keep the thread whole I am reposting
this in what I hope is a proper fashion.]

Adam,

I may have a workaround for you. Let's suppose your Reference
attribute is in a nested list (and if it's not, then it really should
be). For the sake of discussion, let's call your main list
TrialList, the nested list NestList1, and your slide
StimSlide. NestList1 contains the attribute (column) Reference,
which you want to use with colon syntax in a SoundOut sub-object on StimSlide.

So, simply add another attribute (column) to TrialList, let's call
that MainReference. Then use your colon syntax to have MainReference
refer back to Reference in NestList1, e.g., [Reference:0]. Now in
your slide sub-object, just use a straight reference to
TrialList: [MainReference]. So you do not use any colon syntax in
the slide sub-object -- the slide sub-object refers to MainReference
in TrialList, which in turn refers (via colon syntax) to Reference in
NestList1. Whew!

I tried this and got no errors. So please give this a try and let us
know how it goes.

Thank you for an interesting and challenging question,

Reply all
Reply to author
Forward
0 new messages