*** Parrot-0.0.1 released ***

Phil Hunt philh at vision25.demon.co.uk
Tue Aug 24 15:28:10 EDT 1999


In article <37C2B9CE.95AA5FEC at lri.fr> conversy at lri.fr "Stephane Conversy" writes:
> Could you give an example of how to plug code with a generated python
> file ?

Not in detail, because I haven't written a Python backend yet.
 
> for example, how to attach a command when the "New" menu is triggerred ?
> 
> window @MyWindow "My First Window" {
>      menuBar {
>         menu "File" {
>            menuItem @New "New"
>         }
> }

The way I envisage this working is that it would create a class,
MyWindow, for the window. This would have an empty method called
New() or New_pressed() or somesuch. To write code for this method, you
would subclass the MyWindow class with a class that implemented
the method.
 
(The details of this are no doubt wrong, but that is the general scheme
I have in mind).

-- 
Phil Hunt....philh at vision25.demon.co.uk





More information about the Python-list mailing list