[BlackBerry-Python] Looking for examples and howto for Python/QML with Tart on BB10

George Ruinelli george at ruinelli.ch
Sun Dec 9 13:53:29 EST 2012


Hi Peter

Thank you for your explanations!

> On 2012-12-08 06:56, George Ruinelli wrote:
> > To speed up development and testing, I am looking for a way to run my apps
> > on the device without packing and deploying it.
> > One way would be to copy them with secure copy (scp) to the devuser home
> > directory and start it from there via SSH.
> 
> ...
> 
> > One then simply could edit his Python/QML files on the PC, copy them over
> > and start them over SSH.
> 
> I'm only 99% sure this isn't possible for any GUI app, because only apps
> launched through the Navigator will be granted the required permissions
> and/or given a screen context.  Without that, they can run so long as
> they just use non-GUI stuff (and probably don't interact with the user
> through keyboard etc either).

Well, that’s kind of understandable.

> It's not necessarily a problem though. I actually do all my development
> "on the device" and probably achieve almost 100% of the benefits, and
> perhaps with some extra advantages thrown in too.
> 
> First off, you start with a "stub" program that is packaged with just
> the executable (tart-launch in this case), the icon, and the manifest
> file.  Pretty much a near-empty .bar file, which you deploy the usual
> way.  That gives you the app icon on the screen so you can tap it,
> though if you wanted programmatic control you could use the
> launch/terminate options of blackberry-deploy.

How would I launch an app from the terminal (PC or SSH)?
Would it be possible to print out the log immediately instead of fetching it 
from the log file?

> You grant the access_shared permission in the bar-descriptor file as
> well, and configure the executable so that it looks to a folder like
> shared/misc/ZombieSlayer for the rest of its code and assets.  This can
> be done through command line options, a configuration file, or other
> mechanisms as appropriate.  The tart-launch binary uses command line
> options and a tart.cfg file, though what's there is just hacked together
> and could stand some cleanup and rationalization.
> 
> To edit the other files, you can connect to the device's Samba network
> share, and edit directly over wifi if you like.  I used to do that, and
> still do, but rarely.  Several times I lost critical edits as a result,
> such as when my Dev Alpha froze just before Jam Americas and the only
> solution was a full wipe.
> 
> What I do now is use a utility that basically does an "rsync" from my PC
> working folder tree to the shared/misc/AppName folder.  It's actually a
> Python utility (if you knew me well you'd say "of course" :-) and for
> now uses the win32file.ReadDirectoryChangesW() routine which monitors
> the directory for changes.  It more or less instantly mirrors any
> updates from my PC to the Dev Alpha, so by the time I've hit Save on the
> PC and moved my finger over to the Dev Alpha to launch the app, the
> changes have already been transferred.

I wasn’t sure how to understand where this shared folder would be or how I 
could access it over the network with Samba.
I seem not even to be allowed to access the device with fish:// which is 
Dolphins way so browse a folder through SSH.

I am now simply editing my files on the PC and the secure copying them directly 
into the apps folder. Surprisingly I have write access there, so I am going to 
use that way.


Now I played a bit around with QML.
Compared to Nokias QML implementation it seems to be quite frustrating to 
develop a GUI: When ever you implement something not supported, you will have 
to slay the app but you do not even get a log file entry, so its almost 
impossible to know why it fails.

I tried to implement the example QML code from 
https://developer.blackberry.com/cascades/reference/bb__cascades__page.html 
but it fails for no understandable reason and no hint is given...
I am wondering how you have been able to develop apps this "blind" way.

Over all it looks like as if the implemented QML forces one to rewrite the 
complete UI to get it working on BB10 :(


More information about the BlackBerry-Python mailing list