mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-15 07:01:28 +00:00
CPFormatter support for CPControl which actually works.
This commit is contained in:
+3
-1
@@ -19,6 +19,8 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#import "../Foundation/Ref.h"
|
||||
|
||||
@import "CPFont.j"
|
||||
@import "CPShadow.j"
|
||||
@@ -526,7 +528,7 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
if (_formatter)
|
||||
{
|
||||
var formattedValue = nil;
|
||||
if ([_formatter getObjectValue:@ref(formattedValue) forString:value errorDescription:NULL])
|
||||
if ([_formatter getObjectValue:AT_REF(formattedValue) forString:value errorDescription:NULL])
|
||||
value = formattedValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#import "Ref.h"
|
||||
|
||||
@import <Foundation/CPString.j>
|
||||
@import <Foundation/CPFormatter.j>
|
||||
@@ -126,7 +127,8 @@ CPNumberFormatterRoundHalfUp = CPRoundPlain;
|
||||
{
|
||||
// TODO Error handling.
|
||||
var value = [self numberFromString:aString];
|
||||
@deref(anObject, value);
|
||||
AT_DEREF(anObject, value);
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user