• shinyformica

    @JonB yeah, this is for low-level guaranteed delivery of messages containing arbitrary data for peer-to-peer communication.

    Not looking for a server-client architecture, though that could work. More of a general peer-to-peer message queueing architecture. I did think of just implementing my own with asyncore/asynchat...but was hoping for something already built with best-practices and solid networking code, which is something I'm no expert in.

    I'll look at MQTT, which I also had not heard of.

    posted in Pythonista read more
  • shinyformica

    Hadn't heard of it @mikael, but thanks for the info. Unfortunately, I can't use anything which requires an outside service...has to be all internal guaranteed-delivery messaging.

    posted in Pythonista read more
  • shinyformica

    Anyone? Bueller?

    Nobody using any tcp/ip messaging?

    posted in Pythonista read more
  • shinyformica

    I have a pressing need for a tcp/ip-based (not udp-based) messaging system for something I'm putting together.

    Something like rabbitmq or zeromq, maybe?

    I'm not up on what are the current best-of-breed libraries, and it seems that none of them are currently bundled with pythonista 3, so anything I choose would have to be pure-python to be viable.

    Any ideas or recommendations?

    posted in Pythonista read more
  • shinyformica

    Anyone have an idea where I could find the enum values for the UIBlurEffectStyle options?

    https://developer.apple.com/documentation/uikit/uiblureffectstyle?language=objc

    I am having no luck figuring out what the values are...usually I can google it and someone, somewhere has the actual integer values that correspond to the enum items. Often Apple's own docs have the values, but not in this case.

    Thanks in advance.

    posted in Pythonista read more
  • shinyformica

    This may be a dumb question...it's late and I'm not thinking super clearly...

    If I create a subclass of some Objective-C class via:

    objc_util.create_objc_class(name, superclass=SuperClass, methods=[], ...

    and define some method that I will implement in the 'methods' list, which will override a method defined on the superclass, how do I call the superclass's version of that method from my implementation?

    Basically, I want to override the method to do some extra things, but still call the base method to do what it would normally do.

    posted in Pythonista read more
  • shinyformica

    @JonB and @cvp for the wins!

    That looks near perfect...I can scale the drawing as needed.
    Looks like there's no issue with ttf's as the example given shows:

    font = ImageFont.truetype('Minecraftia.ttf', 8)

    posted in Pythonista read more
  • shinyformica

    I saw that post in my search...that's almost literally the opposite of what I want.

    What I absolutely don't want is to load this font from an external source, or to have any user interaction involved.
    I'd like to simply have the font .ttf file located in my script's directory and then load it for use at run time.

    I'm sensing that's not possible, due to some security implications?

    posted in Pythonista read more
  • shinyformica

    Is there a way to load a custom font for use in a custom view inside of a script?
    To be clear, I don't want to load a font for the user to use in general, in this use case the font has symbols I want to be able to use, and it's a convenient way to store vector icon images. I don't see an obvious way to load a font from my local script area...wondering if this is a sandbox security thing?

    Slightly off-topic: as of iOS 13 Apple is supplying a special system standard symbols "font" which UIImages will be able to load individual icons from, which is basically the same idea as what I want to do here.

    posted in Pythonista read more
  • shinyformica

    @JonB I'm using that module extensively already (thank you @mikael). Unfortunately, there's two issues using it in this case:

    1. I need to see the initial press/touch all the way through to the lift/touch end. A tap gesture is only recognized when the tap is complete, so you only get the tap callback after the finger is lifted.

    2. Even if I were to make a custom gesture recognizer, or attempt to use tap gestures, you still have to go through all the trouble of setting up the "requires failure of" gesture relationship with the scroll view, and other complications to get it to work for my purposes.

    The whole thing is somewhat complicated, but in the end it just boils down to not having a touch_cancelled() method on regular ui.Views. UIControls actually have a way to connect to the various touch phases, but regular UIViews do not.

    I will say that using the delegate as above works pretty flawlessly.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!