• kami

    Hi thanks a lot for the answer. But how can i access in this example:

    https://github.com/TutorialDoctor/Pythonista-Projects/tree/master/Projects/UI/Navigation View Tutorial

    from a def function an element of the actual pushed_view???

    I cannot find the elements??

    Please give an example.

    Thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    just another question. Is there any way to find out that i am back on the home screen? I just can push and store the subviews but how do i know that i am back on the home screen?

    Thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    thanks a lot. I think will use the variant with the named labels and try to locate them.

    The other example gives no information about the pushed label??

    But thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    i am trying to use the navigation view example from this adress:

    https://github.com/TutorialDoctor/Pythonista-Projects/tree/master/Projects/UI/Navigation View Tutorial

    My questions are:

    1. How can i find out which ist the loaded view in the navigation window? So from this example is it:

    connect('File','file_view')
    connect('Edit','edit_view')
    connect('Tools','toolbar')
    connect('Web','webview'),

    1. How can i access an element like a label on this view?

    Thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    i am not planning to put then into App Store. But the os.abort() is not working. How did you exit your apps?

    thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    i am just compiling some apps from Pythonista with the Xcode Template. Everything works fine but if i add a quit button in my screen the Frame just goes to background on the Iphone. Which command can i use to really exit the Xcode app?

    Thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    anyone here how can help me with the recieving problem? Thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    i am trying to write a chat client with a arduino controller. For now i am connecting to JDY-08 and sending the command on\n in hex. This works and the Arduino answer with "LED_on" but how can i recieve this string in Python???

    import cb
    import struct
    from pprint import pprint
    
    class MyCentralManagerDelegate (object):
        def __init__(self):
            self.peripheral = None
    
        def did_discover_peripheral(self, p):
            print('+++ Discovered peripheral: %s (%s)' % (p.name, p.uuid))
            if p.name and 'JDY-08' in p.name and not self.peripheral:
                # Keep a reference to the peripheral, so it doesn't get garbage-collected:
                self.peripheral = p
                cb.connect_peripheral(self.peripheral)
    
        def did_connect_peripheral(self, p):
            print('*** Connected: %s' % p.name)
            print('Discovering services...')
            p.discover_services()
    
        def did_fail_to_connect_peripheral(self, p, error):
            print('Failed to connect')
    
        def did_disconnect_peripheral(self, p, error):
            print('Disconnected, error: %s' % (error,))
            self.peripheral = None
    
        def did_discover_services(self, p, error):
            for s in p.services:
                print s.uuid
                if 'FE96' in s.uuid:
                    print('+++ Different Service found')
                    p.discover_characteristics(s)
                elif 'FFE0' in s.uuid:
                    print('+++ Arduino found')
                    p.discover_characteristics(s)
    
        def did_discover_characteristics(self, s, error):
            
            if 'FFE0' in s.uuid:
                pprint(s)
                for c in s.characteristics:
                    pprint(c)
                    if 'FFE1' in c.uuid:
                        print('Enabling Arduino Cmd1...')
                        self.peripheral.write_characteristic_value(c, chr(0x6F), False)
                        self.peripheral.write_characteristic_value(c, chr(0x6E), False)
                        self.peripheral.write_characteristic_value(c, chr(0x0a), True)
                        
                    elif 'AA01' in c.uuid:
                        
                        print('Enabling temperature sensor notifications...')
                        self.peripheral.set_notify_value(c, True)
            elif 'FFE3' in s.uuid:
                print('Enabling notifications for Simple Key Service...')
                
        def did_write_value(self, c, error):
            
            print('Did enable Arduino 1')
    
        def did_update_value(self, c, error):
            print('update:')
            pprint(c.value.encode('hex'))
            if 'FFE1' == c.uuid:
               
                print('Get value: %s' % c.value.encode('hex'))
                
            else:
                
                print('Nothing')
    
       
    delegate = MyCentralManagerDelegate()
    print('Scanning for peripherals...')
    cb.set_central_delegate(delegate)
    cb.scan_for_peripherals()
    
    # Keep the connection alive until the 'Stop' button is pressed:
    try:
        while True: pass
    except KeyboardInterrupt:
        # Disconnect everything:
        cb.reset()
    

    Thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    is there any UI-File Editor for PC to manage the pythonista UI Files without the Iphone or Ipad?

    Thanks a lot.

    Cu kami

    posted in Pythonista read more
  • kami

    Hi,

    it is working really fine with .whiteColor().

    Thanks a lot.

    Cu kami

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!