Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSLocale.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 |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
64 return result !is null ? new NSArray(result) : null; | 64 return result !is null ? new NSArray(result) : null; |
65 } | 65 } |
66 | 66 |
67 public static NSString canonicalLocaleIdentifierFromString (NSString string) | 67 public static NSString canonicalLocaleIdentifierFromString (NSString string) |
68 { | 68 { |
69 objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_canonicalLocaleIdentifierFromString_1, string !is null ? string.id : null); | 69 objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_canonicalLocaleIdentifierFromString_1, string !is null ? string.id_ : null); |
70 return result !is null ? new NSString(result) : null; | 70 return result !is null ? new NSString(result) : null; |
71 } | 71 } |
72 | 72 |
73 public static NSArray commonISOCurrencyCodes () | 73 public static NSArray commonISOCurrencyCodes () |
74 { | 74 { |
76 return result !is null ? new NSArray(result) : null; | 76 return result !is null ? new NSArray(result) : null; |
77 } | 77 } |
78 | 78 |
79 public static NSDictionary componentsFromLocaleIdentifier (NSString string) | 79 public static NSDictionary componentsFromLocaleIdentifier (NSString string) |
80 { | 80 { |
81 objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_componentsFromLocaleIdentifier_1, string !is null ? string.id : null); | 81 objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_componentsFromLocaleIdentifier_1, string !is null ? string.id_ : null); |
82 return result !is null ? new NSDictionary(result) : null; | 82 return result !is null ? new NSDictionary(result) : null; |
83 } | 83 } |
84 | 84 |
85 public static id currentLocale () | 85 public static id currentLocale () |
86 { | 86 { |
88 return result !is null ? new id(result) : null; | 88 return result !is null ? new id(result) : null; |
89 } | 89 } |
90 | 90 |
91 public NSString displayNameForKey (id key, id value) | 91 public NSString displayNameForKey (id key, id value) |
92 { | 92 { |
93 objc.id result = OS.objc_msgSend(this.id, OS.sel_displayNameForKey_1value_1, key !is null ? key.id : null, value !is null ? value.id : null); | 93 objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayNameForKey_1value_1, key !is null ? key.id_ : null, value !is null ? value.id_ : null); |
94 return result !is null ? new NSString(result) : null; | 94 return result !is null ? new NSString(result) : null; |
95 } | 95 } |
96 | 96 |
97 public id initWithLocaleIdentifier (NSString string) | 97 public id initWithLocaleIdentifier (NSString string) |
98 { | 98 { |
99 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithLocaleIdentifier_1, string !is null ? string.id : null); | 99 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLocaleIdentifier_1, string !is null ? string.id_ : null); |
100 return result !is null ? new id(result) : null; | 100 return result !is null ? new id(result) : null; |
101 } | 101 } |
102 | 102 |
103 public NSString localeIdentifier () | 103 public NSString localeIdentifier () |
104 { | 104 { |
105 objc.id result = OS.objc_msgSend(this.id, OS.sel_localeIdentifier); | 105 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localeIdentifier); |
106 return result !is null ? new NSString(result) : null; | 106 return result !is null ? new NSString(result) : null; |
107 } | 107 } |
108 | 108 |
109 public static NSString localeIdentifierFromComponents (NSDictionary dict) | 109 public static NSString localeIdentifierFromComponents (NSDictionary dict) |
110 { | 110 { |
111 objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_localeIdentifierFromComponents_1, dict !is null ? dict.id : null); | 111 objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_localeIdentifierFromComponents_1, dict !is null ? dict.id_ : null); |
112 return result !is null ? new NSString(result) : null; | 112 return result !is null ? new NSString(result) : null; |
113 } | 113 } |
114 | 114 |
115 public id objectForKey (id key) | 115 public id objectForKey (id key) |
116 { | 116 { |
117 objc.id result = OS.objc_msgSend(this.id, OS.sel_objectForKey_1, key !is null ? key.id : null); | 117 objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForKey_1, key !is null ? key.id_ : null); |
118 return result !is null ? new id(result) : null; | 118 return result !is null ? new id(result) : null; |
119 } | 119 } |
120 | 120 |
121 public static NSArray preferredLanguages () | 121 public static NSArray preferredLanguages () |
122 { | 122 { |