Re: dialog entry problems

67 views
Skip to first unread message

pumpkinhead

unread,
Nov 3, 2012, 2:18:03 AM11/3/12
to psychop...@googlegroups.com
I can confirm that (PsychoPy 1.75.01, Ubuntu 12.10).
The coder component is much better now after some recent changes (Thanks!!!). But the "customize everything" box in the rating scale component got worse. It is barely one pixel you can click on to get a cursor inside the box (then you have to ctrl-A everything into an external editor to make changes).
Torsten


Am Freitag, 2. November 2012 16:32:27 UTC+1 schrieb drkitty:
I'm running PsychoPy 1.75.01 on a 64 bit Ubuntu 12.04 platform.  I've noticed that on the dialogs in Code Builder that the spacing is not optimal or able to be changed. I've attached 2 pngs of a text dialog and a ratings-advanced settings dialog. Note that in the text dialog I can only see one line at a time.  In the ratings-advanced settings dialog, the "customize_everything" is very small and unreadable. Changing the window size does not change the size in either dialog.  How can I fix this?

Jeremy Gray

unread,
Nov 5, 2012, 8:36:28 AM11/5/12
to psychop...@googlegroups.com
Thanks for the bug report, and for the confirmation. Its interesting that the code component does work -- that suggests a way to fix the text and customize_everything input boxes.

To try this:
1. look for builder.py in psychopy/app/builder/ and open in a text editor / IDE (such as the Coder)
2. look for line ~1649 "if label in ['text', 'customize_everything', 'Text']:"
3. just below that line, replace these three lines
    self.valueCtrl = wx.TextCtrl(parent,-1,unicode(param.val),
        style=wx.TE_MULTILINE,
        size=wx.Size(self.valueWidth,-1))

with these (paying attention to keep the proper indentation:
    self.valueCtrl = wx.stc.StyledTextCtrl(parent,-1, 
        style=wx.TE_MULTILINE,
        size=wx.Size(self.valueWidth,-1))
    if len(param.val):
        self.valueCtrl.AddText(unicode(param.val))

This seems to work for me on a mac, hopefully will on linux too. If it works, it should fix both the text and customize_everything issue at the same time.

--Jeremy


--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/X0g4_z9Qd28J.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

pumpkinhead

unread,
Nov 5, 2012, 10:19:37 AM11/5/12
to psychop...@googlegroups.com
Great. That worked!
Now there are 4 lines visible.
(there is no syntax highlighting... but maybe there is no need for that as it is only scale variables and no real code)
Thanks!

Jeremy Gray

unread,
Nov 5, 2012, 10:24:26 AM11/5/12
to psychop...@googlegroups.com
cool. I agree that there's no need for syntax highlighting (definitely not for text components). I'll add a fix, and hopefully it will make it into the next aug-update.


--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/OZ3GzXe7ANoJ.

drkitty

unread,
Nov 7, 2012, 7:28:53 AM11/7/12
to psychop...@googlegroups.com
Hmmm.  Sorry, but I can't find that line. I've attached a png of buider.py ranging from 1628-1661.  This is the file psychopy/app/builder/builder.py  -  Do I have the wrong file or?

drkitty

unread,
Nov 7, 2012, 7:30:31 AM11/7/12
to psychop...@googlegroups.com
Sorry, here's the png
builder_py.png

drkitty

unread,
Nov 7, 2012, 7:37:41 AM11/7/12
to psychop...@googlegroups.com
OK.  I've found it using Vi editor - it appears to be line 1333.  Will try it now.

Jeremy Gray

unread,
Nov 7, 2012, 7:50:02 AM11/7/12
to psychop...@googlegroups.com
that's the right file. use the text editor's "find" feature (or equivalent) to search for "customize_everything" (without the quotes) -- I think there's only one place in the whole file.

--Jeremy


To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/bNqJSRvWb1UJ.

drkitty

unread,
Nov 7, 2012, 8:04:11 AM11/7/12
to psychop...@googlegroups.com
Arrrgggg.  No luck.  I'm attaching the changed buider.py code. Maybe I screwed up the indentation?
builderpy_code_change.png

Jeremy Gray

unread,
Nov 7, 2012, 8:22:23 AM11/7/12
to psychop...@googlegroups.com
yes, the indentation is off. "if label == 'text': self.valueCtrl.SetFocus()" needs to be indented more (4 more spaces)


--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/eXbCXSy33ZAJ.

drkitty

unread,
Nov 8, 2012, 7:32:18 AM11/8/12
to psychop...@googlegroups.com
I'm feeling really stupid.  I've indented the line (see attached png) and I still have the spacing issue in Builder. I've just been quitting and restarting PsychoPy, is there anything else I need to do to get this code change to work?
builderpy_code_change-2.png
Reply all
Reply to author
Forward
0 new messages