Re: Deadlock during NSCache flush

2013-10-23 Thread Andreas Grosam
You may try the following, which is probably a hack:

In the dealloc method of the Database, do something like this:

- (void) dealloc {
   NSCache* cache = self.cache;
   dispatch_async(private_queue, ^{
   cache = nil;
   });
}

Now, if `cache_remove_with_block` executes on a different thread than where the 
block `cache = nil;` executes, respectively, if it starts executing when 
`cache_remove_with_block` already has been finished, then the dead lock might 
get resolved.


Andreas


On 21.10.2013, at 21:11, Jens Alfke  wrote:

> I’ve just gotten a nasty bug report involving an iOS app hanging when it goes 
> into the background. The problem is a deadlock involving NSCache. I can see 
> what the problem is, but I don’t know what to do about it.
> 
> In a nutshell: An NSCache is evicting objects, and as a result of that its 
> last reference goes away so the cache gets dealloced. Only the dealloc method 
> needs the same (non-recursive) lock the eviction call is using, so it 
> deadlocks.
> 
> Specifically, there is a “database” object that has a strong reference to an 
> NSCache which maps to various ‘document’ objects (indexed by key.) The 
> document objects have strong references back to the database.
> 
> In the situation that hangs, there is a database with one document, neither 
> of which have any external strong references to them. (They probably used to 
> at one point, but the app stopped using that database.) That’s fine, it’s not 
> a reference cycle because the NSCache will get cleaned up. Only the cleanup 
> doesn’t work because:
> 
> 1. OS tells NSCache to flush value objects (`cache_remove_with_block`)
> 2. NSCache releases the document, causing it to be dealloced
> 3. Document’s dealloc implicitly releases its reference to the database
> 4. Database is released and dealloced, implicitly releasing the NSCache
> 5. NSCache is dealloced … but the `cache_destroy` call needs the mutex that’s 
> already being held by `cache_remove_with_block`.
> 
> (You can see the full backtrace in the bug report on github.)
> 
> Has anyone else run into this? Is there a workaround? This has come up once 
> before for me, and I was able to work around it by making the cache-owner 
> object call -autorelease instead of -release on the NSCache, to defer the 
> call to the cache’s dealloc. But I’m now using ARC so that isn’t an option.
> 
> —Jens
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/agrosam%40onlinehome.de
> 
> This email sent to agro...@onlinehome.de


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Deadlock during NSCache flush

2013-10-23 Thread Maxthon Chan
I forgot to zero out the variable after cache is handed to the current 
autorelease pool (after objc_autorelease(objc_retain(_cache));) so it did not 
work.

On Oct 23, 2013, at 16:07, Andreas Grosam  wrote:

> You may try the following, which is probably a hack:
> 
> In the dealloc method of the Database, do something like this:
> 
> - (void) dealloc {
>   NSCache* cache = self.cache;
>   dispatch_async(private_queue, ^{
>   cache = nil;
>   });
> }
> 
> Now, if `cache_remove_with_block` executes on a different thread than where 
> the block `cache = nil;` executes, respectively, if it starts executing when 
> `cache_remove_with_block` already has been finished, then the dead lock might 
> get resolved.
> 
> 
> Andreas
> 
> 
> On 21.10.2013, at 21:11, Jens Alfke  wrote:
> 
>> I’ve just gotten a nasty bug report involving an iOS app hanging when it 
>> goes into the background. The problem is a deadlock involving NSCache. I can 
>> see what the problem is, but I don’t know what to do about it.
>> 
>> In a nutshell: An NSCache is evicting objects, and as a result of that its 
>> last reference goes away so the cache gets dealloced. Only the dealloc 
>> method needs the same (non-recursive) lock the eviction call is using, so it 
>> deadlocks.
>> 
>> Specifically, there is a “database” object that has a strong reference to an 
>> NSCache which maps to various ‘document’ objects (indexed by key.) The 
>> document objects have strong references back to the database.
>> 
>> In the situation that hangs, there is a database with one document, neither 
>> of which have any external strong references to them. (They probably used to 
>> at one point, but the app stopped using that database.) That’s fine, it’s 
>> not a reference cycle because the NSCache will get cleaned up. Only the 
>> cleanup doesn’t work because:
>> 
>> 1. OS tells NSCache to flush value objects (`cache_remove_with_block`)
>> 2. NSCache releases the document, causing it to be dealloced
>> 3. Document’s dealloc implicitly releases its reference to the database
>> 4. Database is released and dealloced, implicitly releasing the NSCache
>> 5. NSCache is dealloced … but the `cache_destroy` call needs the mutex 
>> that’s already being held by `cache_remove_with_block`.
>> 
>> (You can see the full backtrace in the bug report on github.)
>> 
>> Has anyone else run into this? Is there a workaround? This has come up once 
>> before for me, and I was able to work around it by making the cache-owner 
>> object call -autorelease instead of -release on the NSCache, to defer the 
>> call to the cache’s dealloc. But I’m now using ARC so that isn’t an option.
>> 
>> —Jens
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/agrosam%40onlinehome.de
>> 
>> This email sent to agro...@onlinehome.de
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com
> 
> This email sent to xcvi...@me.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Half Activist
Hello,

In an iOS project, that is supposed to handle different kind of files, 
I declared in Info.plist the types handled, with two UTI types, say 
com.mycompany.typeA and com.mycompany.typeB. I also added the expected filename 
extensions for the two, suppose it's .typeA and .typeB.

Now, I instantiate my UIDocument, with the following code: (all 
inspired by UIKit docs, I stripped off some details for the sake of lisibility, 
the file is guaranteed not to exist in the app folder.)

NSString *newDocumentPath = [ AppDocumentPath() 
stringByAppendingPathComponent: @"NewDocument.typeA" ];
// Gives me a valid path to 
/Documents/NewDocument.typeA

NSURL *newDocumentURL = [ NSURL fileURLWithPath: newDocumentPath ];
// Creates a file:// for that path.

MyDocument *newDocument = [ [ MyDocument alloc ] initWithFileURL: 
newDocumentURL ];
// Instantiates the doc


// Finally present.
[ newDocument saveToURL: newDocumentURL
   forSaveOperation: UIDocumentSaveForCreating
  completionHandler: ^(BOOL success) { 
[ self presentViewController: 
newDocument.viewController animated: YES completion: ^(){} ];
} ];


There, in the process of saving, in UIDocument's - 
(id)contentsForType:(NSString *)typeName error:(NSError **)outError
typeName is dyn.age81u5dmr3wu, not conforming to UTI for typeA or typeB.
The url is correct.

At any other point in the execution, fileType reports the wrong type.

With a colleague, we tried on another app where it wasn't checked for 
since it handles only one file format, and it's exactly the same, fileType 
returns another UTI from the one declared in the Info.plist.

All of this under iOS7.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Mike Abdullah

On 23 Oct 2013, at 13:08, Half Activist  wrote:

> Hello,
> 
>   In an iOS project, that is supposed to handle different kind of files, 
> I declared in Info.plist the types handled, with two UTI types, say 
> com.mycompany.typeA and com.mycompany.typeB. I also added the expected 
> filename extensions for the two, suppose it's .typeA and .typeB.
> 
>   Now, I instantiate my UIDocument, with the following code: (all 
> inspired by UIKit docs, I stripped off some details for the sake of 
> lisibility, the file is guaranteed not to exist in the app folder.)
> 
>   NSString *newDocumentPath = [ AppDocumentPath() 
> stringByAppendingPathComponent: @"NewDocument.typeA" ];
>   // Gives me a valid path to 
> /Documents/NewDocument.typeA
> 
>   NSURL *newDocumentURL = [ NSURL fileURLWithPath: newDocumentPath ];
>   // Creates a file:// for that path.
> 
>   MyDocument *newDocument = [ [ MyDocument alloc ] initWithFileURL: 
> newDocumentURL ];
>   // Instantiates the doc
> 
>   
>   // Finally present.
>   [ newDocument saveToURL: newDocumentURL
>  forSaveOperation: UIDocumentSaveForCreating
> completionHandler: ^(BOOL success) { 
>   [ self presentViewController: 
> newDocument.viewController animated: YES completion: ^(){} ];
>   } ];
> 
> 
>   There, in the process of saving, in UIDocument's - 
> (id)contentsForType:(NSString *)typeName error:(NSError **)outError
>   typeName is dyn.age81u5dmr3wu, not conforming to UTI for typeA or typeB.
>   The url is correct.
> 
>   At any other point in the execution, fileType reports the wrong type.
> 
>   With a colleague, we tried on another app where it wasn't checked for 
> since it handles only one file format, and it's exactly the same, fileType 
> returns another UTI from the one declared in the Info.plist.
> 
>   All of this under iOS7.

Show us the relevant portion of your Info.plist file too, please.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Half Activist
Here's the Info.plist section

CFBundleDocumentTypes


CFBundleTypeExtensions

typeA

CFBundleTypeIconFiles

CFBundleTypeName
Document Type A
LSItemContentTypes

com.mycompany.typeA



CFBundleTypeExtensions

typeB

CFBundleTypeIconFiles

CFBundleTypeName
Document Type B
LSItemContentTypes

com.mycompany.typeB




On Oct 23, 2013, at 3:10 PM, Mike Abdullah  wrote:

> 
> On 23 Oct 2013, at 13:08, Half Activist  wrote:
> 
>> Hello,
>> 
>>  In an iOS project, that is supposed to handle different kind of files, 
>> I declared in Info.plist the types handled, with two UTI types, say 
>> com.mycompany.typeA and com.mycompany.typeB. I also added the expected 
>> filename extensions for the two, suppose it's .typeA and .typeB.
>> 
>>  Now, I instantiate my UIDocument, with the following code: (all 
>> inspired by UIKit docs, I stripped off some details for the sake of 
>> lisibility, the file is guaranteed not to exist in the app folder.)
>> 
>>  NSString *newDocumentPath = [ AppDocumentPath() 
>> stringByAppendingPathComponent: @"NewDocument.typeA" ];
>>  // Gives me a valid path to 
>> /Documents/NewDocument.typeA
>> 
>>  NSURL *newDocumentURL = [ NSURL fileURLWithPath: newDocumentPath ];
>>  // Creates a file:// for that path.
>> 
>>  MyDocument *newDocument = [ [ MyDocument alloc ] initWithFileURL: 
>> newDocumentURL ];
>>  // Instantiates the doc
>> 
>>  
>>  // Finally present.
>>  [ newDocument saveToURL: newDocumentURL
>> forSaveOperation: UIDocumentSaveForCreating
>>completionHandler: ^(BOOL success) { 
>>  [ self presentViewController: 
>> newDocument.viewController animated: YES completion: ^(){} ];
>>  } ];
>> 
>> 
>>  There, in the process of saving, in UIDocument's - 
>> (id)contentsForType:(NSString *)typeName error:(NSError **)outError
>>  typeName is dyn.age81u5dmr3wu, not conforming to UTI for typeA or typeB.
>>  The url is correct.
>> 
>>  At any other point in the execution, fileType reports the wrong type.
>> 
>>  With a colleague, we tried on another app where it wasn't checked for 
>> since it handles only one file format, and it's exactly the same, fileType 
>> returns another UTI from the one declared in the Info.plist.
>> 
>>  All of this under iOS7.
> 
> Show us the relevant portion of your Info.plist file too, please.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Kyle Sluder
On Oct 23, 2013, at 6:17 AM, Half Activist  wrote:
> 
> Here's the Info.plist section
> 
> CFBundleDocumentTypes
>
>
>CFBundleTypeExtensions
>
>typeA
>
>CFBundleTypeIconFiles
>
>CFBundleTypeName
>Document Type A
>LSItemContentTypes
>
>com.mycompany.typeA
>
>
>
>CFBundleTypeExtensions
>
>typeB
>
>CFBundleTypeIconFiles
>
>CFBundleTypeName
>Document Type B
>LSItemContentTypes
>
>com.mycompany.typeB
>
>
>
>
>> On Oct 23, 2013, at 3:10 PM, Mike Abdullah  wrote:
>> 
>> 
>>> On 23 Oct 2013, at 13:08, Half Activist  wrote:
>>> 
>>> Hello,
>>> 
>>>In an iOS project, that is supposed to handle different kind of files, I 
>>> declared in Info.plist the types handled, with two UTI types, say 
>>> com.mycompany.typeA and com.mycompany.typeB. I also added the expected 
>>> filename extensions for the two, suppose it's .typeA and .typeB.
>>> 
>>>Now, I instantiate my UIDocument, with the following code: (all inspired 
>>> by UIKit docs, I stripped off some details for the sake of lisibility, the 
>>> file is guaranteed not to exist in the app folder.)
>>> 
>>>  NSString *newDocumentPath = [ AppDocumentPath() 
>>> stringByAppendingPathComponent: @"NewDocument.typeA" ];
>>>// Gives me a valid path to /Documents/NewDocument.typeA
>>> 
>>>  NSURL *newDocumentURL = [ NSURL fileURLWithPath: newDocumentPath ];
>>>// Creates a file:// for that path.
>>> 
>>>  MyDocument *newDocument = [ [ MyDocument alloc ] initWithFileURL: 
>>> newDocumentURL ];
>>>// Instantiates the doc
>>> 
>>>
>>>// Finally present.
>>>[ newDocument saveToURL: newDocumentURL
>>>   forSaveOperation: UIDocumentSaveForCreating
>>>  completionHandler: ^(BOOL success) { 
>>>[ self presentViewController: newDocument.viewController 
>>> animated: YES completion: ^(){} ];
>>>} ];
>>> 
>>> 
>>>There, in the process of saving, in UIDocument's - 
>>> (id)contentsForType:(NSString *)typeName error:(NSError **)outError
>>>typeName is dyn.age81u5dmr3wu, not conforming to UTI for typeA or typeB.
>>>The url is correct.
>>> 
>>>At any other point in the execution, fileType reports the wrong type.
>>> 
>>>With a colleague, we tried on another app where it wasn't checked for 
>>> since it handles only one file format, and it's exactly the same, fileType 
>>> returns another UTI from the one declared in the Info.plist.
>>> 
>>>All of this under iOS7.
>> 
>> Show us the relevant portion of your Info.plist file too, please.
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/kyle%40ksluder.com
> 
> This email sent to k...@ksluder.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Kyle Sluder
> On Oct 23, 2013, at 6:17 AM, Half Activist  wrote:
> 
> Here's the Info.plist section
> 
> CFBundleDocumentTypes
>
>
>CFBundleTypeExtensions
>
>typeA
>
>CFBundleTypeIconFiles
>
>CFBundleTypeName
>Document Type A
>LSItemContentTypes
>
>com.mycompany.typeA
>
>
>
>CFBundleTypeExtensions
>
>typeB
>
>CFBundleTypeIconFiles
>
>CFBundleTypeName
>Document Type B
>LSItemContentTypes
>
>com.mycompany.typeB
>
>
>

1. Fake info is not useful. Real info only.

2. You left out the most important part—your actual UTI declarations 
(UTExportedTypeDeclarations).

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Half Activist
Sorry, here is the exported type section.

UTExportedTypeDeclarations


UTTypeConformsTo

public.xml

UTTypeDescription
Type A
UTTypeIdentifier
com.mycompany.typeA


UTTypeConformsTo

public.xml

UTTypeDescription
typeB
UTTypeIdentifier
com.mycompany.typeB




As for the fake info, I don't know the exact extent of the secrecy i'm supposed 
to have concerning my work, therefore I replaced with typeA and typeB, which in 
any case changes the meaning of the it. I could have replaced with .png and 
.jpg and put some realistic UTI for them, would it appear fake? No? Yet it 
would have been as much.

On Oct 23, 2013, at 5:20 PM, Kyle Sluder  wrote:

>> On Oct 23, 2013, at 6:17 AM, Half Activist  wrote:
>> 
>> Here's the Info.plist section
>> 
>> CFBundleDocumentTypes
>>   
>>   
>>   CFBundleTypeExtensions
>>   
>>   typeA
>>   
>>   CFBundleTypeIconFiles
>>   
>>   CFBundleTypeName
>>   Document Type A
>>   LSItemContentTypes
>>   
>>   com.mycompany.typeA
>>   
>>   
>>   
>>   CFBundleTypeExtensions
>>   
>>   typeB
>>   
>>   CFBundleTypeIconFiles
>>   
>>   CFBundleTypeName
>>   Document Type B
>>   LSItemContentTypes
>>   
>>   com.mycompany.typeB
>>   
>>   
>>   
> 
> 1. Fake info is not useful. Real info only.
> 
> 2. You left out the most important part—your actual UTI declarations 
> (UTExportedTypeDeclarations).
> 
> --Kyle Sluder


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to change highlight colour on NSTableView row

2013-10-23 Thread Uli Kusterer
I blogged about themeing NSTableView a while ago:

http://orangejuiceliberationfront.com/themeing-nstableview/

That lists all the steps for changing highlight and other colors. Did you not 
see that via Google? Does that not work for you for some reason? I have a 
shipping application that uses this approach, and haven't heard any reports 
from users that the selection color was wrong.

-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."



On 21 Oct 2013, at 17:19, Darren Wheatley  wrote:
> Hi,
> 
> I have a custom subclass of NSTableView in my app.
> 
> I would like to change the highlight colour displayed when the user clicks on 
> a row, and have the colour maintained when the NSTableView subclass loses 
> focus.
> 
> I have changed the subclass to ensure that the table is never first 
> responder, and so the user only ever sees the "lost focus" highlight colour 
> (gray by default). This maintains the same highlight colour when the table 
> has focus, and when it doesn't.
> 
> I would now like to change the default gray colour to a custom colour.
> 
> My tableview is currently cell-based. I am targeting 10.7+ so I could switch 
> to view-based if that would give me more options?
> 
> Can anyone suggest a method that will allow me to set a custom highlight 
> colour on on a row when the user clicks on it?
> 
> I've Googled for a solution, but haven't been able to find anything that 
> works.
> 
> Thanks
> 
> Darren.
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/witness.of.teachtext%40gmx.net
> 
> This email sent to witness.of.teacht...@gmx.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Quincey Morris
On Oct 23, 2013, at 08:41 , Half Activist  wrote:

> here is the exported type section

Reading UTI plists makes my head hurt, so I may be getting this wrong, but it 
looks to me like you’ve put the file extension in the document type definition 
instead of in the UTI definition. The extension in the document type definition 
is a legacy thing from the days when no UTI was used, and AFAIK is unused when 
a UTI is specified.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Deadlock during NSCache flush

2013-10-23 Thread Greg Parker
On Oct 22, 2013, at 7:33 PM, Maxthon Chan  wrote:
> Despite ARC banned retain/release/autorelease functions, there are still 
> alternatives there in the form of C functions:
> 
> From CoreFoundation :
> CFRetain() = retain
> CFRelease() = release
> CGBridgingRelease() = autorelease

CFBridgingRelease does not autorelease.


> From LLVM’s requirements to runtime for ARC to work, as prototyped in 
> GNUstep’s :
> objc_retain() = retain
> objc_release() = release
> objc_autorelease() = autorelease
> 
> Prototypes:
> id objc_retain(id);
> void objc_release(id);
> id objc_autorelease(id);

Do not call these functions directly.


-- 
Greg Parker gpar...@apple.com Runtime Wrangler



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Is 10.9 ready for production development?

2013-10-23 Thread Don Carlile
Now that 10.9 has been released, what is the general sense about it being ready 
for production work?  My project is debating moving the developers to 10.9.  
What are others doing?  ANy concerns?

Thanks,
Don Carlile
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Is 10.9 ready for production development?

2013-10-23 Thread Sean McBride
On Wed, 23 Oct 2013 13:33:00 -0600, Don Carlile said:

>Now that 10.9 has been released, what is the general sense about it
>being ready for production work?  My project is debating moving the
>developers to 10.9.  What are others doing?  ANy concerns?

If you have several developers, I'd suggest starting by moving one or two, and 
let them be guinea pigs. :)  I'd also suggest setting up a buildbot/testbot 
running 10.9 to let it find any problems via your  test infrastructure.  (It's 
been pretty smooth for us, but YMMV.)

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Is 10.9 ready for production development?

2013-10-23 Thread Jens Alfke

On Oct 23, 2013, at 12:33 PM, Don Carlile  wrote:

> Now that 10.9 has been released, what is the general sense about it being 
> ready for production work?  My project is debating moving the developers to 
> 10.9.  What are others doing?  ANy concerns?

I’ve been running various builds since June; I think it’s fine for development 
work. Very few significant problems at any point in the development cycle.

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Is 10.9 ready for production development?

2013-10-23 Thread Eric E Dolecki
I haven't tested Xcode but Arduino Editor is borked for me. Some java thing 
that I thought update, but alas no. 

Eric

> On Oct 23, 2013, at 3:39 PM, Sean McBride  wrote:
> 
> On Wed, 23 Oct 2013 13:33:00 -0600, Don Carlile said:
> 
>> Now that 10.9 has been released, what is the general sense about it
>> being ready for production work?  My project is debating moving the
>> developers to 10.9.  What are others doing?  ANy concerns?
> 
> If you have several developers, I'd suggest starting by moving one or two, 
> and let them be guinea pigs. :)  I'd also suggest setting up a 
> buildbot/testbot running 10.9 to let it find any problems via your  test 
> infrastructure.  (It's been pretty smooth for us, but YMMV.)
> 
> Cheers,
> 
> -- 
> 
> Sean McBride, B. Eng s...@rogue-research.com
> Rogue Researchwww.rogue-research.com 
> Mac Software Developer  Montréal, Québec, Canada
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
> 
> This email sent to edole...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Is 10.9 ready for production development?

2013-10-23 Thread Charles Srstka
On Oct 23, 2013, at 2:33 PM, Don Carlile  wrote:

> Now that 10.9 has been released, what is the general sense about it being 
> ready for production work?  My project is debating moving the developers to 
> 10.9.  What are others doing?  ANy concerns?

I've upgraded my development machine to the latest OS X on day 1 each time 
since 10.0. I haven't run into any issues yet.

Charles

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Deadlock during NSCache flush

2013-10-23 Thread Maxthon Chan
There are still situations that you may want a little touch-up so from time to 
time a manual call to these is still needed.

On Oct 24, 2013, at 2:01, Greg Parker  wrote:

> On Oct 22, 2013, at 7:33 PM, Maxthon Chan  wrote:
>> Despite ARC banned retain/release/autorelease functions, there are still 
>> alternatives there in the form of C functions:
>> 
>> From CoreFoundation :
>> CFRetain() = retain
>> CFRelease() = release
>> CGBridgingRelease() = autorelease
> 
> CFBridgingRelease does not autorelease.
> 
> 
>> From LLVM’s requirements to runtime for ARC to work, as prototyped in 
>> GNUstep’s :
>> objc_retain() = retain
>> objc_release() = release
>> objc_autorelease() = autorelease
>> 
>> Prototypes:
>> id objc_retain(id);
>> void objc_release(id);
>> id objc_autorelease(id);
> 
> Do not call these functions directly.
> 
> 
> -- 
> Greg Parker gpar...@apple.com Runtime Wrangler
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Deadlock during NSCache flush

2013-10-23 Thread Chris Hanson
What Greg says on this topic is authoritative.

  -- Chris

Sent from my iPad

> On Oct 23, 2013, at 4:35 PM, Maxthon Chan  wrote:
> 
> There are still situations that you may want a little touch-up so from time 
> to time a manual call to these is still needed.
> 
>> On Oct 24, 2013, at 2:01, Greg Parker  wrote:
>> 
>>> On Oct 22, 2013, at 7:33 PM, Maxthon Chan  wrote:
>>> Despite ARC banned retain/release/autorelease functions, there are still 
>>> alternatives there in the form of C functions:
>>> 
>>> From CoreFoundation :
>>> CFRetain() = retain
>>> CFRelease() = release
>>> CGBridgingRelease() = autorelease
>> 
>> CFBridgingRelease does not autorelease.
>> 
>> 
>>> From LLVM’s requirements to runtime for ARC to work, as prototyped in 
>>> GNUstep’s :
>>> objc_retain() = retain
>>> objc_release() = release
>>> objc_autorelease() = autorelease
>>> 
>>> Prototypes:
>>> id objc_retain(id);
>>> void objc_release(id);
>>> id objc_autorelease(id);
>> 
>> Do not call these functions directly.
>> 
>> 
>> -- 
>> Greg Parker gpar...@apple.com Runtime Wrangler
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/cmh%40me.com
> 
> This email sent to c...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

How to create source-list programmatically?

2013-10-23 Thread Hoon Hwangbo
Hello.

Today, I spend a whole day to configure source-list.
It is typical job, but it work too hard for me because I wanted to avoid 
Interface Builder.

I configured NSOutlineView and subclassed NSTableCellView and assigned my own 
NSImageView and NSTextField
to the properties. I expected to will work like UITableView on iOS, but it 
never worked.

After all my trial failed, I discovered 
SidebarDemo(https://developer.apple.com/library/mac/samplecode/SidebarDemo/Listings/SidebarDemoAppDelegate_m.html)
 sample.
And I realized that just using image-view and text-field supplied by IB will 
clear all the problems.

I think IB is configuring something special classes, and those classes are 
don't seem to be accessible from plain Objective-C code.
Because, when I configured the text-field and image-view myself, NSOutlineView 
doesn't even try to layout it.

So should I always use the IB to make source-list correctly? Is there no 
*purely programatic* - with only code - way to do that?


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Is 10.9 ready for production development?

2013-10-23 Thread Nick Petrov
I am waiting for the 10.9.1 update in case any major bugs show up.  If you have 
a team of developers, it is a good idea to start at least testing your 
development environment right now.  

-Nick
http://code-and-coffee.blogspot.com

On Oct 23, 2013, at 10:33 PM, Don Carlile wrote:

> Now that 10.9 has been released, what is the general sense about it being 
> ready for production work?  My project is debating moving the developers to 
> 10.9.  What are others doing?  ANy concerns?
> 
> Thanks,
> Don Carlile


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Deadlock during NSCache flush

2013-10-23 Thread Maxthon Chan
Situation: I am writing a custom decoder that decodes objects from JSON-based 
archives. My objects gets released prematurely, hence a manual retain is asked 
for.

I need to make this thing work across multiple platforms (that is, Cocoa versus 
GNUstep) but some certain platform does not have the toll-free bridging 
capabilities of CFRetain/CFRelease functions, or even lacked CoreFoundation at 
all (that is, GNUstep can be configured to disable toll-free bridging in their 
implementation of CoreFoundation, or the CoreFoundation library can be missing 
entirely since it is optional to them). Calls to those functions are what I 
have to do to make the decoder work.

On Oct 24, 2013, at 13:22, Chris Hanson  wrote:

> What Greg says on this topic is authoritative.
> 
>  -- Chris
> 
> Sent from my iPad
> 
>> On Oct 23, 2013, at 4:35 PM, Maxthon Chan  wrote:
>> 
>> There are still situations that you may want a little touch-up so from time 
>> to time a manual call to these is still needed.
>> 
>>> On Oct 24, 2013, at 2:01, Greg Parker  wrote:
>>> 
 On Oct 22, 2013, at 7:33 PM, Maxthon Chan  wrote:
 Despite ARC banned retain/release/autorelease functions, there are still 
 alternatives there in the form of C functions:
 
 From CoreFoundation :
 CFRetain() = retain
 CFRelease() = release
 CGBridgingRelease() = autorelease
>>> 
>>> CFBridgingRelease does not autorelease.
>>> 
>>> 
 From LLVM’s requirements to runtime for ARC to work, as prototyped in 
 GNUstep’s :
 objc_retain() = retain
 objc_release() = release
 objc_autorelease() = autorelease
 
 Prototypes:
 id objc_retain(id);
 void objc_release(id);
 id objc_autorelease(id);
>>> 
>>> Do not call these functions directly.
>>> 
>>> 
>>> -- 
>>> Greg Parker gpar...@apple.com Runtime Wrangler
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/cmh%40me.com
>> 
>> This email sent to c...@me.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com