Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread Bridger Maxwell
Hmm, I don't quite understand the question. Let me elaborate on what is going on, and hopefully it will clear up. I have a window that hosts a contentView, which holds many subviews, which hold subviews themselves. Some of these subviews are being used to display Core Animation content. I set thei

Getting better compression

2009-02-16 Thread Graham Cox
I have a script that runs during my distribution build that compresses my app using zip. If I use the Finder's "Compress" command I get almost twice as much compression. Isn't the Finder using zip? If so, what command-line arguments would give me better compression that what I am getting (t

Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread Scott Anguish
What you're doing is enabling layer-backing for the view (calling setWantsLayer:) but you haven't created a layer yourself. If you don't create and set the layer to be your own layer, before setWantsLayer: you're letting the view create and manage it, and it isn't yours to mess with. the vi

Re: Getting better compression

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 10:51, Graham Cox a écrit : I have a script that runs during my distribution build that compresses my app using zip. If I use the Finder's "Compress" command I get almost twice as much compression. Isn't the Finder using zip? If so, what command-line arguments would give m

Re: Getting better compression

2009-02-16 Thread Graham Cox
On 16 Feb 2009, at 9:48 pm, Jean-Daniel Dupas wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (less compression) and -9 indicates the

Re: Getting better compression

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 11:53, Graham Cox a écrit : On 16 Feb 2009, at 9:48 pm, Jean-Daniel Dupas wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression me

Re: Getting better compression

2009-02-16 Thread Graham Cox
On 16 Feb 2009, at 9:53 pm, Graham Cox wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (less compression) and -9 indicates the slowest

Re: Getting better compression

2009-02-16 Thread Torsten Curdt
http://vafer.org/blog/20060502110034 cheers -- Torsten http://twitter.com/tcurdt ___ 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)l

Show Panel in another Application

2009-02-16 Thread rajesh
Hi All, In one of my applications(Say AppX) I have a floating panel, and there is a AppY with a menu item which tell the AppX to show the panel. The obvious problem is panel show up but when click is performed on it , it makes the entire application(AppX) active and pushing the AppY back.

Re: Getting better compression

2009-02-16 Thread matt . gough
I just looked and it is there. Open that page and search for -6. Matt On 16 Feb 2009, at 11:53, Graham Cox wrote: I did look there first thing. I don't see that option or that text. http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/zip.1.html --Graham _

Re: Getting better compression

2009-02-16 Thread Graham Cox
On 16 Feb 2009, at 9:55 pm, Jean-Daniel Dupas wrote: It is. Just before the example section. (fourth option from the bottom). D'oh you're right - must have "manual blindness" ;-) Anyway, it's still pretty feeble compared with Finder... --Graham

Re: Getting better compression

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 11:57, Graham Cox a écrit : On 16 Feb 2009, at 9:53 pm, Graham Cox wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (le

Re: Show Panel in another Application

2009-02-16 Thread Graham Cox
On 16 Feb 2009, at 9:57 pm, rajesh wrote: In one of my applications(Say AppX) I have a floating panel, and there is a AppY with a menu item which tell the AppX to show the panel. The obvious problem is panel show up but when click is performed on it , it makes the entire application(AppX)

Re: Getting better compression [SOLVED]

2009-02-16 Thread Graham Cox
On 16 Feb 2009, at 10:05 pm, Jean-Daniel Dupas wrote: I think by default zip compresses symlink target instead of the link itself. If you have frameworks in your package, it's possible that zip duplicates you frameworks' headers, executables, and resources. See the -y option: -y Store

Re: Show Panel in another Application

2009-02-16 Thread rajesh
My first reaction to such a feature was same as your point, but I can't help the way it is. I took it for granted to implement it anyway and save some time from arguing about the design. I'l give a background why the requirement demand is so evil. replace "AppY" with one of those applicatio

Retrieve Default Currency Type in Mac, iPhone

2009-02-16 Thread Tharindu Madushanka
Hi, I want to get the currency type of iPhone default selected language. If I add an NSNumberFormatter and format a number I will get a string with the currency type. But I cannot sub string this and get the currency type since it might vary the character size. When international is selected as Uni

Re: Retrieve Default Currency Type in Mac, iPhone

2009-02-16 Thread Graham Cox
On 16 Feb 2009, at 10:30 pm, Tharindu Madushanka wrote: Hi, I want to get the currency type of iPhone default selected language. If I add an NSNumberFormatter and format a number I will get a string with the currency type. But I cannot sub string this and get the currency type since it m

Re: Retrieve Default Currency Type in Mac, iPhone

2009-02-16 Thread Ben
I haven't checked the docs, but could you maybe scan the string up to the first numeric character and use that? - Ben On 16 Feb 2009, at 11:30, Tharindu Madushanka wrote: Hi, I want to get the currency type of iPhone default selected language. If I add an NSNumberFormatter and format a num

NSTimer Question

2009-02-16 Thread Andreas Grosam
Hello, how does a NSTimer object that has been setup with a repeating time interval calculate the time when it fires an event? There may be two possibilities: Say, the initial time is at t0, the interval is T, and the time when it fires the first event is at t1, the second at t2, etc. The

Re: NSTimer Question

2009-02-16 Thread Graham Cox
On 16 Feb 2009, at 11:44 pm, Andreas Grosam wrote: how does a NSTimer object that has been setup with a repeating time interval calculate the time when it fires an event? There may be two possibilities: Say, the initial time is at t0, the interval is T, and the time when it fires the first

Re: NSTimer Question

2009-02-16 Thread Andy Lee
On Feb 16, 2009, at 7:49 AM, Graham Cox wrote: On 16 Feb 2009, at 11:44 pm, Andreas Grosam wrote: how does a NSTimer object that has been setup with a repeating time interval calculate the time when it fires an event? There may be two possibilities: Say, the initial time is at t0, the interv

Re: NSTimer Question

2009-02-16 Thread Jean-Daniel Dupas
Le 16 févr. 09 à 13:44, Andreas Grosam a écrit : Hello, how does a NSTimer object that has been setup with a repeating time interval calculate the time when it fires an event? There may be two possibilities: Say, the initial time is at t0, the interval is T, and the time when it fires t

Re: NSTimer Question

2009-02-16 Thread Andreas Grosam
On Feb 16, 2009, at 3:13 PM, Jean-Daniel Dupas wrote: Le 16 févr. 09 à 13:44, Andreas Grosam a écrit : Hello, how does a NSTimer object that has been setup with a repeating time interval calculate the time when it fires an event? There may be two possibilities: Say, the initial time is

Re: Getting better compression [SOLVED]

2009-02-16 Thread Michael Ash
On Mon, Feb 16, 2009 at 6:14 AM, Graham Cox wrote: > > On 16 Feb 2009, at 10:05 pm, Jean-Daniel Dupas wrote: > >> I think by default zip compresses symlink target instead of the link >> itself. If you have frameworks in your package, it's possible that zip >> duplicates you frameworks' headers, ex

Re: Retrieve Default Currency Type in Mac, iPhone

2009-02-16 Thread Kyle Sluder
On Mon, Feb 16, 2009 at 6:35 AM, Ben wrote: > I haven't checked the docs, but could you maybe scan the string up to the > first numeric character and use that? Aside from there being a more direct and appropriate way to get the symbol, don't some locales put the currency sign after the amount? I'

Re: Show Panel in another Application

2009-02-16 Thread Kyle Sluder
On Mon, Feb 16, 2009 at 5:57 AM, rajesh wrote: > I need panel(From AppX) act as a inspector in AppY. Not gonna happen unless AppX is an LSUIElement; if AppX is a regular application, you can't do it. You could perhaps create a a third LSUIElement application and communicate between it and AppX/A

Re: Retrieve Default Currency Type in Mac, iPhone

2009-02-16 Thread Ruotger Skupin
Hi Ben, Be careful with your assumptions. Some Locales have the currency symbol after the number, e.g. German: 1.234,56 € (note the decimal separator between the 4 and the 5 for additional scanning fun!) Roddi Am 16.02.2009 um 12:35 schrieb Ben: I haven't checked the docs, but could y

Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread Kyle Sluder
On Mon, Feb 16, 2009 at 4:58 AM, Scott Anguish wrote: > Have a look in Animation Overview, specifically the NSView Integration with > Core Animation section of Mac OS X Animation Technologies. it explains > layer-hosting vs layer-backed views. If I may, it doesn't do a good job. It took me much

Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread I. Savant
On Feb 16, 2009, at 10:59 AM, Kyle Sluder wrote: If I may, it doesn't do a good job. It took me much Googling to understand the difference, and I did not find the answer in the documentation. In fact I believe I found it on the list archives. Of course once you get the point, the documentatio

Re: iTableView and subclassing NSTableView

2009-02-16 Thread Corbin Dunn
This sample is very outdated. It sounds like you are trying to use a source list but targeting the Leopard (10.5) SDK. Is that correct? I'm assuming this because the cell doesn't implement: - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect) cellFrame ofView:(NSView *)controlVie

sticky video/audio files in NSTextView with GC on

2009-02-16 Thread Markus Guhe
Hello all, I have this problem: 1. Drag and drop a video or audio file into an NSTextView (or set the text storage programmatically to an attributed string with such an attachment) 2. a) Set the attributed string of the view's text storage programmatically to a different string b) Alte

Re: TableView leaks a lot of memory

2009-02-16 Thread Bill Bumgarner
On Feb 15, 2009, at 11:44 PM, Anders Lassen wrote: Hi, Ok, I will file this as a bug. Kind regards, Anders Lassen Thanks. Got it. The problem -- and it is a bug in the frameworks on the system -- is that the collector doesn't seem to reap anything in your application unless a "real" e

Re: NSRulerView custom labels

2009-02-16 Thread Joel Reymont
Richard, Richard Bannister wrote: > Folks > > I'm working on an app that will be using timestamps in a NSRulerView - > in the format 0:01, 0:02, et al. Have you seen this? http://www.noodlesoft.com/blog/2008/10/05/displaying-line-numbers-with-nstextview/ I'm exploring using NSRulerView for labe

Elements of Garageband Tutor window?

2009-02-16 Thread Christopher Nagel
Hey y'all - I've been away from Cocoa for a few years (doing telecom frameworks), and I'm amazed at how sweet the tools have become! Awesome! So - as a retread-newbie, what do I need to know to develop an application like Garage Band's tutorial I/F (example here: http://www.apple.com/ilife

Using NSRulerView with a non-text view

2009-02-16 Thread Joel Reymont
I would like to use NSRulerView to label stock charts. It already provides the hash marks and seems awfully handly, although the labels will need adjustment. Has anyone used NSRulerView with graphic or other non-text views? I would like to reuse and extend rather than build from scratch.

Re: NSTimer: Test Results

2009-02-16 Thread Andreas Grosam
On Feb 16, 2009, at 4:02 PM, Andreas Grosam wrote: On Feb 16, 2009, at 3:13 PM, Jean-Daniel Dupas wrote: Le 16 févr. 09 à 13:44, Andreas Grosam a écrit : Hello, how does a NSTimer object that has been setup with a repeating time interval calculate the time when it fires an event? Th

Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread E. Wing
I think I ran into this problem about 7 months ago. We ended up filing a DTS incident for an explanation and some work-arounds. If memory serves, the problem was that AppKit was too aggressive about freeing the layer-backing of the NSViews it owns. My application was a mixure of both NSViews and C

Official keycode table?

2009-02-16 Thread Shayne Wissler
Hello, I was searching google for a table that would define the mapping between the keyboard and the keycodes, the best I could find was a program that'd let you manually find out for each key, and this: http://boredzo.org/blog/archives/2007-05-22/virtual-key-codes Is there an official table som

Re: Official keycode table?

2009-02-16 Thread Dave DeLong
When I had to a bunch of stuff messing around with posting keyboard CGEvents, I never found anything like what you're describing (although it would be very nice...). I would totally recommend that Key Codes app that's linked to in the top of the article. That was a life-saver for me. Dav

Re: Official keycode table?

2009-02-16 Thread Eric Schlegel
On Feb 16, 2009, at 12:04 PM, Shayne Wissler wrote: Hello, I was searching google for a table that would define the mapping between the keyboard and the keycodes, the best I could find was a program that'd let you manually find out for each key, and this: http://boredzo.org/blog/archives/2007

Re: Official keycode table?

2009-02-16 Thread Jim Correia
On Feb 16, 2009, at 3:04 PM, Shayne Wissler wrote: Is there an official table somewhere, preferably in an OSX header file? in the 10.5 SDK. - Jim ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread David Duncan
You probably spoke with me, so I'll go ahead and fill in the details :). On Feb 16, 2009, at 11:50 AM, E. Wing wrote: If memory serves, the problem was that AppKit was too aggressive about freeing the layer-backing of the NSViews it owns. My application was a mixure of both NSViews and CALayers

Re: Using NSRulerView with a non-text view

2009-02-16 Thread Carlos Eduardo Mello
Has anyone used NSRulerView with graphic or other non-text views? Nothing extensive - I've done some tests to learn NSRulerView and it seems to work fine with my custom NSViews. My client view is loaded from a nib per document. After nib is loaded, the ruler is set in MyDoument (below), wh

Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread Bridger Maxwell
> > > You must > > - create a layer > - set it as the layer of the view > - then enable setWantsLayer: > Woah, I had no idea I was doing it wrong for so long. :P Inserting the following code is all I have to do, right? [self setLayer:[CALayer layer]]; [self setWantsLayer:YES]; It is good to know

Bindings: Why Doesn't Key Value validation Update The UI?

2009-02-16 Thread Keary Suska
I can't imagine why I haven't come across this before but it appears that when a key-value validation method alters the passed object and returns YES, the view is not updated with the coerced value. I need behavior, for instance, where an NSTextField is supposed to display a numerical value

QTMovie brief pause

2009-02-16 Thread Albert Martin
I've been having a very frustrating issue with QTMovie/QTMovieLayer that I can't seem to get around. Right now I have a QTMovieLayer playing a QTMovie in a window. My goal is to be able to replace the QTMovieLayer with a new layer and movie by calling the replaceSublayer:with: method. Th

Re: Using NSRulerView with a non-text view

2009-02-16 Thread Graham Cox
On 17 Feb 2009, at 4:18 am, Joel Reymont wrote: Has anyone used NSRulerView with graphic or other non-text views? Sure - it works fine. It certainly doesn't appear to care or have any knowledge of the kind of view it encloses, and there's no reason why it should. You tell it everything i

Re: Using NSRulerView with a non-text view

2009-02-16 Thread Joel Reymont
On Feb 16, 2009, at 11:25 PM, Graham Cox wrote: You tell it everything it needs to know when you register the settings - how far apart the marks are and how many submarks that is divided into and so forth. It asks its delegate for everything else. I just wish it asked the delegate for the

Re: NSTimer: Test Results

2009-02-16 Thread Graham Cox
On 17 Feb 2009, at 6:39 am, Andreas Grosam wrote: So, according the documentation, it is neither method A or method B which is used to calculate the firing time. Actually it is: Let ts(i) be the scheduling times, where ts(0) is the initial scheduled time, T is the interval and i refers to t

Re: Using NSRulerView with a non-text view

2009-02-16 Thread Graham Cox
On 17 Feb 2009, at 10:33 am, Joel Reymont wrote: I just wish it asked the delegate for the labels :-(. I agree, that would seem an obviously useful thing to do, but it doesn't. I found the source code for NSRulerView in GNUStep and it appears that the code that draws the marks is intert

Re: Programatically selecting items in a NSTableView

2009-02-16 Thread Damien Cooke
Thanks Nick, I moved all of my tableview population code to AwakeFromNib and it is all working fine. Thanks so much. Regards Damien On 16/02/2009, at 1:18 PM, Nick Zitzmann wrote: On Feb 15, 2009, at 2:27 PM, Damien Cooke wrote: This does not work and I was wondering if 1: can I program

QCCompositionLayer doesn't draw until window resized?

2009-02-16 Thread mike woodworth
I'm having a strange problem integrating a QCCompositionLayer into an existing project. Everything on the window is OpenGLLayer based, so I know the window is properly setup for layer backing. In a stripped down project (with just this QCCompositionLayer on the window) the app launches

Convert Cocoa App to Core Data App

2009-02-16 Thread Walker Argendeli
Not long ago, I created a Cocoa app project in Xcode. I've been happily chugging away on the interface for a little while now, when I realized that I wanted to use Core Data. The problem is, I've been using subversion, so have multiple versions of my .xib, as well as several other files,

NSFormatter not getting called

2009-02-16 Thread Apple Cocoa List
I can't get this very simple NSFormatter to get called on an NSTextField. Here is the formatter: @implementation FileNameFormatter - (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error { NSLog(@"Formatter

Re: NSFormatter not getting called

2009-02-16 Thread Kyle Sluder
You haven't implemented the three required methods -stringForObjectValue:, -getObjectValue:forString:errorDescription:, and -attributedStringForObjectValue:withDefaultAttributes:. http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/DataFormatting/Articles/CreatingACustomFormatter.html#//appl

Re: Convert Cocoa App to Core Data App

2009-02-16 Thread Kyle Sluder
On Mon, Feb 16, 2009 at 7:17 PM, Walker Argendeli wrote: > (Yes, I'm ignorant about Core Data; I'm fairly new to Cocoa) If you're new to Cocoa, you might be a bit intimidated by Core Data. To get an idea of what's necessary to use Core Data, read (and re-read, and re-re-read) the Low Level Core

Re: QTMovie brief pause

2009-02-16 Thread Kyle Sluder
On Mon, Feb 16, 2009 at 6:22 PM, Albert Martin wrote: >newPresentationMovieLayer.movie.autoplay; // THIS LINE IS THE PROBLEM Unfortunately I haven't responded to address your question, but rather to call out your misuse of the dot syntax. The dot syntax is explicitly designed only for th

Re: NSFormatter not getting called

2009-02-16 Thread Todd Freese
So here it is with the other three methods. I had them, just snipped them out of the post. Ops! @implementation FileNameFormatter - (NSString *)stringForObjectValue:(id)anObject { if ([anObject isKindOfClass:[NSString class]]) { NSString *sourceString = [NSString stringW

Re: NSFormatter not getting called

2009-02-16 Thread James Walker
Kyle Sluder wrote: You haven't implemented the three required methods -stringForObjectValue:, -getObjectValue:forString:errorDescription:, and -attributedStringForObjectValue:withDefaultAttributes:. http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/DataFormatting/Articles/CreatingACusto

At what point during loading can NSPersistentDocument fetch?

2009-02-16 Thread Jerry Krinock
My NSPersistentDocument subclass contains a singular managed object which I'd like to make an observer immediately after the document is loaded. So I invoked my little fetcher method to get it during -init, after invoking super, but was surprised to find that the fetch returned empty at th

Re: At what point during loading can NSPersistentDocument fetch?

2009-02-16 Thread Chris Idou
readFromURL is the appropriate place to start populating the document. From: Jerry Krinock To: Cocoa Developers Sent: Tuesday, 17 February, 2009 12:49:44 PM Subject: At what point during loading can NSPersistentDocument fetch? My NSPersistentDocument subcl

Re: Convert Cocoa App to Core Data App

2009-02-16 Thread Chris Hanson
On Feb 16, 2009, at 4:17 PM, Walker Argendeli wrote: Not long ago, I created a Cocoa app project in Xcode. I've been happily chugging away on the interface for a little while now, when I realized that I wanted to use Core Data. The problem is, I've been using subversion, so have multiple

Re: CALayers Lost After Switching Window's ContentView

2009-02-16 Thread Scott Anguish
On 16-Feb-09, at 5:37 PM, Bridger Maxwell wrote: You must - create a layer - set it as the layer of the view - then enable setWantsLayer: Woah, I had no idea I was doing it wrong for so long. :P Inserting the following code is all I have to do, right? well, that is the correct order if