Skip to content

Instantly share code, notes, and snippets.

@HyShai

HyShai/test1.py Secret

Created November 17, 2014 04:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HyShai/edfc8fd0a68ecfdfba34 to your computer and use it in GitHub Desktop.
Save HyShai/edfc8fd0a68ecfdfba34 to your computer and use it in GitHub Desktop.
test1.py
import clipboard, console, keychain, sys, ui, webbrowser, os
account_finder_view = ui.load_view('test1')
account_finder_view['foobar'].data_source = ui.ListDataSource({'title': str(x), 'accessory_type': 'detail_button'} for x in range(21, 30))
@ui.in_background
def info_tapped(sender):
console.alert(account_finder_view['foobar'].data_source.items[sender.tapped_accessory_row]['title'])
account_finder_view.present('fullscreen')
@jsbain
Copy link

jsbain commented Nov 17, 2014

import clipboard, console, keychain, sys, ui, webbrowser, os
@ui.in_background
def info_tapped(sender):
    console.alert(account_finder_view['foobar'].data_source.items[sender.tapped_accessory_row]['title'])

account_finder_view = ui.load_view('test1')

account_finder_view['foobar'].data_source = ui.ListDataSource({'title': str(x), 'accessory_type': 'detail_button'} for x in range(21, 30))

account_finder_view.present('fullscreen')

@jsbain
Copy link

jsbain commented Nov 17, 2014

That seems to fix both problems you mentioned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment