diff dwt/internal/cocoa/NSNumber.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSNumber.d	Sat Aug 09 17:00:02 2008 +0200
+++ b/dwt/internal/cocoa/NSNumber.d	Tue Aug 19 17:35:17 2008 +0200
@@ -36,155 +36,155 @@
 
     public bool boolValue ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_boolValue) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_boolValue) !is null;
     }
 
     public byte charValue ()
     {
-        return cast(byte) OS.objc_msgSend(this.id, OS.sel_charValue);
+        return cast(byte) OS.objc_msgSend(this.id_, OS.sel_charValue);
     }
 
     public NSComparisonResult compare (NSNumber otherNumber)
     {
-        return OS.objc_msgSend(this.id, OS.sel_compare_1, otherNumber !is null ? otherNumber.id : null);
+        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1, otherNumber !is null ? otherNumber.id_ : null);
     }
 
     public NSDecimal decimalValue ()
     {
-        NSDecimal result = new NSDecimal();
-        OS.objc_msgSend_stret(result, this.id, OS.sel_decimalValue);
+        NSDecimal result;
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decimalValue);
         return result;
     }
 
     public NSString descriptionWithLocale (id locale)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
         return result !is null ? new NSString(result) : null;
     }
 
     public double doubleValue ()
     {
-        return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue);
+        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
     }
 
     public float floatValue ()
     {
-        return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_floatValue);
+        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue);
     }
 
     public id initWithBool (bool value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithBool_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBool_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithChar (byte value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithChar_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithChar_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithDouble (double value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithDouble_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDouble_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithFloat (float value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFloat_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFloat_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithInt (int value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithInt_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithInt_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithInteger (int value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithInteger_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithInteger_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithLong (int value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithLong_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLong_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithLongLong (long value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithLongLong_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLongLong_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithShort (short value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithShort_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithShort_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithUnsignedChar (ubyte value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithUnsignedChar_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedChar_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithUnsignedInt (uint value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithUnsignedInt_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedInt_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithUnsignedInteger (uint value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithUnsignedInteger_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedInteger_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithUnsignedLong (uint value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithUnsignedLong_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedLong_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithUnsignedLongLong (ulong value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithUnsignedLongLong_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedLongLong_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public id initWithUnsignedShort (ushort value)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithUnsignedShort_1, value);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedShort_1, value);
         return result !is null ? new id(result) : null;
     }
 
     public int intValue ()
     {
-        return cast(int)OS.objc_msgSend(this.id, OS.sel_intValue);
+        return cast(int)OS.objc_msgSend(this.id_, OS.sel_intValue);
     }
 
     public int integerValue ()
     {
-        return cast(int)OS.objc_msgSend(this.id, OS.sel_integerValue);
+        return cast(int)OS.objc_msgSend(this.id_, OS.sel_integerValue);
     }
 
     public bool isEqualToNumber (NSNumber number)
     {
-        return OS.objc_msgSend(this.id, OS.sel_isEqualToNumber_1, number !is null ? number.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_isEqualToNumber_1, number !is null ? number.id_ : null) !is null;
     }
 
     public long longLongValue ()
     {
-        return cast(long) OS.objc_msgSend(this.id, OS.sel_longLongValue);
+        return cast(long) OS.objc_msgSend(this.id_, OS.sel_longLongValue);
     }
 
     public int longValue ()
     {
-        return cast(int)OS.objc_msgSend(this.id, OS.sel_longValue);
+        return cast(int)OS.objc_msgSend(this.id_, OS.sel_longValue);
     }
 
     public static NSNumber numberWithBool (bool value)
@@ -279,43 +279,43 @@
 
     public short shortValue ()
     {
-        return cast(short) OS.objc_msgSend(this.id, OS.sel_shortValue);
+        return cast(short) OS.objc_msgSend(this.id_, OS.sel_shortValue);
     }
 
     public NSString stringValue ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_stringValue);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
         return result !is null ? new NSString(result) : null;
     }
 
     public ubyte unsignedCharValue ()
     {
-        return cast(ubyte) OS.objc_msgSend(this.id, OS.sel_unsignedCharValue);
+        return cast(ubyte) OS.objc_msgSend(this.id_, OS.sel_unsignedCharValue);
     }
 
     public uint unsignedIntValue ()
     {
-        return cast(uint)OS.objc_msgSend(this.id, OS.sel_unsignedIntValue);
+        return cast(uint)OS.objc_msgSend(this.id_, OS.sel_unsignedIntValue);
     }
 
     public uint unsignedIntegerValue ()
     {
-        return cast(uint)OS.objc_msgSend(this.id, OS.sel_unsignedIntegerValue);
+        return cast(uint)OS.objc_msgSend(this.id_, OS.sel_unsignedIntegerValue);
     }
 
     public ulong unsignedLongLongValue ()
     {
-        return cast(ulong) OS.objc_msgSend(this.id, OS.sel_unsignedLongLongValue);
+        return cast(ulong) OS.objc_msgSend(this.id_, OS.sel_unsignedLongLongValue);
     }
 
     public uint unsignedLongValue ()
     {
-        return cast(uint)OS.objc_msgSend(this.id, OS.sel_unsignedLongValue);
+        return cast(uint)OS.objc_msgSend(this.id_, OS.sel_unsignedLongValue);
     }
 
     public ushort unsignedShortValue ()
     {
-        return cast(ushort) OS.objc_msgSend(this.id, OS.sel_unsignedShortValue);
+        return cast(ushort) OS.objc_msgSend(this.id_, OS.sel_unsignedShortValue);
     }
 
 }