diff --git a/hiro/cocoa/widget/line-edit.cpp b/hiro/cocoa/widget/line-edit.cpp index fb6f3c61..bcae99e1 100755 --- a/hiro/cocoa/widget/line-edit.cpp +++ b/hiro/cocoa/widget/line-edit.cpp @@ -17,11 +17,11 @@ } -(void) textDidChange:(NSNotification*)n { + lineEdit->state.text = [[self stringValue] UTF8String]; lineEdit->doChange(); } -(IBAction) activate:(id)sender { - lineEdit->state.text = [[self stringValue] UTF8String]; lineEdit->doActivate(); } diff --git a/ruby/video/video.cpp b/ruby/video/video.cpp index f419b962..c673f8a3 100644 --- a/ruby/video/video.cpp +++ b/ruby/video/video.cpp @@ -329,12 +329,12 @@ auto Video::hasMonitors() -> vector { auto dictionary = IODisplayCreateInfoDictionary(displayPort, 0); if(auto names = CFDictionaryGetValue(dictionary, CFSTR(kDisplayProductName))) { auto languageKeys = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); - CFDictionaryApplyFunction(names, MonitorKeyArrayCallback, (void*)languageKeys); + CFDictionaryApplyFunction((CFDictionaryRef)names, MonitorKeyArrayCallback, (void*)languageKeys); auto orderLanguageKeys = CFBundleCopyPreferredLocalizationsFromArray(languageKeys); CFRelease(languageKeys); if(orderLanguageKeys && CFArrayGetCount(orderLanguageKeys)) { auto languageKey = CFArrayGetValueAtIndex(orderLanguageKeys, 0); - auto localName = CFDictionaryGetValue(names, languageKey); + auto localName = CFDictionaryGetValue((CFDictionaryRef)names, languageKey); monitor.name = {1 + monitors.size(), ": ", [(__bridge NSString*)localName UTF8String]}; CFRelease(localName); }