Large commits done.

0 views
Skip to first unread message

John Sutherland

unread,
Jan 11, 2008, 7:46:58 PM1/11/08
to frontpyth...@googlegroups.com
Hi everyone.. I've done a large commit, that starts to form my vision
of how I want things to look in the SDK.

I've moved some stuff around, there's now 2 main directorys, SDK and
examples.

I've implemented a couple things also. First up is a nice simple
Appliance class... Now to create your Appliance, its:

class RUIPythonAppliance( PyFR.Appliance.Appliance ):
def getController(self):
return MyWaitController.alloc().initWithText_("Loading Myth")

thats is... No code to 'trick frontrow", its already taken care of.

I've also started a Controllorutilities class, that has the log
function in it (so that when you log something, it'll also print the
class you are in.. Kinda useful..) Also in there is my methods for
launching applications.. This still needs to be changed in order to
handle things like opening files with the launched application.. but
for now, it serves me in launching MythTv, which doesn't take a file..
I ran into one problem, in that the timer function *must* live in a
NSObject based class, otherwise it itsn't a selector which the timer
func can call. Which really suck.. So all my wrappers will have to
have the selector defined in it. *sigh*... See the WaitController for
an example...

Next up is the WaitController.. This is a 'screen' that displays a
line of text, and a spinner.. It'll then call a "PyFR_start" method in
your class.. Then, when you are done, you can call the done() method..
I haven't tested that part yet, as my Myth stuff doesn't need it,
cause of the launch stuff returning to the main menu..

So... In order to reimplement my Myth launcher, here's all the code:

import PyFR.Appliance
import PyFR.WaitController

class MyWaitController(PyFR.WaitController.WaitController):
def PyFR_start(self):
self.launchApp( '/Applications/MythFrontend.app')

class RUIPythonAppliance( PyFR.Appliance.Appliance ):
def getController(self):
return MyWaitController.alloc().initWithText_("Loading Myth")


Nice and simple. Should make it easy for people to build similar...

My next step is to take Jon's ideas for menus and such.. (Jon, you
should have svn commit access now, add your project as an example if
you want.)..

I also want to do some more docs, on how to setup a project from
scratch, development, and deployment.

--John


Jon Christopher

unread,
Jan 11, 2008, 7:54:48 PM1/11/08
to frontpyth...@googlegroups.com
John,

Cool, I'll check this out. I've attached my current PyeTV tree, to
which I've made several modifications

All classes are now named starting with PFR (e.g. PFRMenuController,
PFROptionDialog, PFRAppController, etc.)

We'll have to see how this fits in with your vision, but I expect
it'll merge in just fine.

I've added a working implementation of an option dialogs along with
some examples. The tarball doesn't
yet have a keyboard controller class, but that should be pretty easy
I've re-worked the menus class a bit to be more usable.

I just wanted to get you what I have quickly, thus the tarball.

PyeTV.tar.gz

Jon Christopher

unread,
Jan 12, 2008, 3:54:58 PM1/12/08
to frontpyth...@googlegroups.com
I've just committed a few new classes in PyFR for menus and an option dialog.
Reply all
Reply to author
Forward
0 new messages