• DavinE


    IOS 14 is the Solution...
    It works Right there đź‘Ť

    posted in Pythonista read more
  • DavinE

    shit :( ^^

    posted in Pythonista read more
  • DavinE

    Then i Think its a problem with iOS 13+...
    I tested on an iPhone 13.6 and the Same signe...

    posted in Pythonista read more
  • DavinE

    I have literally a simple question... for you Guys ^^

    i Use Pythonista on both iOS Devices:

    iPhone Xs IOS: 13.1.1
    iPad Pro 4. gen. iPadOS 13.6

    when i use now the Home Screen function to run an Python Script on my iPhone it works well done...
    but on my iPad it pops an "Icon" up and asks to open in Pythonista.... how can i "remove" this ask to open....

    i serched in google but i don't found my solution... and i don't understood because both are the same settings in Safari...

    i Hope you guys can help me out


    i found the same pic like me:
    i think it is an IOS Issue ?

    posted in Pythonista read more
  • DavinE

    sry for the late reply.

    Yeah i know now ^^ but that's fine.. in the same function is only an hud_alert for 4sec and that's okay :D

    posted in Pythonista read more
  • DavinE

    @JonB Thanks for your reply...

    ui.in_Background is the solution... i missed it :(

    posted in Pythonista read more
  • DavinE

    Hello Guys,

    I got an Problem with console.alert...

    i have my mainView = ui.View
    and another NavigationView with another ui.View
    both in .present('fullscreen')

    what did i wrong with console.alert to use in the NavView...
    or is this not Possible ?

    console.alert('INFO Datensätze', f'Der Hersteller:\n[ {self.MANUFACTURER} ]\nhat nur noch [ {max_use - in_use} ] Freie Datensätze!\n[ {area_from} - {area_to} ]', 'weiter', hide_cancel_button=True)

    console.hud_alert don't work because the view is to small... for the \n

    maybe you guys have an idea how to solve it

    posted in Pythonista read more
  • DavinE

    i got my solution :D

    i need to ad this lines:

    tbv6_1.data_source.tableview_can_move= self.tableview_can_move
    def tableview_can_move(self, tableview, section, row):
            return True

    now it works like i will :D

    thanks @cvp for the help ;)

    posted in Pythonista read more
  • DavinE

    hay @cvp i think i missed something to say...
    i do not use the UI Designer!

    i tried it but i don't get it..

    here is my Code can you have a look on it maybe does you find something:

    self.QRCODES = [['0001', '+10'], ['0002', '-20'], ['0003', '+30'], ['0004', '-40'], ['0005', '+50']]
            mainView_selectProject_3 = ui.View(name='Auswahl des Projektes', bg_color='#3664a8')
            tbv6_1 = ui.TableView(name='Table_View', separator_color='black')
            #tbv6_1.editing = True
            tbv6_1.width = (self.WIDTH - self.tbv6_1_width)
            tbv6_1.height = (self.HEIGHT - self.tbv6_1_height)
            tbv6_1.x = ((self.WIDTH - tbv6_1.width) / 2)
            tbv6_1.y = ((self.HEIGHT * self.tbv6_1_y) / 100)
            tbv6_1.data_source = ui.ListDataSource(items=self.QRCODES)
            tbv6_1.data_source.tableview_cell_for_row = self.tableview_cell_for_row
            tbv6_1.data_source.tableview_delete = self.tableview_delete
            tbv6_1.data_source.tableview_number_of_rows = self.tableview_number_of_rows
            tbv6_1.data_source.tableview_number_of_sections= self.tableview_number_of_sections
            tbv6_1.delegate = tbv6_1.data_source
            tbv6_1.delegate.tableview_accessory_button_tapped = self.test1
            self.nav_view = ui.NavigationView(mainView_selectProject_3)
        #FUNKTION test1
        def test1(self, tableview, section, row):
            consoleOption = console.alert('Bearbeiten / Löschen', 'Möchtest du diesen Eintrag löschen oder Bearbeiten ?', 'Move', 'Bearbeiten', 'Daten eintragen', hide_cancel_button=False)
            if consoleOption == 1:
                tableview.editing = True
            elif consoleOption == 2:
                QRCODEtmp = tableview.data_source.items[row][0]
                del tableview.data_source.items[row]
                newCount = console.input_alert('Materialangabe', 'Bitte achte darauf als erstes - oder + anzugeben!!\nz.B. +3 oder -3', '', 'Eintragung in Liste', hide_cancel_button=True)
                if newCount == '':
                    newCount = 0
                tableview.data_source.items.append([QRCODEtmp, newCount])
                row = len(tableview.data_source.items) - 1
            elif consoleOption == 3:
        def tableview_delete(self, tableview, section, row):
            del tableview.data_source.items[row]
        def tableview_number_of_sections(self, tableview):
            return 1
        def tableview_number_of_rows(self, tableview, section):
            return len(tableview.data_source.items)
        #FUNKTION tableview_cell_for_row
        def tableview_cell_for_row(self, tableview, section, row):
            cell =ui.TableViewCell("subtitle")
            data_textLabel = tableview.data_source.items[row][0]
            data_detailTextLable = tableview.data_source.items[row][1]
            cell.bg_color = '#98FB98' if data_detailTextLable[0] == '+' else '#F08080'
            cell.accessory_type = 'detail_button'
            cell.selectable = False
                self.cur.execute("SELECT `manufacturer_designation__short` FROM `datanorm` WHERE `Barcode` = '{}'".format(str(data_textLabel)))
                for tmp in self.cur:
                    text_label_text = ' '.join(str(x) for x in tmp)
            except mysql.connector.Error as e:
                print(f'SELECT `manufacturer_designation__short` FROM `datanorm` WHERE `Barcode` = {str(data_textLabel)}:\n{e}')
                notification.schedule(message=f'SELECT Abfrage konnte nicht erstellt werden:\Barcode: {str(data_textLabel)}\nFehlerausgabe im Terminal', delay=5.0, sound_name='default', title='mysql.connector', subtitle='SELECT Fehlerhaft')
                console.alert('mysql.connector', f'SELECT Abfrage konnte nicht erstellt werden:\Barcode: {str(data_textLabel)}\nFehlerausgabe im Terminal')
            cell.text_label.text = text_label_text
            cell.detail_text_label.text = str(data_detailTextLable)
                cell.image_view.image = ui.Image.named(f'iob:clipboard_{self.IMAGE_SIZE}')
            except AttributeError:
            return cell

    on my sample the Red Delete Buttons pops up but not the Move "buttons"

    posted in Pythonista read more
  • DavinE

    Hey Guys,

    I don't find my issue i want to Move my Cells but nothing i tried works for me....
    In the Doku stand nothing about that...

    i tried it with:

    TableView.editing = True

    but here comes only a delete button....

    i hope anyone can help me out..

    p.s. in the pyui file i found this:

    "data_source_move_enabled" : true,

    but i don't know to use this :D

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!