mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
ARC: Update ns framework
This commit is contained in:
@@ -44,8 +44,8 @@ namespace ns
|
||||
NSDictionary* to_dictionary (plist::any_t const& plist)
|
||||
{
|
||||
CFPropertyListRef res = plist::create_cf_property_list(plist);
|
||||
NSDictionary* dict = (NSDictionary*)res;
|
||||
return [dict autorelease];
|
||||
NSDictionary* dict = (NSDictionary*)CFBridgingRelease(res);
|
||||
return dict;
|
||||
}
|
||||
|
||||
NSMutableDictionary* to_mutable_dictionary (plist::any_t const& plist)
|
||||
|
||||
@@ -3,3 +3,6 @@ TEST_SOURCES = tests/*.{cc,mm}
|
||||
LINK += text OakFoundation plist
|
||||
FRAMEWORKS = Cocoa
|
||||
EXPORT = src/*.h
|
||||
|
||||
OBJCXX_FLAGS += -fobjc-arc
|
||||
LN_FLAGS += -fobjc-arc-cxxlib=libc++
|
||||
|
||||
@@ -28,11 +28,10 @@
|
||||
|
||||
- (NSDictionary*)stringAttributes
|
||||
{
|
||||
static NSDictionary* attrs = [[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSColor blackColor], NSForegroundColorAttributeName,
|
||||
[NSFont userFixedPitchFontOfSize:12], NSFontAttributeName,
|
||||
nil] retain];
|
||||
return attrs;
|
||||
return @{
|
||||
NSFontAttributeName: [NSFont userFixedPitchFontOfSize:12],
|
||||
NSForegroundColorAttributeName: [NSColor blackColor]
|
||||
};
|
||||
}
|
||||
|
||||
- (void)keyDown:(NSEvent*)anEvent
|
||||
@@ -58,7 +57,7 @@ public:
|
||||
void test_key_events ()
|
||||
{
|
||||
@autoreleasepool {
|
||||
OakSetupApplicationWithView([[[MyEventView alloc] initWithFrame:NSMakeRect(0, 0, 200, 100)] autorelease], "key_events");
|
||||
OakSetupApplicationWithView([[MyEventView alloc] initWithFrame:NSMakeRect(0, 0, 200, 100)], "key_events");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user