July 29th, 2005
| Filed under Misc
|
The following is the minimal code to set the current page of an Impress document. This is actually considerably easier to do from Python than Java ...
PYTHON:
-
import uno
-
-
# Get the uno component context from the PyUNO runtime
-
localContext = uno.getComponentContext()
-
-
# Create the UnoUrlResolver
-
resolver = localContext.ServiceManager.createInstanceWithContext(
-
"com.sun.star.bridge.UnoUrlResolver", localContext )
-
-
# Connect to the running office
-
ctx = resolver.resolve(
-
"uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
-
smgr = ctx.ServiceManager
-
-
# Get the central desktop object
-
desktop = smgr.createInstanceWithContext(
-
"com.sun.star.frame.Desktop",ctx)
-
-
# Pull the current document, we asssume this is an Impress doc
-
doc = desktop.getCurrentComponent()
-
frame = desktop.getCurrentFrame()
-
ctrl = frame.getController() # In impress this implements XDrawView
-
pages = doc.getDrawPages() # Page list of the current impress document
-
-
# Set to some page ...
-
target = pages.getByIndex(8)
-
ctrl.setCurrentPage(target)
July 28th, 2005
| Filed under Jabber
|
To my moderate suprise I've been voted in as a Jabber Software Foundation member. I received a 75% yes vote, which isn't too bad. Apparently rantlets are acceptable application material. I'd better write that JEP then ...
July 20th, 2005
| Filed under Misc
|
Havoc Pennington has just posted about '☠' (pronounced 'Yarr') on his blog. It's basically realtime chat in a blog context, with the conversations forming part of the document. One interesting feature is the ability for a chat message to contain an image for illustration of ideas. The manifesto is
here.
July 19th, 2005
| Filed under Lisp
|
While hacking on erlang and python the following occurs to me:
On being introduced to Lisp people always complain about all the parentheses. But the parentheses are always there; it's just that in other languages you're expected to mentally insert them yourself.
July 19th, 2005
| Filed under Lisp
|
Had Monday off as I needed to do some shopping and have lunch with a friend who's off to work in Madrid. But it's back to work now, but first some google-juice ...
Dog-training in Sydney (Leichhardt); It's a volunteer organisation so is cheap. Ph: 02-9797-0508.
More Erlang/Lisp fusion work, this time based around Scheme: Termite.
July 12th, 2005
| Filed under Lisp
|
I'm currently mirroring Rainer Joswig's live video tutorial on developing DSLs in lisp. DSLs are something of a hot topic at the moment and Martin Fowler weighed-in recently, and Rainer produced a lisp-specific example and accompanying video. It's an interesting example of how lisp development can differ from other languages through the use of interaction with the lisp runtime.