# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1300909384 0 # Node ID e5a0a1a3ee037cc3ef144b0bbeaaee0e474af3c0 # Parent 3aa5d0777af2cfb183dcd9bb185610129db75aa0 dw_window_enable() and dw_window_disable() now function as expected on MLE controls. diff -r 3aa5d0777af2 -r e5a0a1a3ee03 mac/dw.m --- a/mac/dw.m Wed Mar 23 19:18:37 2011 +0000 +++ b/mac/dw.m Wed Mar 23 19:43:04 2011 +0000 @@ -6398,12 +6398,24 @@ */ void API dw_window_disable(HWND handle) { - NSObject *object = handle; - if([ object isKindOfClass:[ NSControl class ] ]) - { - NSControl *control = handle; + id object = handle; + + if([object isMemberOfClass:[NSScrollView class]]) + { + NSScrollView *sv = handle; + object = [sv documentView]; + } + if([object isKindOfClass:[NSControl class]]) + { + NSControl *control = object; [control setEnabled:NO]; } + if([object isKindOfClass:[NSTextView class]]) + { + NSTextView *mle = object; + + [mle setEditable:NO]; + } } /* @@ -6413,12 +6425,24 @@ */ void API dw_window_enable(HWND handle) { - NSObject *object = handle; - if([ object isKindOfClass:[ NSControl class ] ]) - { - NSControl *control = handle; + id object = handle; + + if([object isMemberOfClass:[NSScrollView class]]) + { + NSScrollView *sv = handle; + object = [sv documentView]; + } + if([object isKindOfClass:[NSControl class]]) + { + NSControl *control = object; [control setEnabled:YES]; } + if([object isKindOfClass:[NSTextView class]]) + { + NSTextView *mle = object; + + [mle setEditable:YES]; + } } /*