
Not firing Load event for GLControl.
Posted Tuesday, 4 August, 2009 - 11:59 by eugene.chepurnykh| Project: | The Open Toolkit library |
| Version: | 1.0-beta-1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
GLControl.Load fire never.


Comments
#1
#2
Confirmed to occur on earlier version.
#3
Workaround: Use Form.Load event instead. In practice this has worked since OpenTK 0.3.13, and it seems to work with 0.9.9.1 too.
#4
Ok, the reason is that the GLControl.Load event is raised as soon as you call its constructor, not giving you a chance to hook it.
The solution is to modify the GLControl to be constructed lazily, as all regular controls do.
#5
Issue fixed in trunk (rev. 2203).
Please test if it works as expected on Windows, as I do not have access to a Windows installation right now.
#6
@Fiddler cool!
@Hex - if you read this - could you please try this out since you are "close to the issue"? :) [assuming you are on Windows that is..]
#7
Closing issues fixed in 0.9.9-2.
#8
Still not fixed on Windows in 0.9.9-2b. Having to use Form.Load instead.
#9
Confirmed, debugged and fixed in SVN rev. 2281.
The issue was that the winforms designer sets all public properties by default. In this case, it specified
VSync = false, which caused the control to be realized prematurely - before you got a chance to connect any events. This issue would always manifest in the VS designer but not when you created the control through code - which explains why it passed through unnoticed.Can you please verify that it works as expected now?
#10
Working as expected. Good job :)