ui.forms.widgets.Hyperlink :    Summary: 1 Cursor(s) Exception	in (0):
    Frank Benoit 
    keinfarbton at googlemail.com
       
    Fri Jun 20 04:39:50 PDT 2008
    
    
  
yidabu schrieb:
> code bellow not crashed, but cause Exception:
> Summary: 1 Cursor(s) Exception in (0): 
> 
> when exit program, ddbg captured :
> Unhandled D Exception (tango.core.Exception.IOException
>  "<console> :: The handle is invalid.") at KERNEL32.dll (0x7c812a5b) thread(2644
> )
> 
> Does it means some resource not auto released ?
> Or Hyperlink works with dwtx.ui.forms.widgets.Form only ?
> 
> 
> 
> Code:
> 
> module DwtTest;
> 
> import dwt.DWT;
> import dwt.widgets.Display;
> import dwt.widgets.Shell;
> 
> import dwtx.ui.forms.widgets.Hyperlink;
import dwtx.ui.internal.forms.widgets.FormsResources;
> 
> void main(){
>     Display display = new Display ();
>     Shell shell = new Shell (display);
>     
>     /// cause Summary: 1 Cursor(s) Exception in (0): 
>     auto linkHome = new Hyperlink(shell, DWT.NONE);  
>     
>     linkHome.setText(" http://www.d-programming-language-china.org/ ");
>     linkHome.setUnderlined(true);
>     linkHome.setForeground(shell.getDisplay().getSystemColor(DWT.COLOR_BLUE));
>     linkHome.setSize (300, 200); //to show the link
>     
>     shell.pack();
>     shell.open ();
>     while (!shell.isDisposed ()) {
>         if (!display.readAndDispatch ()) display.sleep ();
>     }
FormsResources.shutdown();
>     display.dispose ();
> }
> 
> 
Hm, this is strange.
The HyperLink uses FormsResources to create the used Cursors. But the 
Cursor is not release, hence this message.
To release, i added the call "FormsResources.shutdown();" and the 
message goes away. But the modules location in the "internal" package 
implies that it should not be necessary to access it from user code. But 
the "shutdown()" method is called from nowhere else.
    
    
More information about the Digitalmars-d-dwt
mailing list