[Chandler-dev] Getting started with a python script for Chandler
Jeffrey Harris
jeffrey at osafoundation.org
Wed Nov 28 14:51:10 PST 2007
Hi Andre,
> I believe I'm (now) installing my plugin without error.
>
> Q1. I made one change to the init.py script in response to a runtime
> syntax error that halted Chandler in (my line 42) "for item in". Is my
> fix correct?
>
> class AndrePluginMenuBlock(Block):
> # the method name has to be the blockName of the BlockEvent above
> # sandwiched with "on" and "Event"
> def onActionOnAndrePluginEvent(self, event):
> for item in
> Block.findBlockByName("MainView").getSidebarSelectedCollection():
"for item in" and the following "Block. ..." line ought to be on the
same line, your code ought to give a syntax error when run :)
The line I wrote will get wrapped by most mail clients. Mostly Python's
whitespace sensitivity doesn't bother me, but it's a problem when
emailing Python code... I should've made that line shorter.
Sincerely,
Jeffrey
More information about the chandler-dev
mailing list