Forum Replies Created
-
AuthorPosts
-
June 3, 2019 at 9:19 pm in reply to: ‘How to use a spreadsheet’ tutorial – Experiment not loading #3697
Jeremy
KeymasterHi Grusha,
This is a topic I imported from the forums on the previous website, but somehow the replies got lost in the process. The solution, in Matthew’s case, was to open the CSV file from the project’s page, using the online editor, and simply save it without bringing any change to its content. That got rid of the byte order mark, which causes format compatibility problems.
Be aware though that seeing an endless “Loading, please wait” message can have different causes. I’m currently working on the next release of PennController, which comes with a debugger that prompts some helpful error messages. If you’re willing to try it, sync your project using the URL
https://github.com/PennController/Sync/
, making sure to replacemaster
in branch/revision with1.4
, which is the number of the next release (click Update from git repo in your project to unfold the repo url and branch/revision fields if you can’t see them). Be aware that it’s still a version under development though. If you need to come back to 1.3, just typemaster
back in branch/revision and sync again.Let me know if you have any questions!
Jeremy
Jeremy
KeymasterHi Roberto,
Well, it looks like I should go back to the
.settings.cssContainer
command and check how it ends up overwriting any CSS rules from the CSS file, which is definitely unexpected on my part.I understand though how it comes that only the first in a series of
.settings.cssContainer
commands ends up being effective (when called before the element is printed at least) it’s expected behavior (not sure it’s a desired feature though, maybe it should be cumulative instead). Anyway, if you need to pass multiple CSS rules at once, you can do this:newScale("scale", "1", "2", "3", "4", "5", "6", "7") .settings.before( newText("1", "very bad") .settings.css("font-size", "large") .settings.cssContainer({"margin-right": "30px", "vertical-align": "15"})
(By the way, I am not sure what you mean by “15” here—see the list of accepted values for vertical-align)
In any case, if you have the option of dealing with the CSS exclusively from within PennController.css, I would recommend doing so, as all CSS would be coming from a uniform source, and there should be no issues about ignoring/overwriting other rules that happen with
.settings.cssContainer
and.settings.css
.Jeremy
KeymasterYes, CSS rendering is not optimal with Scale elements. Assuming your scale’s height is 50px, you can add this to your PennController.css file:
.Scale-before .elementContainer, .Scale-after .elementContainer { line-height: 50px; }
Alternatively you could also call this on each of your Text elements before and after the scale:
.settings.cssContainer("line-height","50px")
Jeremy
KeymasterThis is definitely a bug, thank you for reporting it, I’ll fix it for the next release.
In the meantime, you can pass the labels directly: newScale("scale", "1", "2", "3", "4", "5", "6", "7")
and remove .labelsPosition("bottom") and that should do the trick.Jeremy
KeymasterAh, right, my bad, you probably want to remove PennController- between td. and Scale if you are going to use a file named PennController.css (though Ibex’s automatic class prefixation is a little bit shaky, so the global_ method is safe).
Jeremy
Keymaster1. I’m not sure why you say that you can’t put all the stimuli in one CSV file: you can use their labels (as defined according to the Item column) to determine their order in PennController.Sequence (maybe you want to use the endsWith function described in the original Ibex manual)
Re. the cross-table groups, support is currently shaky, I would say. If your Group column is the same in both tables (i.e. the different values appear in the same order in both tables’ columns) then I think it should automatically select the rows from the same group for all tables.
I will see what I can do to improve consistent cross-table group assignment.
2. At the moment, you cannot use .log with a non-PennController item.
Jeremy
KeymasterHi again (again!)
I think I need to update this method so it can be used more efficiently with the latest versions of PennController. The items that are generated by your code are automatically labelled by PennController.Template, using the Item column if there is a column named so in your table, or using “unlabeled” otherwise.
As a workaround for now, I would suggest you add a column named Item in your table and refer to the labels in PennController.Sequence (If I remember correctly, the labels will correspond to Item- concatenated to whatever you have in your Item cells).
Jeremy
KeymasterHi again,
The command .settings.cssContainer will not affect the elements within the container, but indeed the container itself. Using newScale(7).settings.cssContainter("border-style","solid 1px black") will only add a black border around the whole Scale element, not around the scale’s buttons.
For you to modify the scale’s buttons, you need to upload a file named PennController.css under css_includes with the right target, e.g.
td.PennController-Scale-scaleButton { padding:10 15 10 15; color:blue; border:1px solid gray; }
Jeremy
KeymasterHi,
Yes, you can definitely use native Ibex controllers within the PennController.Template command, as described in the documentation (second example—you don’t have to have two screens, you can use just one “Acceptability” controller instead).
Though to be fair, you can have boxes with PennController scales as well, using .settings.button. And I just realize now that I haven’t added the documentation page for this option, which I’m gonna fix ASAP.
You would probably want to play with the CSS though, as the default rendering is quite ugly. You can take a look at the Aesthetics documentation page to get a sense of how CSS works in PennController.Let me know if you need assistance with either of these two solutions.
Jeremy
Jeremy
KeymasterHi,
The documentation for test.complete can be found on the documentation here. When you want to look up a command for an element, go to its documentation page (in this case, the documentation page for the Html element). Or just use the search field on the top left corner of the website.
What you describe though sounds familiar. There was a bug like that in previous versions of PennController that I thought I had fixed in more recent versions. Which version of PennController are you using?
-
This reply was modified 5 years, 11 months ago by
Jeremy.
Jeremy
KeymasterHi Rachel,
Not sure about that, I don’t have access to iOS myself, but I know that Florian successfully ran Ibex experiments on his iPad before.
Can you open the javascript console and see what error messages you get?Jeremy
Jeremy
KeymasterHi,
TL;DR: use getHtml("info").test.complete() inside the wait command instead (and make sure the textarea has the class obligatory in your HTML file).
In the script you pasted, there’s no TextInput element named info1 created at any point, so your command getTextInput("info1") doesn’t refer to anything. There is an Html element named info, and maybe the content of your file info2.html contains an input box, but that doesn’t make it a PennController element in your trial (let alone an element named info1). Whenever you use a get* command in the script of a trial, you should have a corresponding new* command somewhere in the same script.
Jeremy
Jeremy
KeymasterHi,
I haven’t implemented a PennController-specific way to set progressBarText, but PennController is fully compatible with native IBEX, so you can simply use var progressBarText = "asdf"; instead
Jeremy
Jeremy
KeymasterHi!
Thank you for reporting this issue, I’ll try to see what I can do about it.
In the meantime, you can try to “play it safe” and use .settings.size(168) instead of .settings.size("auto").
Jeremy
Jeremy
KeymasterHi Katya,
The only explanation I can see at the moment is that, somehow, your .htaccess file does not do its job. Did you make sure that its filename is exactly .htaccess? For example, text editors sometimes automatically add a .txt extension when saving the file, and the extension might be invisible on your computer depending on your configuration.
Best,
Jeremy -
This reply was modified 5 years, 11 months ago by
-
AuthorPosts