Semi-document architecture

2009-09-04 Thread Rob Keniger
I have an app in development that is currently implemented as a document-based app, but I'm starting to think it makes little sense for it to be so. What I would like is for the app to have a central document management window, from which you could create/delete documents. Although these

Re: Semi-document architecture

2009-09-04 Thread Kyle Sluder
--Kyle Sluder On Sep 3, 2009, at 11:10 PM, Rob Keniger r...@menumachine.com wrote: What I would like is for the app to have a central document management window, from which you could create/delete documents. Although these are logically documents, I don't want the user to be able to be

Hyper link text field overlap its text under box

2009-09-04 Thread Vijay Kanse
I am implemented Hyperlink text filed, and It's doing its all functionality. But Under NSBox, It is giving me overlap text when User click on it. Here I have attached snapshot for same. If I am not using it within box, then it text does not overlap, but it is narrowed with some pixels. So, am

Re: Semi-document architecture

2009-09-04 Thread Rob Keniger
On 04/09/2009, at 4:42 PM, Kyle Sluder wrote: Sounds like a job for a custom NSDocumentController subclass. Of course, thanks for the pointer. The user should not be able to do a Save As. I also don't really want the Command-Clickable title in the document window as the location on disk

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Chris Hanson
On Sep 3, 2009, at 10:14 PM, Scott Anguish wrote: Looking inside zip/tar/tar.gz files (something OpenUp never did) would best be accomplished by writing a QuickLook plug-in (which probably exists. I don’t know about any Quick Look plug-ins, but the ZipBrowser example code both provides a

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Charles Srstka
On Sep 4, 2009, at 12:14 AM, Scott Anguish wrote: Looking inside zip/tar/tar.gz files (something OpenUp never did) would best be accomplished by writing a QuickLook plug-in (which probably exists. Hopefully this isn't considered too much of a shameless plug, but the latest release of

performSelectorInBackground:anObject:

2009-09-04 Thread Rick C.
hello, i use this method at various places in my project as an easy/safe way to do some background processing. i realize with every call it will initiate the selector on a new background thread. but i have noticed by observing activity monitor that it takes quite some time for these threads

removeObserver:forKeyPath: thread safe?

2009-09-04 Thread Andreas Grosam
Hello, while there are many aspects regarding thread-safety in KVO, I'm particularly interested in this question: Using automatic KVO, is it safe to send removeObserver:forKeyPath: from within a thread while there is another thread which may change the property that is being observed?

Re: Problem with Core Midi on 10.6

2009-09-04 Thread Peter Zegelin
Thanks Bill, Yes this was the problem. Peter On 04/09/2009, at 8:43 AM, William Stewart wrote: Peter That's the V1 versus V2 issue I was alluding too below. Up to Snow Leopard, 'aunt' type audio units (V1) worked. With SL we removed these (so it would fail). The V2 audio units

Re: Finding Out When my NSSplitView has Moved

2009-09-04 Thread Peter Zegelin
Thanks Jens, Wouldn't that also get called continuously? I think I have it working by getting the NSSplitViewDidResizeSubviewsNotification and just checking further to see if the subview has collapsed. Peter On 04/09/2009, at 1:11 PM, Jens Alfke wrote: On Sep 3, 2009, at 6:27

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Bill Cheeseman
On Sep 4, 2009, at 5:41 AM, Charles Srstka wrote: the latest release of Pacifist includes a QuickLook plug-in that can view many of the formats that Pacifist can read, which include zip, tar, tar.gz, tar.bz2, and others I just tried installing Charles's Pacifist.qlgenerator alongside

Re: Distinguishing between return and enter in NSTextField

2009-09-04 Thread Michael Domino
Rick, My Mac has a single enter/return key (both words appear on the key, I hate not having a separate enter key). What would you do in that case? On Sep 3, 2009, at 11:18 AM, Rick Mann rm...@latencyzero.com wrote: I would like to use the delegate, but it sends me insertNewLine: for both

Re: Image Thresholding

2009-09-04 Thread Uli Kusterer
Am 03.09.2009 um 07:29 schrieb fawad shafi: I want to convert grayscale or RGB image to Binary Image. Please provide sample code. You've misunderstood something: *you* provide sample code, tell us where it fails and what you've tried to find out why it fails, and we help you by correcting

Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Jean-Daniel Dupas
Le 4 sept. 2009 à 13:20, Bill Cheeseman a écrit : On Sep 4, 2009, at 5:41 AM, Charles Srstka wrote: the latest release of Pacifist includes a QuickLook plug-in that can view many of the formats that Pacifist can read, which include zip, tar, tar.gz, tar.bz2, and others I just tried

Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch
Here is the code in MyDocument: -(IBAction)calculateStat:(id)sender{ fetchedObjects = nil; context = [self managedObjectContext]; fetchRequest = [[NSFetchRequest alloc] init]; entity = [NSEntityDescription entityForName:@Measurement inManagedObjectContext:context];

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant
On Sep 4, 2009, at 9:47 AM, Clayton Leitch wrote: Here is the code in MyDocument: -(IBAction)calculateStat:(id)sender{ fetchedObjects = nil; context = [self managedObjectContext]; fetchRequest = [[NSFetchRequest alloc] init]; entity = [NSEntityDescription

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Andy Lee
Are any objects along the way nil? --Andy On Sep 4, 2009, at 9:47 AM, Clayton Leitch wrote: Here is the code in MyDocument: -(IBAction)calculateStat:(id)sender{ fetchedObjects = nil; context = [self managedObjectContext]; fetchRequest = [[NSFetchRequest alloc] init];

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant
Taking this back on-list where it belongs. On Sep 4, 2009, at 9:53 AM, Clayton Leitch wrote: Yes, there is a Measurement instance in the the data model. Debugger shows that everything is set properly until the array gets no objects in answer to the query. Are you sure? How have

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch
Yes, I saved it as XML and opened the file. Below is what I found: ?xml version=1.0? !DOCTYPE database SYSTEM file:///System/Library/DTDs/CoreData.dtd database databaseInfo version134481920/version UUIDE968A00D-5333-4E12-909D-8709A682BBB7/UUID

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant
On Sep 4, 2009, at 10:24 AM, Clayton Leitch wrote: Yes, I saved it as XML and opened the file. Below is what I found: Okay, so since there're definitely some instances in the store, and nothing is nil in the debugger, the only thing remaining is your message delivery. ... have you

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant
On Sep 4, 2009, at 9:47 AM, Clayton Leitch wrote: fetchedObjects = nil; ... fetchRequest = [[NSFetchRequest alloc] init]; ... fetchedObjects = [context executeFetchRequest:fetchRequest error:error]; ... [fetchRequest release]; One other thing

Re: Binding table columns that change at runtime

2009-09-04 Thread BareFeet
Hi all, I'm fairly comfortable with setting up bindings for table columns to an NSArrayController. Now I'd like to use bindings where the columns change at runtime. Is this possible? I am avoiding using CoreData (so I can run on Mac OS X 10.3 ish and upwards). Picking up on my own post:

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch
The debugger shows 0 objects in the array. Interestingly, this same code works perfectly in a non-NSDocument version of this application. On Sep 4, 2009, at 10:29 AM, I. Savant wrote: On Sep 4, 2009, at 10:24 AM, Clayton Leitch wrote: Yes, I saved it as XML and opened the file. Below is

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant
On Sep 4, 2009, at 10:38 AM, Clayton Leitch wrote: The debugger shows 0 objects in the array. Interestingly, this same code works perfectly in a non-NSDocument version of this application. Wait, when you say it works in a non-NSDocument-based version, it makes me wonder: did you copy

Re: defaultConnection in Snow Leopard

2009-09-04 Thread Tim Murison
On 04/09/09 10:38 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: But it fails to mention, what I should use instead. Any ideas? Take a look at serviceConnectionWIthName:rootObject:, new in 10.5. *** This e-mail and

Re: defaultConnection in Snow Leopard

2009-09-04 Thread Kyle Sluder
On Sep 4, 2009, at 7:38 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: But it fails to mention, what I should use instead. The release notes say, but I don't have them in front of me andjim hesitant to go by memory for fear of miquoting. --Kyle Sluder

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch
I re-typed everything in a freshly produced document based application. Below is the top of the MyDocument.h file. // // MyDocument.h // Blood Pressure Record // // Created by Clayton Leitch on 9/3/09. // Copyright __MyCompanyName__ 2009 . All rights reserved. // #import Cocoa/Cocoa.h

defaultConnection in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann
Snow Leopard tells me about defaultConnection (NSConnection): Returns the default NSConnection object for the current thread. (Deprecated in Mac OS X v10.6.) But it fails to mention, what I should use instead. Any ideas? Kind regards, Gerriet.

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant
On Sep 4, 2009, at 10:48 AM, Clayton Leitch wrote: I re-typed everything in a freshly produced document based application. So you created a new Core Data Document based application and put your code and data model into it, and it's still not working correctly? I'm utterly mystified.

Re: Distinguishing between return and enter in NSTextField

2009-09-04 Thread Rick Mann
I wouldn't do anything at all. I'd still treat return and enter differently. As a separate matter, I hate not having a separate enter key. I wrote a program that re-maps the right-hand option key to behave like an enter key. On Sep 4, 2009, at 05:31:15, Michael Domino wrote: Rick, My

Re: defaultConnection in Snow Leopard

2009-09-04 Thread Jean-Daniel Dupas
Le 4 sept. 2009 à 17:18, Kyle Sluder a écrit : On Sep 4, 2009, at 7:38 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: But it fails to mention, what I should use instead. The release notes say, but I don't have them in front of me andjim hesitant to go by memory for fear of

EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Ian Piper
Hi all, I have been putting together a Core Data application that has three windows. I wanted to control the appearance and disappearance of these windows during the course of the application, so added menu items and buttons with the action makeKeyAndOrderFront. However, I found that the

Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Eric Hermanson
In my experience this can happen for at least 3 reasons. 1. Over-releasing an object, as you state. 2. Sending a message to an object that has already been released (i.e. deallocated). 3. Attempting to access or return a local variable that has not been initialized (although you may get a

NSComboboxCell + setButtonBordered:

2009-09-04 Thread Andrew Shamel
Hi all, I am having trouble with NSComboBoxCell's setButtonBordered: setting, having just updated to the latest XCode+IB versions in Snow Leopard. It appears that my choices are now between a bordered button with one arrow (setButtonBordered:YES) or a bordered button with two arrows

Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Quincey Morris
On Sep 4, 2009, at 09:35, Ian Piper wrote: I have been putting together a Core Data application that has three windows. I wanted to control the appearance and disappearance of these windows during the course of the application, so added menu items and buttons with the action

Re: NSScrollView: Scrollers invisible under Mac OS X 10.6

2009-09-04 Thread Matthias Arndt
Hi Graham, hi Kyle! Another thing to be aware of is that if you do it right, the ruler views managed by the scrollview also just work and allow for the view's zoom. I don't think you should be doing what you're doing to the NSClipView. I don't know what crossed my mind, but I used

Re: performSelectorInBackground:anObject:

2009-09-04 Thread Jens Alfke
On Sep 4, 2009, at 2:55 AM, Rick C. wrote: i use this method at various places in my project as an easy/safe way to do some background processing. i realize with every call it will initiate the selector on a new background thread. but i have noticed by observing activity monitor that it

Re: Input Managers in Snow Leopard

2009-09-04 Thread Kyle Sluder
I'd like to clarify what I said before. What you want to do is not what input managers were intended for. In fact, what you want to do would go beyond the efforts of most input manager haxies, because it would involve replacing window server or Dock functionality. There are a lot of very

Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Kyle Sluder
On Fri, Sep 4, 2009 at 9:35 AM, Ian Piperianpi...@mac.com wrote: I suppose that when I close the window it is released, so when I try to open it again there is nothing to open. Yep. Common pitfall. 1. Why does a window default to having this option checked? It seems odd, since the

capturing a partial screen.

2009-09-04 Thread Development
I am attempting to capture part of the user screen, for instance a window. I'm using the OpenGL screen capture example code to build on so the following is my capture code. When I attempt to capture I get a garbled screen so I know I'm not passing the right value somewhere but I don't know

Re: Binding table columns that change at runtime

2009-09-04 Thread Sean McBride
On 9/4/09 9:41 AM, BareFeet said: I'm fairly comfortable with setting up bindings for table columns to an NSArrayController. Now I'd like to use bindings where the columns change at runtime. Is this possible? I am avoiding using CoreData (so I can run on Mac OS X 10.3 ish and upwards). One way

Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Michael A. Crawford
Graham, I followed your advice. However, there just one minor hitch. I neglected to emphasize that I want the main window to be invisible until the startup processing finished. At that time I would remove the startup window and display the main window. To this end, I unchecked the

Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Jens Alfke
On Sep 4, 2009, at 11:18 AM, Michael A. Crawford wrote: -[[NSApplication sharedApplication] mainWindow] returns nil! -mainWindow returns the frontmost visible document window. It will never return a hidden window. So, when I call -[window makeKeyAndOrderFront] I'm doing so with a nil

Application main menu title behavior change in 10.6

2009-09-04 Thread Jim Turner
Hi all, I have an application (QuicKeys) that allows the user to define menu selection as an action. In our latest version and under Leopard, we present UI that replaces the main menu bar of our app with the menu bar of the target app (via setMainMenu:) so that we can correctly retrieve which

Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Rippit the Ogg Frog
Eric Hermanson wrote: 3. Attempting to access or return a local variable that has not been initialized (although you may get a segmentation fault instead of a BAD_ACCESS, I can't remember). For example, - (BOOL)someMethod { BOOL returnValue; // code in the method that never sets

Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Michael de Haan
Quincey, thank you. With your suggestion, and a private email, and lots of reading :-), I have made some progress. On Sep 3, 2009, at 8:54 PM, Quincey Morris wrote: On Sep 3, 2009, at 20:37, Michael de Haan wrote: Now the part that does not work. changeViewDelta as follows: -(IBAction)

Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Quincey Morris
On Sep 4, 2009, at 12:23, Michael de Haan wrote: (For simplicity, I implement an int state ivar to which drawRect refers) In init, this: - (id)initWithFrame:(NSRect)frame { self = [self setCurrentColor:[NSColor yellowColor]]; [self setState: 1];

Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Michael de Haan
On Sep 4, 2009, at 12:38 PM, Quincey Morris wrote: 1) Even though, as Quincey alluded to, I would have expected the outlet view and self to be equivalent, they are not. It seems as if self to changeViewDelta is a different entity from the outlet view. Ah, that's a different kettle of

NSString -initWithData:encoding returning nil

2009-09-04 Thread Alex Reynolds
I have the following method, which digests a string with the SHA-1 algorithm: - (NSString *) HMACSHA1DigestWithSecretKey:(NSString *)secretKey { unsigned char digest[CC_SHA1_DIGEST_LENGTH]; char *keyCharPtr = strdup([secretKey UTF8String]); char *dataCharPtr = strdup([self UTF8String]);

Re: NSString -initWithData:encoding returning nil

2009-09-04 Thread Kyle Sluder
On Fri, Sep 4, 2009 at 2:28 PM, Alex Reynoldsalexpreyno...@gmail.com wrote: Why would the call to -initWithData:encoding (the encryptedString variable) fail? Question: What are the chances of SHA1 output being a valid UTF-8 string? Answer: Very close to 0. You can't take pseudorandom data

Re: NSString -initWithData:encoding returning nil

2009-09-04 Thread Jens Alfke
On Sep 4, 2009, at 2:28 PM, Alex Reynolds wrote: NSString *encryptedString = [[[NSString alloc] initWithData:encryptedStringData encoding:NSUTF8StringEncoding] autorelease]; You can't interpret arbitrary binary data as a UTF-8 string. The UTF-8 encoding has certain rules — it's a

Re: capturing a partial screen.

2009-09-04 Thread David Hoerl
The solution is (using the original OpenGLScreenCapture project code) to modify this statement in FrameReader.m: glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 0, 0, mWidth, mHeight); to glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 100, 50, mWidth+100, mHeight+50); where

(no subject)

2009-09-04 Thread David Blanton
I want to develop a CocoaTouch app that talks to a web server without doing 'web pages'. I.e. the app does http gets and posts driving php (or other) scripts on the server to access some sql database. Reason for this approach - to use coca table view to display data, generally speaking to

Re: (no subject)

2009-09-04 Thread I. Savant
On Sep 4, 2009, at 6:16 PM, David Blanton wrote: I want to develop a CocoaTouch app that talks to a web server without doing 'web pages'. I.e. the app does http gets and posts driving php (or other) scripts on the server to access some sql database. ... Make sense or shoveling against

Re: (no subject)

2009-09-04 Thread Steven Degutis
This is a common concept. In fact, it's exactly how nearly all twitter apps on the iPhone work. Usually it can be done manually with NSURLConnection and the like, though you may consider using a third-party framework like ASI-HTTP-Request or CocoaREST. -- Steven Degutis

Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Steven Degutis
Generally the idea of a splash screen (as this is called) in Mac apps is frowned upon, by developers and users alike (though users seem to mind slightly less than developers, from my experience). What you should instead do, from my advise, is to asynchronously load your data on a background

Re: capturing a partial screen.

2009-09-04 Thread Steven Degutis
If you're specifically trying to mimic the screenshot-capabilties in Mac OS X itself, you can use the `screencapture` command line utility, coupled with an NSTask object in Cocoa. This is what I use in one of my apps, and what Papaya does. -- Steven Degutis http://www.thoughtfultree.com/

Re: performSelectorInBackground:anObject:

2009-09-04 Thread Rick C.
thanks jens i'll look further into it, rick From: Jens Alfke j...@mooseyard.com To: Rick C. jo_p...@yahoo.com Cc: cocoa dev cocoa-dev@lists.apple.com Sent: Saturday, September 5, 2009 1:29:05 AM Subject: Re: performSelectorInBackground:anObject: On Sep 4,

Re: Application main menu title behavior change in 10.6

2009-09-04 Thread Steven Degutis
If that's indeed the case, then you're out of luck short of using a private API in AppKit (which can be class-dump'd, by the way), which I would not recommend. However, if you wanted, the way I would try it is by changing the name of the application respective of the main menu, or at least look to

Minimum alpha value for transparent windows

2009-09-04 Thread Gabriel Zachmann
I've got a window that is not opaque ( [self setOpaque: NO] ). It contains basically just one view. I fill the view with a semi-transparent gray, like this: semiTransparentGray_ = [NSColor colorWithDeviceRed:0.1 green:0.1 blue: 0.1 alpha: 0.05]; [semiTransparentGray_ set]; NSRectFill( [self

Re: Minimum alpha value for transparent windows

2009-09-04 Thread Jesper Storm Bache
If you are interested in mouse events in your entire window area, then you can use [NSWindow setIgnoresMouseEvents:NO] and not have to worry about faint paint issues. Jesper Storm Bache Core Technologies Adobe Systems Inc On Sep 4, 2009, at 4:02 PM, Gabriel Zachmann wrote: I've got a

Re: Binding table columns that change at runtime

2009-09-04 Thread BareFeet
On 05/09/2009, at 3:16 AM, Sean McBride wrote: On 9/4/09 9:41 AM, BareFeet said: I'm fairly comfortable with setting up bindings for table columns to an NSArrayController. Now I'd like to use bindings where the columns change at runtime. Is this possible? I am avoiding using CoreData (so I

How do I update a constraint on my CALayer?

2009-09-04 Thread Austin Grigg
I have a CATextLayer that I want to be able to vertically align within my view. I can set a constraint to align it to the top of the view, to the middle, or to the bottom; but I want to be able to allow the user to change this on the fly. When I set up my CATextLayer, I use this constraint

Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch
URL is correct and entity is not nil. On Sep 4, 2009, at 12:55 PM, Brent Gulanowski wrote: So, all the other objects leading to the fetch execute look OK? Your context isn't nil? Does your context actually have the right store coordinator with the right store URL? Does NSEntityDescription

No Fix Continue all of a sudden

2009-09-04 Thread Laurent Daudelin
Not sure what I did but now the Fix Continue option is disabled in the Run menu. Using the standard debug configuration for a standard application project, LLVM GCC 4.2, Build active architecture only. Of course, Fix and Continue is turned on for the Debug configuration, both at the

Re: (no subject)

2009-09-04 Thread David Blanton
Thank you I.S. and Steven ... I am off to the races! On Sep 4, 2009, at 4:42 PM, Steven Degutis wrote: This is a common concept. In fact, it's exactly how nearly all twitter apps on the iPhone work. Usually it can be done manually with NSURLConnection and the like, though you may consider

No Fix Continue all of a sudden

2009-09-04 Thread Laurent Daudelin
I think I found it, if anybody is interested. Fix Continue doesn't seem to work with the architecture set to Standard (32/64-bit Universal even if I have Build Active Architecture Only. Reverting to 32-bit Universal allows me to fix and continue. Not sure where the problem is. The

Custom Window not receiving full shadow

2009-09-04 Thread Francisco Tolmasky
I am have a custom window look that I accomplish by having a borderless window with a view that paints its contents. This works fine, however, for some reason the shadow on this window is less pronounced than on normal aqua windows. I've included images below: Normal window: inline:

Re: Custom Window not receiving full shadow

2009-09-04 Thread Steven Degutis
Francisco, Generally this less pronounced shadow is produced by giving an NSPanel the Utility style in IB. As I've never had to do it programmatically, I don't know what the relevant method would be to set this style, but I'm sure it's a style on the NSWindow class, not NSPanel. -- Steven

Re: Custom Window not receiving full shadow

2009-09-04 Thread Steven Degutis
Interestingly, after searching the NSWindow (and NSPanel) docs and google for like 5 minutes, I still can't figure out how to set this small shadow programmatically. Now I'm all curious! Anyone know? -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Fri, Sep 4, 2009 at

Re: Custom Window not receiving full shadow

2009-09-04 Thread Dave Keck
I seem to recall that the opacity of the window affects the intensity of its shadow. Is your borderless window partially transparent? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Custom Window not receiving full shadow

2009-09-04 Thread Francisco Tolmasky
So, I found this on cocoabuilder: http://www.cocoabuilder.com/archive/message/cocoa/2008/2/13/198777 , which suggests using this private API: [window setValue:[NSNumber numberWithInt:10] forKey:@shadowStyle]; However, at least in my attempts, this did not seem to change my shadow,

Re: Application main menu title behavior change in 10.6

2009-09-04 Thread Peter Ammon
On Sep 4, 2009, at 11:31 AM, Jim Turner wrote: Hi all, I have an application (QuicKeys) that allows the user to define menu selection as an action. In our latest version and under Leopard, we present UI that replaces the main menu bar of our app with the menu bar of the target app (via

Termination notifications in foundation tool?

2009-09-04 Thread Luke Evans
OK, mea culpa, this is not strictly about Cocoa, but I'm a member of this list and can see an obvious other list to join to post this (though perhaps someone will enlighten me). I'm making a 'plain' foundation tool for the first time, though using things like Core Data within. I need to

Re: defaultConnection in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann
On 5 Sep 2009, at 00:24, Tim Murison tim.muri...@radialpoint.com wrote: On 04/09/09 10:38 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: But it fails to mention, what I should use instead. Any ideas? Take a look at serviceConnectionWIthName:rootObject:, new in 10.5. Thank you!

Application Design Question

2009-09-04 Thread Marek Kozubal
Hello everyone. I have a DVR (digital video recorder) program I wrote in Windows that I want to re-write on the Mac. And I wanted to get some ideas about how best to use Cocoa objects to make this program work as I'm still relatively new to Cocoa programming. The application has 2 modes,

Re: Termination notifications in foundation tool?

2009-09-04 Thread Greg Guerin
Luke Evans wrote: I need to know when the app/tool is going to terminate (for whatever reason), primarily in order to do a final Core Data save if there are changes to persist, though there may be other things to do. man 3 atexit

Re: Custom Window not receiving full shadow

2009-09-04 Thread Dave Keck
However, at least in my attempts, this did not seem to change my shadow, regardless the value I passed in. It only appears to affect borderless windows; I just tested with a normal, titled window and it didn't change at all. But with borderless windows, it seems to toggle between two shadow

Re: Application Design Question

2009-09-04 Thread Jens Alfke
On Sep 4, 2009, at 4:55 PM, Marek Kozubal wrote: Another question related to this is what API set provides the fastest disk IO under Mac OS X? On the windows side I used FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH flags with the ReadFile/WriteFile API. The fastest will be the

Re: Termination notifications in foundation tool?

2009-09-04 Thread Jens Alfke
On Sep 4, 2009, at 7:34 PM, Greg Guerin wrote: man 3 atexit This is really difficult to use for anything serious since it's called asynchronously, so you have no idea what state the main thread might be in at the time. It's like running on a separate thread, only worse because you

Re: Termination notifications in foundation tool?

2009-09-04 Thread Dave Keck
What I've done in the past is install a signal handler which tells the OS to ignore the signal, but also schedules a future callback on the main thread (via the runloop) that will then cleanly shut down the process. You probably want to catch the signals generated by Ctrl-C or a 'kill'

OpenGL screen captures

2009-09-04 Thread Development
I'm using opengl to do screen captures because that seems to be the fastest way. The problem is that I need the cursor to be visible but it is not. Is there a flag I can set with opengl to make the cursor visible? Or am I going to have to attach an image to it during capture?

Services Menu in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann
I have an app which provides info about files, folders, symlinks, etc. In Leopard the Services Menu of e.g. Finder did show my Get Information regardless whether a file or a folder was selected. In Snow Leopard the Services Menu of Finder is empty whenever a folder is selected (files and

Re: Services Menu in Snow Leopard

2009-09-04 Thread Kyle Sluder
On Sep 4, 2009, at 9:26 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: But, as I said, it IS working for files - only folders don't work. You need to declare that your service is valid in a UTI context that covers all your needs. Perhaps public.item? --Kyle Sluder

Re: Massive slowdown in NSArrayController selections in 10.6

2009-09-04 Thread Rob Keniger
On 04/09/2009, at 12:43 PM, Rob Keniger wrote: I'm interested to know if anyone else has been bitten by what seems to be a fairly serious performance regression bug in 10.6 with NSArrayController/NSTreeController. Basically, if you have an NSArrayController with more than a few