Mercurial > projects > dwt-mac
diff dwt/widgets/IME.d @ 60:62202ce0039f
Updated and fixed many modules to 3.514
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 22 Dec 2008 15:10:19 +0100 |
parents | 6309d49b16b7 |
children | c74ba20de292 |
line wrap: on
line diff
--- a/dwt/widgets/IME.d Tue Dec 09 21:52:21 2008 +0100 +++ b/dwt/widgets/IME.d Mon Dec 22 15:10:19 2008 +0100 @@ -365,11 +365,11 @@ bool insertText (objc.id id, objc.SEL sel, objc.id string) { if (startOffset is -1) return true; NSString str = new NSString (string); - if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) { + if (str.isKindOfClass (cast(objc.Class) OS.objc_getClass ("NSAttributedString"))) { str = (new NSAttributedString (string)).string (); } NSUInteger length = str.length (); - NSUInteger end = startOffset + text.length (); + NSUInteger end = startOffset + text.length; ranges = null; styles = null; caretOffset = commitCount = length; @@ -463,7 +463,7 @@ end = event.end; } NSString str = new NSString (string); - if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) { + if (str.isKindOfClass (cast(objc.Class) OS.objc_getClass ("NSAttributedString"))) { NSAttributedString attribStr = new NSAttributedString (string); str = attribStr.string (); NSUInteger length = str.length (); @@ -472,10 +472,10 @@ NSRange rangeLimit = NSRange (), effectiveRange = NSRange (); rangeLimit.length = length; int rangeCount = 0; - NSRangePointer ptr = OS.malloc (NSRange.sizeof); + NSRangePointer ptr = cast(NSRangePointer) OS.malloc (NSRange.sizeof); for (NSUInteger i = 0; i < length;) { NSDictionary attribs = attribStr.attributesAtIndex(i, ptr, rangeLimit); - OS.memmove (effectiveRange, ptr, NSRange.sizeof); + OS.memmove (&effectiveRange, ptr, NSRange.sizeof); i = effectiveRange.location + effectiveRange.length; ranges [rangeCount * 2] = cast(int)/*64*/effectiveRange.location; ranges [rangeCount * 2 + 1] = cast(int)/*64*/(effectiveRange.location + effectiveRange.length - 1); @@ -497,7 +497,7 @@ ranges = [0, length - 1]; } NSRange range = NSRange (); - OS.memmove (range, selRange, NSRange.sizeof); + OS.memmove (&range, selRange, NSRange.sizeof); caretOffset = cast(int)/*64*/range.location; Event event = new Event (); event.detail = DWT.COMPOSITION_CHANGED;