[IronPython] Bug?
Davy Mitchell
daftspaniel at gmail.com
Fri Jan 5 14:38:32 CET 2007
In the example below, hello is printed but there is no error for the
call on the non-existent method. Is this something to do with the
timer thread?
Cheers,
Davy
import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
from System import *
from System.Drawing import *
from System.Drawing.Drawing2D import *
from System.Windows.Forms import Application, Button, Form, Label,
TextBox, FolderBrowserDialog, Timer, FormWindowState,
FormBorderStyle,ImageLayout, MenuStrip, ToolStripMenuItem,
ToolStripItem
from System.Timers import Timer
class ScreenForm(Form):
def __init__(self):
Form.__init__(self)
self.Change = Timer()
self.Change.Elapsed += self.ChangeTick
self.Change.Interval = 3000
self.Change.Enabled = True
def Closeform(self, s, e):
self.Change.Enabled = False
self.Close()
def ChangeTick(self, s, e):
print "hello!"
self.UpdatePicture()
Application.EnableVisualStyles()
form = ScreenForm()
Application.Run(form)
--
Davy Mitchell
Blog - http://www.latedecember.com/sites/personal/davy/
Mood News
- BBC News Headlines Auto-Classified as Good, Bad or Neutral.
http://www.latedecember.com/sites/moodnews/
More information about the Ironpython-users
mailing list