iPhone camera control like RedLaser

2009-07-08 Thread Mike Manzano
The RedLaser app overlays a display on the 3GS' video capture screen, and seems to be able to react to the video in real time. Are they using public APIs to do this? If so, I can't find them. Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Florian Soenens
Hi Brian, you seem to only check for gameScoresTableView and playerManagementTableView. Are your Controller outlets actually connected to these 2 NSTableViews? Regards, Florian. On 06 Jul 2009, at 20:14, Brian Hughes wrote: Hi, I have two tableViews in my application. One works perfectly

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Andy Lee
-(id) tableView: (NSTableView *) aTableView objectValueForTableColumn: (NSTableColumn *) aTableColumn row: (int) rowIndex { id returnValue = nil; if (aTableView == gameScoresTableView) { LNPlayer *currentPlayer = [playersArray objectAtIndex: curre

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Quincey Morris
On Jul 8, 2009, at 00:31, Andy Lee wrote: //returnValue = [player valueForKey: [aTableColumn identifier]]; if ([[aTableColumn identifier] isEqualTo: @"firstName_"] == YES) returnValue = [player firstName_]; else if ([[aTable

The code limit to the media type to .mp3 and .aiff

2009-07-08 Thread Bright
Hi Every Friend, In my app, my purpose is to limit the media type to the .mp3 and .aiff only when I drag files into a table view. Other type is not allowed. The code fragment is to limit the media type to mp3 and .aiff. When I drag file into table view, MP3 file is OK. But the .aiff

Re: Display the elements of array in a tablview ?

2009-07-08 Thread I. Savant
On Jul 7, 2009, at 11:19 PM, Daniel DeCovnick wrote: Point of order, you CAN use bindings in code, it's just far more convenient to do so in IB. Well, yes, but: On Jul 7, 2009, at 1:59 PM, I. Savant wrote: I assumed (s)he meant "not bindings". I might be wrong, but that's how I took

Intercepting console in an app

2009-07-08 Thread Angelo Chen
Hi, I use NSTask to run a command line program(ffmpeg in this case),  NSPipe can't get the output from the program, but I can see those messages from the Console during runtime, is there a way to grab the Console output from a running cocoa app? Thanks, Angelo Yahoo!香港提供網上安全攻略,教你如何防範黑客!

Matrix of NSImageCells, selection and dragging

2009-07-08 Thread Gideon King
Hi, I need do achieve the following scenario: - a matrix of images - multiple selection of the images (including discontiguous selection) - dragging the selected images out (but not dragging images in) My thought was that I could use an NSMatrix with NSImageCells, but my initial test by puttin

Re: Matrix of NSImageCells, selection and dragging

2009-07-08 Thread Graham Cox
On 08/07/2009, at 9:11 PM, Gideon King wrote: Is there already a component out there that does all or some of what I describe above? I wouldn't be surprised if others have needed to do similar things before. Check out IKImageBrowserView. It ticks all the boxes you mention, though it's 1

Re: Matrix of NSImageCells, selection and dragging

2009-07-08 Thread Gideon King
Excellent, thanks. 10.5+ is fine. Gideon ___ 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

Re: Matrix of NSImageCells, selection and dragging

2009-07-08 Thread Gideon King
It appears that the minimum image size for IKImageBrowserView is 40x40 (according to the setZoomValue documentation). I need to use 16x16 images. Is it easy to override this limitation? Any hints? Thanks Gideon ___ Cocoa-dev mailing list (Cocoa-de

NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread Gideon King
Hi, I'd like to create a popup menu like the one in the Keynote format bar where it shows the available fonts written in the font itself (apart from the symbol fonts etc which have their font names used). I imagine this shouldn't be too difficult using the view menu items in 10.5 (I've done

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread Graham Cox
On 08/07/2009, at 11:19 PM, Gideon King wrote: Hi, I'd like to create a popup menu like the one in the Keynote format bar where it shows the available fonts written in the font itself (apart from the symbol fonts etc which have their font names used). I imagine this shouldn't be too diffic

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread I. Savant
On Jul 8, 2009, at 9:26 AM, Graham Cox wrote: [NSMenuItem setAttributedTitle:]; ... and if you want to get really fancy (ie "modern"), you could build the list with regular strings (just "setTitle:") relatively, but use NSOperation/Queue to create / set the attributed titles with the a

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread Graham Cox
On 08/07/2009, at 11:33 PM, I. Savant wrote: [NSMenuItem setAttributedTitle:]; ... and if you want to get really fancy (ie "modern"), you could build the list with regular strings (just "setTitle:") relatively, but use NSOperation/Queue to create / set the attributed titles with the ac

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread I. Savant
On Jul 8, 2009, at 9:46 AM, Graham Cox wrote: - (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)item atIndex: (NSInteger)index shouldCancel:(BOOL)shouldCancel is actually invoked on some sort of background thread/queue, so implementing these methods (the above + numberOfItemsInMenu:) in

Re: iPhone camera control like RedLaser

2009-07-08 Thread Luke Hiesterman
There is no API for that at this time. Luke Sent from my iPhone. On Jul 8, 2009, at 12:00 AM, Mike Manzano wrote: The RedLaser app overlays a display on the 3GS' video capture screen, and seems to be able to react to the video in real time. Are they using public APIs to do this? If so,

Re: iPhone camera control like RedLaser

2009-07-08 Thread Roland King
Is this the RedLaser app I just found on the store? I can't think that Apple would approve an app which used a private API. On Jul 8, 2009, at 9:56 PM, Luke Hiesterman wrote: There is no API for that at this time. Luke Sent from my iPhone. On Jul 8, 2009, at 12:00 AM, Mike Manzano wrote:

Re: iPhone camera control like RedLaser

2009-07-08 Thread Dave DeLong
They're probably just drawing a red line on the screen because they know where the video image should be. =) Dave On Jul 8, 2009, at 8:05 AM, Roland King wrote: Is this the RedLaser app I just found on the store? I can't think that Apple would approve an app which used a private API. _

NSoutlineView Selection Problem with 10.4 SDK

2009-07-08 Thread Rajendran P
I have attached a sample outline view code , the outline view cell has a custom "text and image cell" . Whenever i do selection of an item using mouse and continue holding mouse, the image of the selected item does not change until i release the mouse. This problem is only seen i compile the

NSoutlineView Selection Problem with 10.4 SDK

2009-07-08 Thread Rajendran P
I have attached a sample outline view code ,the outline view cell has a custom "text and image cell" . Whenever i do selection of an item using mouse and continue holding mouse, the image of the selected item does not change until i release the mouse. This problem is only seen i compile the p

Re: iPhone camera control like RedLaser

2009-07-08 Thread Dave Camp
Due to the dynamic nature of Obj-C, there really isn't a good way for Apple to detect most private API uses. Dave On Jul 8, 2009, at 7:05 AM, Roland King wrote: Is this the RedLaser app I just found on the store? I can't think that Apple would approve an app which used a private API. On

Re: iPhone camera control like RedLaser

2009-07-08 Thread Luke the Hiesterman
Let's keep this discussion to what can be done with supported API, not what can be done to subvert API. As for the camera, there's currently no supported method for drawing overlays. I believe a feature request exists for this functionality. Luke On Jul 8, 2009, at 8:35 AM, Dave Camp wrote

Re: Intercepting console in an app

2009-07-08 Thread Greg Guerin
Angelo Chen wrote: I use NSTask to run a command line program(ffmpeg in this case), NSPipe can't get the output from the program, but I can see those messages from the Console during runtime, is there a way to grab the Console output from a running cocoa app? Thanks, Run the ffmpeg comm

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Mac First
On Jul 8, 2009, at 12:31 AM, Andy Lee wrote: if ([[aTableColumn identifier] isEqualTo: @"firstName_"] == YES) returnValue = [player firstName_]; else if ([[aTableColumn identifier] isEqualTo: @"lastName_"]) returnVa

[Job] Cocoa developer at Skype (Mac/iPhone)

2009-07-08 Thread Janno Teelem
Hello, Looking for an experienced Cocoa developer to join our Mac and iPhone development team. You will be working on the Mac and/or iPhone versions of Skype. Ideal candidate should be very familiar with application design, user interface implementation and have a strong understanding of Objective

Waiting on NSTableView to finish changing selection

2009-07-08 Thread Allan Donald
Hi all, I've got an NSTableView that triggers some relatively expensive stuff when its selection changes. If the user is holding down one of the arrow keys to move through the list, I'd like to wait until they've finished before starting the operation. (Somewhat akin to what Mail.app does -- it wo

Help

2009-07-08 Thread himanshu jain
Hi , I got a problem here , problem is with drawRect: method , i am using UIViewController class in which i have one PolygonView instance . I already added this as an outlet in nib file , now what when i am trying to unwrap CGPoints from NSValue ,which i got from NSArray i could not ge

bypass NSApp

2009-07-08 Thread Julien Isorce
Hi, I am in a case where I have no access to the main thread since I am making a plugin which consists of a dynamic library loaded by a third party program. This third party program has nothing to deal with Cocoa and only uses standard C API. And it has it's own main loop. In the plugin I create

Announcement + NSSegmentedCell drawing question

2009-07-08 Thread Daniel Furrer
Hi all, --- intro --- I've been working on bringing the Eiffel programming language [1] to Mac OS X and especially porting the main GUI framework EiffelVision [2] for the last four months. (If you never heard about the language I encourage you to have a look yourself, some of the main features inc

Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Caleb Strockbine
On Jul 4, 2009, at 9:10 PM, mmalc wrote: If you manipulate an instance variable anywhere other than in an initialiser or a dealloc method, you should use a suitable accessor method. On Jul 5, 2009, at 6:53 AM, mmalc wrote: On Jul 4, 2009, at 9:40 PM, WT wrote: [...] There is plenty of Ap

CGSRegisterNotifyProc and unlock screen notification

2009-07-08 Thread Austin
I am wondering if anybody could provide a little details on how to register through CGSRegisterNotifyProc for an "unlock screen" notification. Basically I would like my application to get notified when the user successfully unlock the screen from screensaver. __

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Graham Lee
On 08/07/2009 17:51, "Caleb Strockbine" wrote: > > On Jul 4, 2009, at 9:37 PM, mmalc wrote: > >> In an initaliser method and in dealloc, you should typically set or >> release the variable directly, so in dealloc it would be >> [myArray release]; > > Really? Are -init and -dealloc special in

Re: Waiting on NSTableView to finish changing selection

2009-07-08 Thread Kyle Sluder
On Wed, Jul 8, 2009 at 8:33 AM, Allan Donald wrote: > I've got an NSTableView that triggers some relatively expensive stuff > when its selection changes. If the user is holding down one of the > arrow keys to move through the list, I'd like to wait until they've > finished before starting the opera

Re: CGSRegisterNotifyProc and unlock screen notification

2009-07-08 Thread Kyle Sluder
This was posted five days ago: http://www.cocoabuilder.com/archive/message/cocoa/2009/7/3/240215 --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 moder

Re: Waiting on NSTableView to finish changing selection

2009-07-08 Thread Adam R. Maxwell
On Jul 8, 2009, at 10:15 AM, Kyle Sluder wrote: On Wed, Jul 8, 2009 at 8:33 AM, Allan Donald wrote: I've got an NSTableView that triggers some relatively expensive stuff when its selection changes. If the user is holding down one of the arrow keys to move through the list, I'd like to wait unt

[NSCachedImageRep release]

2009-07-08 Thread Micha Fuhrmann
Hi there, I'm experiencing an extremely frustrating bug. I've got a NSImageCell in a tableview which points to binded to a method returning an NSImage. The image is returned via NSImage imageNamed. As the table is populated and depopulated I get [NSCachedImageRep release]: message sent to

Re: [NSCachedImageRep release]

2009-07-08 Thread I. Savant
On Jul 8, 2009, at 1:57 PM, Micha Fuhrmann wrote: I dunno, I'm lost here. So are we. Describe your bindings. Post any related code. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Erik Buck
I have re-written the Accessors chapter of "Cocoa Design Patterns" several times because of controversy over whether accessors should, can, must or must not be used in initializers and dealloc.  The bottom line is that accessors are the only way to set synthesized instance variables to nil in th

Re: CoreData deleteAll of kind

2009-07-08 Thread Ben Trumbull
On 6 Jul 2009, at 23:37, Devraj Mukherjee wrote: Thanks all for your feedback. Seems quite inefficient. Wonder if this is filed as a suggestion to Apple. Seeming and being aren't the same. If you encounter performance issues with Core Data, please capture a Shark or Instruments trace and

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Sean McBride
On 7/8/09 11:20 AM, Erik Buck said: >The bottom line is that accessors are the only way to set synthesized >instance variables to nil in the modern (64bit) Objective-C runtime. True. But if I remember previous discussions correctly, that's a bug, not a feature. -- __

NSMigrationMissingSourceModelError, and now I can't set the current model version

2009-07-08 Thread Daniel DeCovnick
I'm trying to do a Core Data migration. I've got my .xcmappingmodel, I've created a new version of the MOM, and both are under the same xcdatamodeld. When I launch my application, I get the following error: "Persistant store migration failed, missing source managed object model." A little g

Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Jerry Krinock
Why do I receive KVO notifications when a key is set to the same value that it already is? This happens not only when the new and old values are -isEqual:, but when they are identically the same pointer. I can't think of any reason why anyone would want notification of a no-op. I underst

Re: Waiting on NSTableView to finish changing selection

2009-07-08 Thread Allan Donald
On Wed, Jul 8, 2009 at 6:24 PM, Adam R. Maxwell wrote: > On Jul 8, 2009, at 10:15 AM, Kyle Sluder wrote: > >> Subclass NSTableView and override -keyDown: > > That sounds like a good way to do it. Another is to implement the table > delegate to enqueue/coalesce a notification [snip] Yep, flagging

Re: Core Data Material Properties

2009-07-08 Thread Richard Somers
You might try looking at this tutorial for some ideas. Personal Database of Molecules Cocoa for Scientists (Part XXII): Core Data Models By drewmccormack at Mon, Feb 4 2008 9:04am http://www.macresearch.org/cocoa-scientists-part-xxii-core-data-models If you want specific reco

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Greg Guerin
Jerry Krinock wrote: This happens not only when the new and old values are -isEqual:, but when they are identically the same pointer. I can't think of any reason why anyone would want notification of a no-op. What if the operation isn't a no-op? What if the operation represented some ki

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread BJ Homer
Likewise, what if I had a program that was counting the number of X events per 10 seconds, and I wanted to add a data point to a list every time it was updated? I would definitely want to record the same number twice in a row. It may not be a common case, but reporting the value enables situations

setting a CGContextRef to the current Context

2009-07-08 Thread David Alter
I have CGContextRef that I use for some quartz calls. It is a bitmap context. I would like to set it as the current context so that I can use NSString drawAtPoint: withAttributes:. I do not see how to do this. NSGraphicContext setCurrentContext: takes a NSGraphicContext and not an CGContextRef. I d

Re: setting a CGContextRef to the current Context

2009-07-08 Thread Adam R. Maxwell
On Jul 8, 2009, at 4:03 PM, David Alter wrote: I have CGContextRef that I use for some quartz calls. It is a bitmap context. I would like to set it as the current context so that I can use NSString drawAtPoint: withAttributes:. I do not see how to do this. NSGraphicContext setCurrentContext:

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Quincey Morris
On Jul 8, 2009, at 15:05, Jerry Krinock wrote: Why do I receive KVO notifications when a key is set to the same value that it already is? This happens not only when the new and old values are -isEqual:, but when they are identically the same pointer. I can't think of any reason why anyon

Re: setting a CGContextRef to the current Context

2009-07-08 Thread Scott Thompson
On Jul 8, 2009, at 6:03 PM, David Alter wrote: I have CGContextRef that I use for some quartz calls. It is a bitmap context. I would like to set it as the current context so that I can use NSString drawAtPoint: withAttributes:. I do not see how to do this. NSGraphicContext setCurrentContext:

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Bill Bumgarner
On Jul 8, 2009, at 1:40 PM, Sean McBride wrote: On 7/8/09 11:20 AM, Erik Buck said: The bottom line is that accessors are the only way to set synthesized instance variables to nil in the modern (64bit) Objective-C runtime. True. But if I remember previous discussions correctly, that's a bug, no

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Graham Cox
On 09/07/2009, at 2:51 AM, Caleb Strockbine wrote: Really? Are -init and -dealloc special in some way that makes it a bad idea to use accessors? If you've got an accessor for myArray, why wouldn't you just say: self.myArray = nil? They are special. If a subclass overrides the accessor,

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Kiel Gillard
To prevent this behaviour, you could override setName: to only change the value when the pointers are not the same. Kiel On 09/07/2009, at 8:05 AM, Jerry Krinock wrote: Why do I receive KVO notifications when a key is set to the same value that it already is? This happens not only when th

Is sdp generating incomplete header files?

2009-07-08 Thread Kiel Gillard
Hi all, In an attempt to start using the scripting bridge, I followed the instructions available here If use the sdef tool with the application I would like to

Re: Help

2009-07-08 Thread Graham Cox
On 08/07/2009, at 4:44 PM, himanshu jain wrote: - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // pointsArray =[[NSMutableArray alloc]init]; NSLog(@"init"); //bounds=frame; //NSLog(@"%@",frame); } return self; } -(void)pointsArray:(NSMutableArray*)

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Graham Cox
On 09/07/2009, at 9:49 AM, Kiel Gillard wrote: To prevent this behaviour, you could override setName: to only change the value when the pointers are not the same. That doesn't change the automatic KVO notification behaviour, which takes effect 'outside' of the method itself. Whatever the

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Jerry Krinock
On 2009 Jul 08, at 16:20, Quincey Morris wrote: Excuse me while I put on my properties-are-behavior crusader's hat. :) OK, I get it. Since we don't always use @synthesize, @dynamic, or Xcode's "Scripts" menu (noting the if() test in this implementation) ... - (void)setName:(NSString *)va

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread John C. Randolph
On Jul 8, 2009, at 3:05 PM, Jerry Krinock wrote: Why do I receive KVO notifications when a key is set to the same value that it already is? Because the notification mechanism doesn't know or care if you're setting the same value that's already there. -jcr

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Graham Cox
On 09/07/2009, at 10:18 AM, Jerry Krinock wrote: Maybe this is one of the reasons why it is quite common nowadays that when a user clicks "Undo" 10 times, something is seen to happen on only 5 or 6 of the clicks. This is one of my pet hates too. NSUndoManager could do with a couple of th

Re: Inquiry

2009-07-08 Thread WT
Dear list members, if you received a message sent by me meant to be sent privately to Scott Anguish, yes, I screwed up. I admit it, and I take responsibility for it. No need to reply to me, to him, nor to the list. Some days I should just not get out of bed. Thank you. Wagner _

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread Peter Ammon
On Jul 8, 2009, at 6:46 AM, Graham Cox wrote: On 08/07/2009, at 11:33 PM, I. Savant wrote: [NSMenuItem setAttributedTitle:]; ... and if you want to get really fancy (ie "modern"), you could build the list with regular strings (just "setTitle:") relatively, but use NSOperation/Queue to

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Erik Buck
What about properties that aren't backed by instance variables?  Accessors are still needed to set properties stored in an auxiliary dictionary etc.  There are literally only hours left for me to change a recommendation in "Cocoa Design Patterns" that you SHOULD use accessors in initializers and

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread I. Savant
On Jul 8, 2009, at 9:06 PM, Peter Ammon wrote: So for menus that may take a while to build, consider appending the items as they come in (like the Airport status item), or showing a "Building..." item until you're ready to add the complete set of items. What of menus that already have

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Chris Parker
Because you have no idea what subclassers may do in their overrides of the accessors (e.g. The subclassed accessor may rely on state that's been torn down earlier in -dealloc). It's just not safe, unless you can guarantee that you own the entire inheritance chain. .chris On Jul 8, 2009,

link a web page from a view

2009-07-08 Thread Dragos Ionel
I am working on a simple iPhone application. One page contains a UIView with some information and a link to a website. What controls should I use so that when the user taps the link, the application to stop and the browser application to load the website. Thank you, Dragos ___

RE: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Jeff Laing
> Because you have no idea what subclassers may do in their overrides of > the accessors Sort of invalidates the whole encapsulation promise of OO design, doesn't it? > (e.g. The subclassed accessor may rely on state that's > been torn down earlier in -dealloc). But any subclass that's going to

Re: link a web page from a view

2009-07-08 Thread Hank Heijink (Mailinglists)
This question would be more appropriate on the iPhone Dev Forums. That said, read the iPhone Application Programming Guide, http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ - specifically the section on communicating with other applications f

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Kyle Sluder
On Wed, Jul 8, 2009 at 7:28 PM, Jeff Laing wrote: >> Because you have no idea what subclassers may do in their overrides of >> the accessors > > Sort of invalidates the whole encapsulation promise of OO design, doesn't it? No, it doesn't. It would in fact violate the encapsulation principle if yo

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-08 Thread Graham Cox
On 09/07/2009, at 11:06 AM, Peter Ammon wrote: - (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)item atIndex: (NSInteger)index shouldCancel:(BOOL)shouldCancel is actually invoked on some sort of background thread/queue, so implementing these methods (the above + numberOfItemsInMenu:) in

RE: Clarification on accessors? (was: Yet another memory management question)

2009-07-08 Thread Jeff Laing
> No, it doesn't. It would in fact violate the encapsulation principle > if your -dealloc method required your accessors to not rely on certain > state. The "ability to override accessors violates encapsulation" because it adds additional restrictions to the accessor that the superclass is not a

Re: Intercepting console in an app

2009-07-08 Thread Andrew Farmer
On 8 Jul 2009, at 03:48, Angelo Chen wrote: I use NSTask to run a command line program(ffmpeg in this case), NSPipe can't get the output from the program, but I can see those messages from the Console during runtime, is there a way to grab the Console output from a running cocoa app? Thanks

Re: The code limit to the media type to .mp3 and .aiff

2009-07-08 Thread Andrew Farmer
On 8 Jul 2009, at 00:56, Bright wrote: { if(UTTypeConformsTo(uti, CFSTR("public.aiff-audio"))) You're looking for the wrong thing here. % mdls /System/Library/Sounds/Morse.aiff <...> kMDItemContentType = "public.aifc-audio" kMDItemContentTypeTree = ( "public.aifc-audio",

Re: CGSRegisterNotifyProc and unlock screen notification

2009-07-08 Thread Andrew Farmer
On 8 Jul 2009, at 09:53, Austin wrote: I am wondering if anybody could provide a little details on how to register through CGSRegisterNotifyProc for an "unlock screen" notification. Basically I would like my application to get notified when the user successfully unlock the screen from screensave

Confused about NSPrintInfo margins

2009-07-08 Thread Graham Cox
I'm trying to get information about printing margins so my app can show where the edges of the paper are correctly as well as the content area. I thought that's what NSPrintInfo methods such as -topMargin gave me - the margins set by the Page Setup... dialog. But they never change no matt

Re: Confused about NSPrintInfo margins

2009-07-08 Thread Graham Cox
More Info. If I do this: - (void)setPrintInfo:(NSPrintInfo*) printInfo { [super setPrintInfo:printInfo]; PMPageFormatpmf = (PMPageFormat)[printInfo PMPageFormat]; PMPaper paper; OSStatuserr = PMGetPageFormatPaper( pmf, &paper );