Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How to call 'self.__' outside of 'self'
-
This post is deleted! -
The .pyui file doesn't seem to be included in the gist.
-
This post is deleted! -
Looks like your problem is that you update the color in an instance on HockeyScene ................
But what you actually run is a new instance without the modified colors. See comment on gist.The other problem is that your players are only defined within setup, which doesn't run until you run the scene. You should define players within
__init__
if you want those attributes to exist. See. Y comment three comments ago!I think it would make more sense to have your scene class take as arguments in
__init__
, the colors, or maybe player objects, rather than trying to modify an existing HockeyScene object from your color picker ui. -
Could you show how I could have the scene class take as arguments in
__init__
? -
When I try to do it, no colors show up at all, and the scene loads quite a bit longer.
-
Some suggestions add to gist comments.
-
This gives me the error:
AttributeError: 'tuple' object has no attribute 'title'
-
That is because a
player_color_name
is a string like 'Red' or 'Gold'. If you pass in a string with one of the color names incolor_dict
that will work better then passing in a tuple. -
This post is deleted!