New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20952: patch-textctrl.diff

File patch-textctrl.diff, 1.9 KB (added by software@…, 2 years ago)

Patch for bug about no matching wxWidgetImpl::FindFromWXWidget function. Required for wxWidgets 2.9.0 Portfile

  • ../src/osx/cocoa/textctrl.mm

    # See http://groups.google.com/group/wx-dev/browse_thread/thread/8af9dd06f1a1a867
    # and http://svn.wxwidgets.org/viewvc/wx?view=rev&revision=61383
    diff -Naur work/wxWidgets-2.9.0/src/osx/cocoa/textctrl.mm work-patched/wxWidgets-2.9.0/src/osx/cocoa/textctrl.mm
     
    141141 
    142142- (void) keyDown:(NSEvent*) event 
    143143{ 
    144     wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); 
     144    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); 
    145145    lastKeyDownEvent = event; 
    146146    if ( impl == NULL || !impl->DoHandleKeyEvent(event) ) 
    147147        [super keyDown:event]; 
     
    150150 
    151151- (void) keyUp:(NSEvent*) event 
    152152{ 
    153     wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); 
     153    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); 
    154154    if ( impl == NULL || !impl->DoHandleKeyEvent(event) ) 
    155155        [super keyUp:event]; 
    156156} 
    157157 
    158158- (void) flagsChanged:(NSEvent*) event 
    159159{ 
    160     wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); 
     160    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); 
    161161    if ( impl == NULL || !impl->DoHandleKeyEvent(event) ) 
    162162        [super flagsChanged:event]; 
    163163} 
     
    170170 
    171171- (void) insertText:(id) str 
    172172{ 
    173     wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); 
     173    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); 
    174174    if ( impl == NULL || lastKeyDownEvent==nil || !impl->DoHandleCharEvent(lastKeyDownEvent, str) ) 
    175175    { 
    176176        [super insertText:str];