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.
Button proformance in GUI
-
@Phuket2 You could take out one more line... How?
-
btn_action = lambda sender: print(sender.value) ui.Switch(action=btn_action).present('sheet')
-
@Phuket2 thanks for the replies! I know I still have tons of reading/learning to do. I’ve been trying to set myself little goals to accomplish. I guess I was just making it more difficult than it is. And it works great with the little bit of code you suggested. Hopefully I’ll get this thing figured out...Thanks so much!
-
@xxfunxx , thats great. I was in a hurry when I did the post, after when I read it back I didn't like how I wrote it. This forum is full of helpful and respectful people. My comments were a little blunt, we as they should have been more encouraging. As I say, I was just in a hurry and didn't choose my words well.
Anyway, please keep posting. Many ppl here to help you help you out.
BTW, a lot of my posts have been all over the place in the past are often still are :) I am still learning so many things.
Anyway, have a great day and happy programming :) -
@cvp , thanks for answering :). If I didn't the answer, it would have done my head in for the afternoon :). I dont think I would have got it it actually as I do not use lambda functions. But I think to get the extra line out, my mind would have gone there as it pretty bare bones. But with your help I was able to get it to a single line of code:
@ccc, thanks for keep proding. It's always fun.
ui.Switch(action=lambda sender: print(sender.value)).present('sheet')
-
-
@cvp, while I like helping people here if I can. It can be difficult. You want to help, sometimes the best code(that you are capable of) is not the best way to help them. Often, i can write better concise code than I do when trying to help. But I consider concise code often more difficult to understand when you are starting rather than just some simple procedural code lines. It's tricky. You want to help without enforcing bad habits or less than optimal code to achieve a result. But sometimes i think its more useful
-
@Phuket2 I agree, completely
-
@xxfunxx said:
Hello. I wrote something a long time ago that might help you understand programming a bit better:
http://forum.maratis3d.com/viewtopic.php?id=868
and
http://forum.maratis3d.com/viewtopic.php?id=840 -
@TutorialDoctor thanks for the links I’m sure I will read them again a few more times. Pretty insightful. Thanks!