Thx for your reply JonB.
I might just go for a std ObjC app I would have to dig through the objc_util thing ^^
The thing I don't understand is why the cb module doesn't expose the advData and RSSI params from the CoreBluetooth API.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Thx for your reply JonB.
I might just go for a std ObjC app I would have to dig through the objc_util thing ^^
The thing I don't understand is why the cb module doesn't expose the advData and RSSI params from the CoreBluetooth API.
From the documentation, I couldn't find any info about the scan response...
So I was wondering if there is another way to access the advertised data. Or if there is just no way?
My BLE device uses BLE advertising to give some info to the Central. And I was willing to use pythonista as a debug tool to troubleshot my device, but it seems it won't be possible...
Cheers,
Eric T.
Hi,
Is there a way to get the BLE scan response when scanning for devices?
Is there a way to get advertisement data from surrounding BLE device?
Cheers,
Eric T
Hi,
I don't get the way to load the pyui file in the __ init__() method.
there is no load_view() method in View class
So I really don't get it... do you have sample code that load view content in __ init__() ?
thx that's a good workaround while working on a sub module
Ok, so this is kind of a known issue that you have to quit Pythonista for sub modules to be properly reloaded by scripts using it, once edited?
When running a script a.py that import b.py, and I modify b.py once a.py as already been launched, I have to quit Pythonista for the a.py to reload and take into account modifications made in b.py ...
Is that a bug or some sort of optimisation that avoid recompiling the byte code that I can disable in the settings?
Regards,
Eric T.
Hi thx for the reply.
I already did the import for the class
but I can't figure out to call the load_view in the init..
Do you mean in the init(self) of the A class?
as load_view will return an instance of A...
Hi
I've defined a custom view object with its pyui file
so I have:
a.py
a.pyui
A(ui.View)
Is it possible to use it from the editor in another ui?
It looks like there is no way to specify the .pyui file for the custom views...
Cheers,
Eric T.
Thanks for your reply, it does actually work. I don't know what I did first, I must have had a typo somewhere!
Using the (add/remove)_subview does the work to.
Hi,
I want to use a SegmentedControl to switch between to two overlapped customview subviews. What is the best practice for this?
I tried to set the .hidden attribute in the SegmentedControl .action callback but this seems to work only when set before presenting the view.
Any advice would be wellcome.
Cheers,
Eric T.
ok. the bug occurs even when instanciating a simple Scene() object which is ok when using
run(Scene())
I am trying to put my scene in a CustomView using the ui editor.
I created a CustomView
I set the Custom View Class to SceneView
Gave it a name 'toto'
I my main:
v = ui.load_view('MyUI')
totoview = v['toto']
totoview.scene = Toto() # <-- Pythonista crashes here
v.present()
Using
run(Toto(), frame_interval = 1)
works fine
Any idea on how to debug this?
Cheers