Other articles


  1. BlackBerry-Py Preview

    Sun 17 June 2012
    By Peter Hansen

    In PlayBook

    Sometimes I write little because nothing's happening, other times because so much is happening I can't stop to write about it! Fortunately the last few weeks have been the second case.

    As of June 2012, BBX-Python has been renamed the BlackBerry-Py Project. You can follow news about it ...

    read more
  2. PySide on the PlayBook

    Thu 24 May 2012
    By Peter Hansen

    In PlayBook

    In my last post [1] I talked about wanting to hook Python to the Qt port for the PlayBook. Since then, after considering other approaches, I decided to take a closer look at PySide [2]. My quick review of it concluded that I'd be duplicating key parts of its ...

    read more
  3. BB10 Python: Command Line Interface

    Sat 24 March 2012
    By Peter Hansen

    In PlayBook

    Just a quick update since it's been months of silence (and waiting, mostly) and things are starting to move again.

    Tonight I decided that it was time to take the QML "Hello World" code I'd written a couple of weeks ago, and see what it would take to ...

    read more
  4. BBX Python: Direct Entry Point!

    Tue 29 November 2011
    By Peter Hansen

    In PlayBook

    Okay, this is just too cool not to mention right away!

    Jeff Kehres from RIM has been following the progress on and off, and pointed out today the existence of the blackberry-pythonpackager that's already included in the NDK tools.

    I therefore herewith present the classic tiny "hello, world" app ...

    read more
  5. BBX Python: FreeType2 Fonts

    Sun 27 November 2011
    By Peter Hansen

    In PlayBook

    This is definitely not ready for serious use, but I thought I'd share a screenshot with the first text rendering support for BBX-Python.

    static/files/bbxpython_text.jpg

    The code's too crude to commit yet, and it's ridiculously sluggish at the moment, since I'm using FreeType to render each character and ...

    read more
  6. BBX Python: Quick Update #1

    Thu 24 November 2011
    By Peter Hansen

    In PlayBook

    Here are a few quick notes on what's happened with BBX-Python since the last update.

    Core: Launcher

    I stripped almost everything out of the launcher, leaving it as just the bare bones required to initialize the Python interpreter and run the main script.

    That meant taking out all the ...

    read more
  7. BBX Python: Progress, Stage Two

    Fri 18 November 2011
    By Peter Hansen

    In PlayBook

    So without much more effort today, I'm got it running a separate script (bbxmain.py) that is bundled into the .bar file. Again, the heart of things is trivial, just these two lines:

    FILE * bbxmain = fopen("app/native/bbxmain.py", "r");
    PyRun_SimpleFile(bbxmain, "__main__");
    

    For the record, here's ...

    read more
  8. BBX Python: Proof Of Concept

    Fri 18 November 2011
    By Peter Hansen

    In PlayBook

    Short post, since it's late.

    Python on the PlayBook. What will be BBX-Python, some day...

    So I wrote an app. First time using the Tablet OS Native SDK so lots of learning curve to climb with Momentics (the IDE) and some of its warts. Generally it was way better ...

    read more
  9. SQLite: Negative Integer Primary Keys

    Sun 19 June 2011
    By Peter Hansen

    In SQLite

    I was working on the design of a PlayBook app which would perform some data logging, and considered using SQLite as the primary mechanism. Alternatives included a simple text file (CSV format), XML, or SharedObject (not really).

    Since the user may want to acquire data for a very long time ...

    read more
  10. PlayBook: Power Consumption

    Wed 15 June 2011
    By Peter Hansen

    In PlayBook

    I've been taking power consumption measurements while running the PlayBook under various loads, and some of the results are pretty interesting. I'll write up more later, but here's an initial overview of some data that may be useful to you, either as a user, or as a ...

    read more
  11. PlayBook Browser Viewport Size

    Fri 27 May 2011
    By Peter Hansen

    In PlayBook

    Although the resolution of the screen on the 7" PlayBook is 1024x600, the browser window size is always less.

    In the default configuration, the browser viewport is 1024x512 pixels. That's when the back/forward buttons, address field, history/bookmark and fullscreen toggle switch are showing.

    I think it would ...

    read more
  12. PlayBook: Errata #1

    Sun 17 April 2011
    By Peter Hansen

    In PlayBook

    Wow, I've been slow getting back to this non-blog. Sorry for the long silence, and I do intend to post more often again.

    In the last couple of months, much has happened and, unfortunately, a few things have not. For one thing, we don't have our PlayBooks yet ...

    read more
  13. PlayBook: debug trace() statements

    Thu 10 February 2011
    By Peter Hansen

    In PlayBook

    When debugging AIR apps in the PlayBook simulator, you build your app using the -debug option to the amxmlc compiler... or your IDE does it for you. With that flag, and appropriate options passed to blackberry-airpackager (specifically -target bar-debug) and blackberry-deploy (-debugHost X.X.X.X), your app will attempt ...

    read more
  14. PlayBook: Top-Swipe Menu

    Sat 05 February 2011
    By Peter Hansen

    In PlayBook

    Warning: the approach described here for SWIPE_START was carefully designed based on the observed performance of the simulator as it was at the time. Unfortunately, at least one app built around this approach does not work correctly on the "1.0" software running on the real hardware. If you've ...

    read more
  15. PlayBook: SWIPE_START Simplified

    Sat 05 February 2011
    By Peter Hansen

    In PlayBook

    Warning: in the 1.0 release, SWIPE_START may no longer work exactly as described here. If you use it in your app, you may need to switch to SWIPE_DOWN until the 1.0 software has been released and can be analyzed fully.

    In my previous post I wrote at length ...

    read more
  16. PicasaPhotoViewer Process Doesn't Terminate

    Thu 20 January 2011
    By Peter Hansen

    In Utilities

    I have the Picasa photo viewer (PicasaPhotoViewer.exe) set up as my default app for basic image viewing. It's generally fast, makes it easy to scroll through a folder full of images, and lets me zoom in and out at lightning speed using the mouse wheel. All good.

    Unfortunately ...

    read more
  17. Using ImageMagick to Filter Page Scans

    Thu 20 January 2011
    By Peter Hansen

    In Utilities

    I had a need to clean up some not-so-great scans of photocopies. The pages included both text and music. This made it a bit tricky to process since the music had very thin lines. I needed the text darker, but without amplifying the background noise, and this tended to fade ...

    read more
  18. PlayBook Tidbits #1

    Wed 05 January 2011
    By Peter Hansen

    In PlayBook

    Lots of interesting tidbits starting to come out from CES 2011 with a slew of new videos (well, I've seen two so far, but compared to the recent dearth of new stuff I call that a slew).

    1. Product Manager Ryan Bidan tells Information Week that the "target" battery life ...
    read more
  19. PlayBook: Font List

    Thu 23 December 2010
    By Peter Hansen

    In PlayBook

    Using the flash.text.Font.enumerateFonts() routine one can see the following fonts available (at the moment... back at SDK beta 2) in the PlayBook simulator (skipping over some Japanese, Thai, and Indian fonts, and grouping related ones with slashes, to keep the list shorter):

    1. Andale Mono
    2. Arial
    3. BBAlpha Sans ...
    read more
  20. Fixing cibcvisagold.com

    Tue 21 December 2010
    By Peter Hansen

    In Personal

    I did a little technical support tonight for a major Canadian bank. Unpaid. Unrequested, too, actually. Not unappreciated though.

    We were browsing the World of Gold Rewards site to see what "reward" my wife might want as a birthday present from her father. (Yes, we have everything we need, so ...

    read more
  21. PlayBook: Application Lifecycle

    Sun 19 December 2010
    By Peter Hansen

    In PlayBook

    On the PlayBook an application goes through several stages in its lifecycle, and various events are issued to allow an app to monitor its externally controlled state. I say "externally controlled" because these state changes are generally out of the control of an application.

    When an app is first launched ...

    read more
  22. PlayBook Screen Template

    Sun 19 December 2010
    By Peter Hansen

    In PlayBook

    One of the first things I did with the PlayBook -- or, rather, with the lack of one -- was to build a simulator. Not the SDK simulator... everyone has one of those. I mean a physical one. It's nothing more than an old copy of a Rand McNally world atlas ...

    read more
  23. PlayBook: Showing System Menu

    Fri 17 December 2010
    By Peter Hansen

    In PlayBook

    On the PlayBook, not only can you drag from the lower left corner to make the virtual keyboard appear, but inside an application you can still get the System menu to appear by dragging from either the left or right upper corners.

    The top bezel "swipe down" action is reserved ...

    read more
  24. ActionScript: Useful Bits #1

    I'm rather new to ActionScript3 (and AIR) though I've done a lot of Javascript in the past. In fact, I'm so new I wasn't aware until a week ago that ActionScript had evolved so much since I first checked it out when AIR was in its ...

    read more
  25. PlayBook Internals: Part 1

    Thu 16 December 2010
    By Peter Hansen

    In PlayBook

    As mentioned in an earlier post I've been perusing the PlayBook simulator's filesystem in an effort to learn more about its architecture so I can improve my ability to build good apps for it.

    PPS Service

    I didn't know anything about QNX before getting into PlayBook development ...

    read more
  26. PlayBook Remote Debugger

    Thu 16 December 2010
    By Peter Hansen

    In PlayBook

    Since I don't have any Flash/Flex development tools other than the freebie command line stuff, I tried using the command line debugger to monitor trace() output in my ActionScript code. It didn't work.

    The BlackBerry Development Knowledge Base has an article called Compile and Debug without Flash ...

    read more
  27. PlayBook Internal Secrets

    Wed 15 December 2010
    By Peter Hansen

    In PlayBook

    While building a filesystem explorer I discovered several mechanisms left for developers, which let you get into the PlayBook simulator. The most obvious and useful one is a simple telnet interface, to which you merely need to know the userid and password (but these were pretty obvious). [This feature was ...

    read more
  28. BlackBerry PlayBook Webcast 5 of 5

    Thu 09 December 2010
    By Peter Hansen

    In PlayBook

    This post contains notes taken during the PlayBook webcast on December 9, 2010, not necessarily understandable out of context.

    1. BlackBerry Payment Service
      • can use for digital stuff, in-app only
      • not for physical goods, shared across apps, or virtual currencies
      • one approach: free app with paid upgrade/turn-on of features
      • 70 ...
    read more
  29. Closing or Switching Apps

    Thu 09 December 2010
    By Peter Hansen

    In PlayBook

    The first time I built and installed the sample HelloWorld app I was annoyed to find that it didn't include a way to close itself. It has only a "Push Me" button which opens a page to ask for your name so it can greet you with it.

    As ...

    read more
  30. Performance Comparison of Micro-Frameworks in Python

    Fri 16 April 2010
    By Peter Hansen

    In Python

    Micro-frameworks are all the rage lately. Though they've doubtless existed for as long as Python web development has been taking place, the recent release of bubble, juno, and now Flask have more people talking about them.

    I've been fighting with the complexities of the major frameworks for a ...

    read more