Advice for rotating content in a window so it doesn't get clipped

2012-09-06 Thread Eric Wing
I have a bunch of content in a non-square window I want to rotate with setFrameCenterRotation (using the animator). The content fills the existing window perfectly (i.e. to the edges), so for it to not be clipped on the edges of the window when it rotates, I need to increase the window size

autosavesInPlace and sandbox

2012-09-06 Thread Georg Seifert
Hi, I have a problem. My app (documents based) does not support Lions Version (returns NO in autosavesInPlace). This worked fine until I had to sandbox my app. The problem is, that now the NSDocument autosaving tries to create a file called My Document Name (Autosaved).myExtension next to the

Re: autosavesInPlace and sandbox

2012-09-06 Thread Mike Abdullah
On 6 Sep 2012, at 13:36, Georg Seifert georg.seif...@gmx.de wrote: Hi, I have a problem. My app (documents based) does not support Lions Version (returns NO in autosavesInPlace). This worked fine until I had to sandbox my app. The problem is, that now the NSDocument autosaving tries to

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Fritz Anderson
From what Google tells me, you got a prompt response from Jens Alfke, a very experienced Cocoa-networking programmer, explaining why what you're doing shouldn't be expected to work. Are you looking for a workaround, or just for somebody who will give you better news? I don't think better news

View based outline view and custom NSTableCellViews

2012-09-06 Thread Jean Suisse
Hello, In the content view of the window of a freshly created NIB, I have a view-based outline view. The file owner is set to be MyWindowController. The outlineView is the standard, preconfigured setup, dragged from IB. Now, I would like to modify the default views provided in this standard

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Jean Suisse
Hi, Fritz Anderson is right. We can only agree. And recently, they made following Jens Alfke's advice incredibly easy. Just post a block to one of the available dispatch queues (not the one running on your main thread thought) and let it run its curse. Jean On 6 sept. 2012, at 16:36, Fritz

Cocoa/Xcode/Graph Tutorial Movie

2012-09-06 Thread lbland
hi- Some people might find this Xcode/Cocoa movie interesting: http://www.vvidget.org/develop/movies/maclinegraph.mov thanks!- -lance ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-06 Thread MeldaProduction
there are hosts that can use both AU and VST (and potentially VST3) interfaces for plugins. But there's a big catch - crappy Cocoa design. My plugins are obviously the same for all the interfaces and simply provide all interface implementations, so the they can be both AU and VST, just

Re: CA_DEBUG_TRANSACTIONS=1

2012-09-06 Thread John MacMullin
More or less. It appears that since the documentation in NSBundle does not state that its thread safe, it isn't. From Core Animation tho, it would appear that executing a CATransaction flush may have resolved my original message, but perhaps not the problem. If I read this correctly, this

Re: View based outline view and custom NSTableCellViews

2012-09-06 Thread Seth Willits
On Sep 6, 2012, at 7:46 AM, Jean Suisse wrote: Instinctively, I would create a subclass of NSTableCellView (MyTableCellView), set the NSTableCellView to be MyTableCellView in IB and connect all the outlets to be able to do this at runtime : [MyTableCellView.MyExtraTextField setXXXValue:

Re: CA_DEBUG_TRANSACTIONS=1

2012-09-06 Thread Kyle Sluder
On Thu, Sep 6, 2012, at 09:09 AM, John MacMullin wrote: More or less. It appears that since the documentation in NSBundle does not state that its thread safe, it isn't. This really isn't the whole story. NSBundle isn't thread-safe (don't send it messages from multiple threads), but is

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Dan S
No, actually I've completely missed that it was answered. Thank you. Unfortunatelly, the requester is expecting a return data, error or a redirect. And until the api can be respeced, the sync response has to stay in. It isn't that it needs to load from network every request, but some volotile

Re: CA_DEBUG_TRANSACTIONS=1

2012-09-06 Thread Eric Wing
On 9/5/12, John MacMullin john.macmul...@cox.net wrote: I am getting the following message: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. What in general would be causing this? Just another data point.

Re: Best data source for table view in document window

2012-09-06 Thread Jerry Krinock
On 2012 Sep 05, at 21:13, Martin Hewitson martin.hewit...@aei.mpg.de wrote: I already had a -cleanUp method being called from -windowWillClose: within the NSDocument I just checked my code again and found that I am already using -windowWillClose: as suggested by Graham, for the stuff in the

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Dan S
if you meant using the grand central dispatch, i think that only became available in 10.6, I need to support this for 10.5 On Thu, Sep 6, 2012 at 11:25 AM, Dan S danc...@rebelbase.com wrote: No, actually I've completely missed that it was answered. Thank you. Unfortunatelly, the requester

Re: View based outline view and custom NSTableCellViews

2012-09-06 Thread Jean Suisse
To add a few more informations: If I manually write the outlet declaration in MyTableCellView.h (@property(weak) NSTextField* myTextField); and if I add the @synthesize method in the .m file, this time, IB is letting me do the connection. However, IB is presenting me with a window I am not

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Jens Alfke
On Sep 6, 2012, at 11:25 AM, Dan S danc...@rebelbase.com wrote: I will try to offload the server access to a different thread (though I still need to block the protocol thread because I still have to return the correct data for the current call). No — as I said before, you should _never_

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Dan S
doh! I've been treating -startLoading as a sync routine that must return a final result to the caller, and just now realized that I can return from the routine without completing the request, while the caller will be kept blocked on that request untill I respond with URLProtocolDidFinishLoading

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Dan S
hehe, yes thank you, I was definatelly treating -startLoading it as the end all call. So, following your suggestion, to avoid calling URLProtocolDidFinishLoading from the thread, what would be preferable for calling it from main thread? performSelectorOnMainthread or listening to

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Jens Alfke
On Sep 6, 2012, at 1:21 PM, Dan S danc...@rebelbase.com wrote: I can return from the routine without completing the request, while the caller will be kept blocked on that request untill I respond with URLProtocolDidFinishLoading Well, the caller probably won’t be blocked, since it should be

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-06 Thread MeldaProduction
Create cocoa class at runtime You can check how this is done in Juce, especially in the AU wrapper. http://www.rawmaterialsoftware.com/juce/ HTH Thanks. One trouble - I checked and I didn't find any runtime cocoa class creation - they seem to have special Cocoa views for AU. But I'm

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-06 Thread MeldaProduction
Aaaah, ok ;) thanks. But now - will this actually help? I mean this basically takes one class and creates another class from it realtime. But if plugin A is created, then plugin B is created (which takes classes from A unfortunatelly), wouldn't it also create the new classes from the A

Re: NSData DataWithContentsOfURL within a protocol handler

2012-09-06 Thread Jean Suisse
Yes, I meant GCD. Sorry I missed the part where you told us about supporting 10.5 in your original message. On 6 sept. 2012, at 20:55, Dan S wrote: if you meant using the grand central dispatch, i think that only became available in 10.6, I need to support this for 10.5 On Thu, Sep 6,

Re: autosavesInPlace and sandbox

2012-09-06 Thread Georg Seifert
On 06.09.2012, at 15:32, Mike Abdullah wrote: On 6 Sep 2012, at 13:36, Georg Seifert georg.seif...@gmx.de wrote: Hi, I have a problem. My app (documents based) does not support Lions Version (returns NO in autosavesInPlace). This worked fine until I had to sandbox my app. The problem

Re: autosavesInPlace and sandbox

2012-09-06 Thread Kyle Sluder
On Thu, Sep 6, 2012, at 03:27 PM, Georg Seifert wrote: I actually used autosave in place but my users did not like it at all. If you have to open a lot files all the time just to check something, you do not like that any mouse click might change your document and you are not asked if you what

Re: Best data source for table view in document window

2012-09-06 Thread Graham Cox
On 07/09/2012, at 4:36 AM, Jerry Krinock je...@ieee.org wrote: But I'm still using my other triggers because sometimes my document opens with no windows Don't forget also that Cocoa will be creating instances of your document at all sorts of odd times with Autosave and Versions in play.

Re: autosavesInPlace and sandbox

2012-09-06 Thread Graham Cox
On 07/09/2012, at 8:37 AM, Kyle Sluder k...@ksluder.com wrote: Opting in to +autosavesInPlace doesn't seem like it's there so you can decide whether to adopt it based on user feedback; We've also had a lot of feedback from users who dislike this feature. Once again Apple are foisting

What is NSView's anchorPoint/origin/axis for setFrameCenterRotation?

2012-09-06 Thread Eric Wing
I want to rotate an NSView around its center. (Example: Imagine me rotating a magnetic compass around so the North pointer rotates around to the bottom. I thought setFrameCenterRotation would do this for me. But when I try it (10.8), it always rotates about the bottom-left corner, not the center.