this should work in RoboFont 1.7
good luck
from mojo.events import addObserver
class test(object):
def __init__(self):
addObserver(self, "fontOverviewAdditionContextualMenuItems", "fontOverviewAdditionContextualMenuItems")
def fontOverviewAdditionContextualMenuItems(self, notification):
myMenuItems = [
("Hello", self.sayHello),
("World", self.sayWorld),
("submenu", [("an item", self.sayAnItem)])
]
notification["additionContextualMenuItems"].extend(myMenuItems)
def sayHello(self, sender):
print "Hello"
def sayWorld(self, sender):
print "World"
def sayAnItem(self, sender):
print "an item"
test()