Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 4
»
Problem using list items for locations
Problem using list items for locations
Post Reply
Like
20
Problem using list items for locations
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Kolfers
Kolfers
posted 11 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 24,
Visits: 137
Hi all,
I'm currently using the Inquisit trial version to see if it will work for our needs, and I'm running into a little problem.
When trying to use a list to define the position of a text, I get very unpredictable behavior, that is
This will work perfectly:
<text stim_square>
/ items = letters
/ select = sequence
/ position = (list.xpositions.item(1), 50)
...
</text>
However, this won't work:
<text stim_square>
/ items = letters
/ select = sequence
/ position = (50,list.xpositions.item(1))
...
</text>
Throwing the following errors:
text.stim_square position Setting has invalid text ') '.
text.stim_square
Expression 'list.xpositions.item(1' is invalid. Unmatched parenthesis.
I'd think the two are perfectly equivalent, is this a parsing bug?
Thanks,
Kerwin
Reply
Like
20
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 108K
EDIT: I misread the code (missed the presence of the 2nd argument in the 2nd example). Indeed this looks like a parsing error. I apologize for the oversight. In any case, you can work around the issue by using /hposition and /vposition instead of /position as indicated below.
Define /vposition and determine /hposition dynamically.
<text sometext>
/ vposition = 50%
/ hposition = list.somelist.nextvalue
...
</text>
(Or something similar along those lines.)
Edited
11 Years Ago by
Dave
Reply
Like
19
Kolfers
Kolfers
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 24,
Visits: 137
Hi Dave,
Thank you for your response, I'm not sure if I understand correctly though:
it seems to me like I am giving two arguments, the only difference being whether I use the list item for the first or the second argument.
So this does in fact work:
(1)
/ position = (list.xpositions.item(1), 50)
While this does not:
(2)
/ position = (50,
list.xpositions.item(1)
)
In both cases list.xposition.item(1) = 50.
Ideally I would of course like to use the list item for both horizontal and vertical, I'm just trying to point out here that it throws the error when given the item as the second argument, but not when giving it as the first argument.
To exclude other possibilities, these all work:
/ position = (list.xpositions.currentvalue, list.xpositions.currentvalue)
/ position = (list.xpositions.nextvalue, list.xpositions.nextvalue)
Which seems to me to indicate that the parsing of the parenthesis in (2) are the problem. Which corresponds to the error messages.
I did manage to work around the problem. But I still don't understand why the above does not work. Either the (1) should not work either or (2) should work the same as (1)?
Reply
Like
19
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 108K
You are correct. I misread your 2nd example (overlooked the 2nd argument) and just corrected my response while you were apparently posting yours.
Reply
Like
20
Kolfers
Kolfers
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 24,
Visits: 137
Hi Dave,
Ok, good to know. Again thank you for the quick and helpful response, the alternatives you mentioned do the job!
cheers,
Kerwin
Reply
Like
20
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
20
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search