From: Johan L. <jo...@ba...> - 2003-05-18 21:19:01
|
This is a feature request for next version of Win32::GUI. Media objects (bitmaps, fonts, etc) used when creating a window or a control should automatically be kept in scope by the using object (the Window or Control). This is not the case today. So if you create a Win32::GUI::Font object in a lexical scope and use it when creating a Label or Button or whatever, it will go out of scope and be destroyed ASAP, possibly before the Label is displayed in the Window. (the simplest way to implement this would probably be to just reference the objects in an object property hash ref) This has been discussed on the list before, i just wanted to document the feature request since it's a major source of confusion for Win32::GUI newbies and experienced users alike (yes, the font stuff just bit me, and I knew about the bitmap behaviour). /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "The GUI Gallery" http://toastytech.com/guis/index.html dmoz (1 of 2): /Computers/Software/Internet/Clients/ 16 |