| @@ -270110,7 +270110,7 @@ END_JUCE_NAMESPACE | |||||
| - (NSRange) markedRange; | - (NSRange) markedRange; | ||||
| - (NSRange) selectedRange; | - (NSRange) selectedRange; | ||||
| - (NSRect) firstRectForCharacterRange: (NSRange) theRange; | - (NSRect) firstRectForCharacterRange: (NSRange) theRange; | ||||
| - (unsigned int) characterIndexForPoint: (NSPoint) thePoint; | |||||
| - (NSUInteger) characterIndexForPoint: (NSPoint) thePoint; | |||||
| - (NSArray*) validAttributesForMarkedText; | - (NSArray*) validAttributesForMarkedText; | ||||
| - (void) flagsChanged: (NSEvent*) ev; | - (void) flagsChanged: (NSEvent*) ev; | ||||
| @@ -270486,13 +270486,15 @@ END_JUCE_NAMESPACE | |||||
| - (void) insertText: (id) aString | - (void) insertText: (id) aString | ||||
| { | { | ||||
| // This commits multi-byte text when return is pressed, or after every keypress for western keyboards | // This commits multi-byte text when return is pressed, or after every keypress for western keyboards | ||||
| if ([aString length] > 0) | |||||
| NSString* newText = [aString isKindOfClass: [NSAttributedString class]] ? [aString string] : aString; | |||||
| if ([newText length] > 0) | |||||
| { | { | ||||
| TextInputTarget* const target = owner->findCurrentTextInputTarget(); | TextInputTarget* const target = owner->findCurrentTextInputTarget(); | ||||
| if (target != 0) | if (target != 0) | ||||
| { | { | ||||
| target->insertTextAtCaret (nsStringToJuce ([aString isKindOfClass: [NSAttributedString class]] ? [aString string] : aString)); | |||||
| target->insertTextAtCaret (nsStringToJuce (newText)); | |||||
| textWasInserted = true; | textWasInserted = true; | ||||
| } | } | ||||
| } | } | ||||
| @@ -270603,7 +270605,7 @@ END_JUCE_NAMESPACE | |||||
| bounds.getHeight()); | bounds.getHeight()); | ||||
| } | } | ||||
| - (unsigned int) characterIndexForPoint: (NSPoint) thePoint | |||||
| - (NSUInteger) characterIndexForPoint: (NSPoint) thePoint | |||||
| { | { | ||||
| (void) thePoint; | (void) thePoint; | ||||
| return NSNotFound; | return NSNotFound; | ||||
| @@ -271438,6 +271440,9 @@ void NSViewComponentPeer::redirectMouseWheel (NSEvent* ev) | |||||
| y = [ev deviceDeltaY] * 0.5f; | y = [ev deviceDeltaY] * 0.5f; | ||||
| } | } | ||||
| @catch (...) | @catch (...) | ||||
| {} | |||||
| if (x == 0 && y == 0) | |||||
| { | { | ||||
| x = [ev deltaX] * 10.0f; | x = [ev deltaX] * 10.0f; | ||||
| y = [ev deltaY] * 10.0f; | y = [ev deltaY] * 10.0f; | ||||
| @@ -64,7 +64,7 @@ | |||||
| */ | */ | ||||
| #define JUCE_MAJOR_VERSION 1 | #define JUCE_MAJOR_VERSION 1 | ||||
| #define JUCE_MINOR_VERSION 52 | #define JUCE_MINOR_VERSION 52 | ||||
| #define JUCE_BUILDNUMBER 38 | |||||
| #define JUCE_BUILDNUMBER 39 | |||||
| /** Current Juce version number. | /** Current Juce version number. | ||||
| @@ -33,7 +33,7 @@ | |||||
| */ | */ | ||||
| #define JUCE_MAJOR_VERSION 1 | #define JUCE_MAJOR_VERSION 1 | ||||
| #define JUCE_MINOR_VERSION 52 | #define JUCE_MINOR_VERSION 52 | ||||
| #define JUCE_BUILDNUMBER 38 | |||||
| #define JUCE_BUILDNUMBER 39 | |||||
| /** Current Juce version number. | /** Current Juce version number. | ||||
| @@ -87,7 +87,7 @@ END_JUCE_NAMESPACE | |||||
| - (NSRange) markedRange; | - (NSRange) markedRange; | ||||
| - (NSRange) selectedRange; | - (NSRange) selectedRange; | ||||
| - (NSRect) firstRectForCharacterRange: (NSRange) theRange; | - (NSRect) firstRectForCharacterRange: (NSRange) theRange; | ||||
| - (unsigned int) characterIndexForPoint: (NSPoint) thePoint; | |||||
| - (NSUInteger) characterIndexForPoint: (NSPoint) thePoint; | |||||
| - (NSArray*) validAttributesForMarkedText; | - (NSArray*) validAttributesForMarkedText; | ||||
| - (void) flagsChanged: (NSEvent*) ev; | - (void) flagsChanged: (NSEvent*) ev; | ||||
| @@ -474,13 +474,15 @@ END_JUCE_NAMESPACE | |||||
| - (void) insertText: (id) aString | - (void) insertText: (id) aString | ||||
| { | { | ||||
| // This commits multi-byte text when return is pressed, or after every keypress for western keyboards | // This commits multi-byte text when return is pressed, or after every keypress for western keyboards | ||||
| if ([aString length] > 0) | |||||
| NSString* newText = [aString isKindOfClass: [NSAttributedString class]] ? [aString string] : aString; | |||||
| if ([newText length] > 0) | |||||
| { | { | ||||
| TextInputTarget* const target = owner->findCurrentTextInputTarget(); | TextInputTarget* const target = owner->findCurrentTextInputTarget(); | ||||
| if (target != 0) | if (target != 0) | ||||
| { | { | ||||
| target->insertTextAtCaret (nsStringToJuce ([aString isKindOfClass: [NSAttributedString class]] ? [aString string] : aString)); | |||||
| target->insertTextAtCaret (nsStringToJuce (newText)); | |||||
| textWasInserted = true; | textWasInserted = true; | ||||
| } | } | ||||
| } | } | ||||
| @@ -591,7 +593,7 @@ END_JUCE_NAMESPACE | |||||
| bounds.getHeight()); | bounds.getHeight()); | ||||
| } | } | ||||
| - (unsigned int) characterIndexForPoint: (NSPoint) thePoint | |||||
| - (NSUInteger) characterIndexForPoint: (NSPoint) thePoint | |||||
| { | { | ||||
| (void) thePoint; | (void) thePoint; | ||||
| return NSNotFound; | return NSNotFound; | ||||
| @@ -1437,6 +1439,9 @@ void NSViewComponentPeer::redirectMouseWheel (NSEvent* ev) | |||||
| y = [ev deviceDeltaY] * 0.5f; | y = [ev deviceDeltaY] * 0.5f; | ||||
| } | } | ||||
| @catch (...) | @catch (...) | ||||
| {} | |||||
| if (x == 0 && y == 0) | |||||
| { | { | ||||
| x = [ev deltaX] * 10.0f; | x = [ev deltaX] * 10.0f; | ||||
| y = [ev deltaY] * 10.0f; | y = [ev deltaY] * 10.0f; | ||||