• robertiii

    I can get the ui to change for a device getting connected, but not when I turn the device off. How can I detect that the device has been turned off and is no longer connected to the iPad

    posted in Pythonista read more
  • robertiii

    Thank you!!!!!!!

    posted in Pythonista read more
  • robertiii

    Strangely enough it does work if called from a button action....

    posted in Pythonista read more
  • robertiii

    When I try to use the sendData function, I get an error stating that nonObject has write_characteristic_value.

    class bellRinger (object):
        def __init__(self):
            self.peripheral = None
            self.characteristic = None
    
        def did_discover_peripheral(self, p):
            if p.name and 'School Bell' in p.name and not self.peripheral:  #Change Name Here
                self.peripheral = p
                peripheral = p
                cb.connect_peripheral(p)
    
        def did_connect_peripheral(self, p):
            p.discover_services()
    
        def did_fail_to_connect_peripheral(self, p, error):
            print('Failed to Connect')
            
        def did_disconnect_peripheral(self, p, error):
            self.peripheral = None
    
        def did_discover_services(self, p, error):
            for s in p.services:
                if s.uuid == 'FFE0':
                    p.discover_characteristics(s)
    
        def did_discover_characteristics(self, s, error):
            for c in s.characteristics:
                if c.uuid == 'FFE1':
                    self.characteristic = c
                    characteristic = c
                    self.peripheral.set_notify_value(c, True)
    
        def did_update_value(self, c, error):
            print('Got Something',c.value)
        
        def sendData():
            c = self.characteristic
            self.peripheral.write_characteristic_value(c, 'ring/', True)
    
    mngr = bellRinger()
    cb.set_central_delegate(mngr)
    cb.scan_for_peripherals()
    mngr.sendData()
    

    posted in Pythonista read more
  • robertiii

    I have a fairly large project. I would like to split the files up. I would like to split it as follows. A file for custom view classes. An individual file for each tableview. A file for the main document (obviously). If it is possible a file for the button actions.

    posted in Pythonista read more
  • robertiii

    @reticulated

    How is the lib coming? I would love to get that!

    posted in Pythonista read more
  • robertiii

    How do I use this and setup several different types of annotations with different images for different kinds. For instance, using a picture of a light to mark a light, a picture of a bush to mark and bush, and a picture of a tree to mark a tree.

    posted in Pythonista read more
  • robertiii

    So I know that this is a very old thread, however I have wanted to be able to emplement this kind of thing. I keep getting the following error on the the line

    class_ptr = c.objc_allocateClassPair(NSObject.ptr, 'OMMapViewDelegate', 0)
    

    argument 2: <class 'TypeError'>: wrong type

    What needs to change to allow me to use this? Thanks in advance!

    posted in Pythonista read more
  • robertiii

    Know this is old, but wondering about being able to get correct formatting for tables.

    posted in Pythonista read more
  • robertiii

    Is there any way to import python modules into editorial?

    posted in Editorial read more

Internal error.

Oops! Looks like something went wrong!