Pyjamas import statements
- by Gordon Worley
I'm starting to use Pyjamas and I'm running into some annoyances. I have to import a lot of stuff to make a script work well. For example, to make a button I need to first
from pyjamas.ui.Button import Button
and then I can use Button. Note that
import pyjamas.ui.Button
and then using Button.Button doesn't work (results in errors when you build to JavaScript, at least in 0.7pre1). Does anyone have a better example of a good way to do the import statements in Pyjamas than what the Pyjamas folks have on their site? Doing things their way is possible, but ugly and overly complicated from my perspective, especially when you want to use a dozen or more ui components.