View previous topic :: View next topic |
Author |
Message |
l8night
Joined: 03 May 2004 Posts: 32 Location: UK
|
Posted: Thu Oct 13, 2005 2:18 pm Post subject: Odd exception thrown from WIn32Window::handleMessage |
|
|
I'm having some grief with Win32WIndow under the latest DMD
I've had to bodge it thus;
Code: | bit handleMessage( out LRESULT rv, UINT msg, WPARAM wparam, LPARAM lparam )
{
MessageSlot ms;
if (msgHandlers is null ) { return false; }
try {
ms = msgHandlers[msg];
} catch ( Object o ) {
debug { printf( "exeception in handleMessage FIX ME!!\n" ); }
}
if( ms )
{
return ms.processMessage( rv, wparam, lparam );
}
return false;
} |
I've just about got debugging working with MSDEV (VC6) by adding /co link flags and -g compile flags.
is anyone else seeing these problems or problems with Object[int] assoc arrays ? |
|
Back to top |
|
|
l8night
Joined: 03 May 2004 Posts: 32 Location: UK
|
Posted: Thu Oct 13, 2005 5:16 pm Post subject: |
|
|
not that it actually says this in the docs but it appears that assoc arrays have changed (I kind of agree with the change!)
op[] throws an exception (as it returns a copy) and 'in' returns a pointer to (so can return null)
thus the code is now
Code: |
MessageSlot * ms = (msg in msgHandlers);
if( ms && (*ms) )
{
return (*ms).processMessage( rv, wparam, lparam );
}
return false; |
and it works |
|
Back to top |
|
|
|