Have to restart pythonista after edit(s) to get the edits to work. Is there a solution?
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.
Posts made by Appletrain
-
Edits need restart
-
RE: segmented control
Thank you @cvp , I’ll give this a try. I saw several solutions similar to this but, I had no idea how to change them to python.
-
segmented control
Anyone know how to set the background color for a segmented
control to white? I can set it to blue or yellow or most any color except white. Looking on line I gather this was a recent development
with ios. Most of the solutions I’ve found seem like a lot of work for a color. -
RE: collections.Sequence
Thank you. That gives me another piece to the script I’m working on. I
never thought of “monkey patching” as I don’t use it much. -
RE: collections.Sequence
Great, thank you. I guess I should get familiar with objc.
-
RE: collections.Sequence
Thank you. Now I think I understand it. How do I get the result? I assume I have to call action somehow.
-
collections.Sequence
Using a copy of dialogs, get the following error: “collections has no attribute Sequence” and “collections.abc has no attribute Sequence”.
Any help?
-
mysql
Trying to install mysql connector and I keep getting the following error:
StaSh v0.7.4 on python 3.6.1
[~/Documents]$ pip install mysql-connector-python
Querying PyPI ...
Downloading package ...
Opening: https://files.pythonhosted.org/packages/f5/7a/88b5c614ea45d009b26b82ee2269ef0619d4aaf408328a7d7b2a906fc11e/mysql_connector_python-8.0.22-py2.py3-none-any.whlSave as: /private/var/mobile/Containers/Data/Application/C22B673E-B2E7-46C1-A1A6-B5AD5495E91E/tmp//mysql_connector_python-8.0.22-py2.py3-none-any.whl (374348 bytes)
[====================] 100.00% | 365.6KiB
Installing wheel: mysql_connector_python-8.0.22-py2.py3-none-any.whl...
stash: <class 'stashutils.wheels.WheelError'>: top_level.txt entry 'mysql' not found in toplevel directory!Has anybody run into this? Is there a solution?
-
RE: Tableview_select
@mikael, thank you, that took care of it. I had tried that, but I put it at the update function not the select function.
-
RE: Tableview_select
@mikael, this is about as stripped out as I can make it
def tableview_add(self): trxRec = {} result = {} # trxRec = {'account': self.selected_account} result = bucks_dialog(trxRec) # this works def tableview_update(self): result = {} trxRec = {} # trxRec = self.selected_item result = bucks_dialog(trxRec) # this blows out - self.container_view changes to None def tableview_did_select(self, tv, section, row): self.tableview_update() def transaction_action(sender): # sender is ui.button sender.tint_color = 'blue' ds.tableview_add()
Bucks_dialog is a custom form_dialogs from dialogs
Error is:
Pythonista3/Documents/Projects/bucks/bucks_form.py", line 217, in trans_type_action
self.container_view.name = segment_names[ind]
AttributeError: 'NoneType' object has no attribute 'name'self.container_view is none (form_dialog)
-
RE: Tableview_select
@mikael Thanks @mikael, doesn’t help. Same error, same place. What I can’t understand is why it works one place and not another. I stripped every thing out of the two functions so they are doing exactly the same thing. On blows up, the other does’t.
-
Tableview_select
I’ve written a custom input form sub-classed from input form dialog. It works fine stand alone. It also works fine when called from a button on my tableview form. When I call it from tableview select, it blows out. Somehow container_view becomes None. I’ve tried everything I can think of, including calling the button action. Any thoughts?
-
tableview_did_select
I’m launching a standard dialog from tableview_did_select
def tableview_did_select(self, tableview, section, row): self.selected_row = row self.selected_section = section print(dialogs.list_dialog('list dialog', items=['happy', 'days', 'are', 'here', 'again']))
This always returns None!
However, if it’s launched from a ui.ButtonItem on the same view it works properly and returns the selected item.
def cancel_action(sender): print(dialogs.list_dialog('list dialog', items=['happy', 'days', 'are', 'here', 'again'])) ui.end_editing() ds.container_view.close()
This always returns the selected item
Any suggestions on making tableview_did_select work?
-
RE: Simple (I think) alert dialog question
It crashes Pythonista. It’s a switch on a simple test form. Does’t do anything. Tap the switch and pythonista locks up.
-
Simple (I think) alert dialog question
[link text](link url)I hope someone can help on this.
This works...
def alert_action(sender): print('got here') #print(dialogs.alert('Change to inactive', 'Are you sure?', 'Ok')) input_frm['switch1'].action=alert_action
This doesn’t...
def alert_action(sender): print('got here') print(dialogs.alert('Change to inactive', 'Are you sure?', 'Ok')) input_frm['switch1'].action=alert_action
and it locks up Pythonista
I just can’t see what’s wrong.