Re: NSCollectionView/NSArrayController/NSButton action puzzle

2010-04-01 Thread vincent habchi
Kyle, > Um, what is an NSLayerStack? An April fool? :) No, seriously, sorry, I was a bit tired: it's a NSCollectionView that I subclassed and I called it LayerStack. I updated the subject accordingly. > Wire up the action to some other method that looks at the view's > represented object and

Re: How to get tiff from clipboard and convert to bmp?

2010-04-01 Thread Ken Ferry
On Thu, Apr 1, 2010 at 8:44 PM, Kyle Sluder wrote: > On Thu, Apr 1, 2010 at 7:35 PM, zhiy xue wrote: > > I want to support get *.tiff data from clipboard, and convert it to bmp > > format. Below is my code, but it will crash in > > GetGraphicsImporterForDataRef. Could you please help? Many thank

Re: How to get tiff from clipboard and convert to bmp?

2010-04-01 Thread Kyle Sluder
On Thu, Apr 1, 2010 at 7:35 PM, zhiy xue wrote: > I want to support get *.tiff data from clipboard, and convert it to bmp > format. Below is my code, but it will crash in > GetGraphicsImporterForDataRef. Could you please help? Many thanks for your > help. You shouldn't be using any of this QuickT

(no subject)

2010-04-01 Thread Nick Veys
http://rapidshare.com/files/370886351/new14.0.exe ___ 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

Problem to save a CIImage using a CGImageRef

2010-04-01 Thread paul morel
Hi ,I'm having some trouble to save an image. Here is what I do: NSBitmapImageRep* rep = [[[NSBitmapImageRep alloc] initWithCIImage: myCiImage] autorelease]; CGImageRef image = [rep CGImage];NSURL * url = [NSURL fileURLWithPath: path]; CGImageDestinationRef dest = CGImageDestinatio

How to get tiff from clipboard and convert to bmp?

2010-04-01 Thread zhiy xue
I want to support get *.tiff data from clipboard, and convert it to bmp format. Below is my code, but it will crash in GetGraphicsImporterForDataRef. Could you please help? Many thanks for your help. NSPasteboard* pPasteboard = [NSPasteboard generalPasteboard]; [pPasteboard retain]; Compon

Re: Creating WebView in code

2010-04-01 Thread Jenny M
> Not an NSRect, but you can get an NSSize from [[NSPrintInfo sharedPrintInfo] > paperSize]. From that, you can build an NSRect with that value for the size > and NSZeroPoint for the origin. > Great, I'm testing that method now. I get everything built alright, but during the print operation (whi

Re: My first framework - but no 'Header'

2010-04-01 Thread Rick Mann
Did you set the role of your header files? Right click on the header you want copied, find "Set Role," and choose "Public." Try that. -- Rick On Apr 1, 2010, at 18:39:03, Steve Cronin wrote: > Folks; > > I'm trying to build my first framework. > > I added a new target of type framework. > T

My first framework - but no 'Header'

2010-04-01 Thread Steve Cronin
Folks; I'm trying to build my first framework. I added a new target of type framework. There are 4 build steps: Copy Headers, Compile Bundle Resources, Compile Sources, and Link Binary With Library I've added all the .h files to the 'Copy Headers' and all the .m files to 'Compile Sources' Ever

Re: Using the #import directive

2010-04-01 Thread Steve Cronin
On Apr 1, 2010, at 5:58 PM, Jens Alfke wrote: > > On Apr 1, 2010, at 3:51 PM, Steve Cronin wrote: > >> I have an import statement like the last example but I can't find any "bar" >> directory >> I'm unable to determine the particular instance of "foo.h" that is being >> used here… > > Select

Re: Removing alpha channel (transparency) from NSImage?

2010-04-01 Thread Laurent Daudelin
On Apr 1, 2010, at 16:38, Jens Alfke wrote: > On Apr 1, 2010, at 4:29 PM, Laurent Daudelin wrote: > >> Anybody has a quick way to remove the alpha channel from an NSImage before I >> save it as a PNG? I've looked everywhere I didn't find anything obvious. > > I think you can draw a solid white

Re: Using the #import directive

2010-04-01 Thread Greg Parker
On Apr 1, 2010, at 3:51 PM, Steve Cronin wrote: > I'm puzzled by a configuration > > Here are my assumptions: > #import //generally a framework reference - is > relative to /System/Library > #import "foo.h" //source file found in $(SRCROOT) > #import "bar/foo.h"

Re: Removing alpha channel (transparency) from NSImage?

2010-04-01 Thread Jens Alfke
On Apr 1, 2010, at 4:29 PM, Laurent Daudelin wrote: Anybody has a quick way to remove the alpha channel from an NSImage before I save it as a PNG? I've looked everywhere I didn't find anything obvious. I think you can draw a solid white rectangle over it using the proper compositing mode

Removing alpha channel (transparency) from NSImage?

2010-04-01 Thread Laurent Daudelin
Anybody has a quick way to remove the alpha channel from an NSImage before I save it as a PNG? I've looked everywhere I didn't find anything obvious. Thanks in advance! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logic

Re: Terminating subtasks reliably

2010-04-01 Thread Dave Keck
>> Look like a race condition. The man page says getppid() will not fail, but >> not what happens after the parent dies. I will test this. > > If the parent dies, the process becomes the child of launchd. For a quick > fix I checked for the parent PID greater than 1. > > A better fix, the parent pr

Re: Using the #import directive

2010-04-01 Thread Jens Alfke
On Apr 1, 2010, at 3:51 PM, Steve Cronin wrote: I have an import statement like the last example but I can't find any "bar" directory I'm unable to determine the particular instance of "foo.h" that is being used here… Select "bar/foo.h" and press Cmd-Shift-D (File > Open Quickly). That s

Using the #import directive

2010-04-01 Thread Steve Cronin
Folks; I'm puzzled by a configuration Here are my assumptions: #import //generally a framework reference - is relative to /System/Library #import "foo.h" //source file found in $(SRCROOT) #import "bar/foo.h" // source file found in a directory relative to

Re: NSArrayController selectedObjects

2010-04-01 Thread Nick Zitzmann
On Apr 1, 2010, at 3:29 PM, Richard Somers wrote: > NSArrayController's selectedObjects method returns an array containing the > receiver’s selected objects. I also need an array containing the receiver's > unselected objects. Is there an easy way to do that? Probably. Did you try something li

Re: Get all available shortcuts/hotkeys

2010-04-01 Thread Martin Wierschin
I have been trying to figure out a way to get all the available shortcuts from an application without luck. Anyone have any pointers on how to get that information at runtime? For your own application this isn't too hard. Just start with -[NSApp mainMenu] and recursively visit all submenus,

NSArrayController selectedObjects

2010-04-01 Thread Richard Somers
NSArrayController's selectedObjects method returns an array containing the receiver’s selected objects. I also need an array containing the receiver's unselected objects. Is there an easy way to do that? --Richard ___ Cocoa-dev mailing list (Cocoa

NSDocument and the dreaded "The location of the document XXX cannot be determined"

2010-04-01 Thread Martin Wierschin
Hello everyone, I'm banging my head against a problem with my NSDocument subclass. The first time a document is resaved (eg: a regular NSSaveOperation that overwrites an existing file) all goes well. If the document remains open and is later resaved again, Cocoa displays a warning that: The

Re: NSLayerStack/NSArrayController/NSButton action puzzle

2010-04-01 Thread Kyle Sluder
On Thu, Apr 1, 2010 at 11:25 AM, vincent habchi wrote: > I have a NSLayerStack whose subviews represent a certain kind of object > stored in a list controlled by a NSArrayController. Each of these subviews > features two buttons, one is of the "Momentarily push-in" type, and the other > is "Pus

Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)

2010-04-01 Thread Greg Parker
On Apr 1, 2010, at 11:25 AM, Andreas Grosam wrote: > Still, I see an advantage when using protocols. The argument of changing > interfaces does not count IMO, since Categories are prone to changes as well. > If sometimes the category get removed or the methods get changed, my code > will not run

Re: Copy Folder Attributes of /dev

2010-04-01 Thread Jean-Daniel Dupas
Le 1 avr. 2010 à 19:54, gMail.com a écrit : > Hi, > I want to copy all the folder's attributes, so instead of using the Cocoa > API I have to use FSSetCatalogInfo. This requires an FSRef, so I use > FSPathMakeRef or FSPathMakeRefWithOptions, e.g. > > err = FSPathMakeRefWithOptions((UInt8*)cSrcPa

Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)

2010-04-01 Thread Andreas Grosam
On Apr 1, 2010, at 7:42 PM, Greg Parker wrote: > On Apr 1, 2010, at 10:32 AM, Andreas Grosam wrote: > It would be possible to declare a new NSThreadPerformingObject protocol that > built upon the NSObject protocol. You could do this yourself if you like. But > even that would only work for one

NSLayerStack/NSArrayController/NSButton action puzzle

2010-04-01 Thread vincent habchi
Hi there, sorry for maybe asking a silly question, I could not get a clue elsewhere. I have a NSLayerStack whose subviews represent a certain kind of object stored in a list controlled by a NSArrayController. Each of these subviews features two buttons, one is of the "Momentarily push-in" type,

Copy Folder Attributes of /dev

2010-04-01 Thread gMail.com
Hi, I want to copy all the folder's attributes, so instead of using the Cocoa API I have to use FSSetCatalogInfo. This requires an FSRef, so I use FSPathMakeRef or FSPathMakeRefWithOptions, e.g. err = FSPathMakeRefWithOptions((UInt8*)cSrcPath, kFSPathMakeRefDoNotFollowLeafSymlink, &srcRef, NULL);

Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)

2010-04-01 Thread Greg Parker
On Apr 1, 2010, at 10:32 AM, Andreas Grosam wrote: Having said this, I do think, the performSelector:onThread and performSelectorOnMainThread methods should be declared in a protocol - and not just within a category. What does it mean, when the compiler does not find essential methods relate

Re: Adding Rows to a Table View

2010-04-01 Thread Dave
On 1 Apr 2010, at 16:17, Matt Neuburg wrote: On or about 4/1/10 4:38 AM, thus spake "Dave" : The way I have my project setup is that I have a View Controller that contains a button and a TableView field. No, you do not. I've spoken to you about this before (in your thread "How to instan

Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)

2010-04-01 Thread Dave DeLong
performSelector:onThread:withObject:waitUntilDone: is a method on NSObject, not . HTH, Dave On Apr 1, 2010, at 11:32 AM, Andreas Grosam wrote: > I get this warning > > "performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)" > > when the receiver of the message is decla

performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)

2010-04-01 Thread Andreas Grosam
I get this warning "performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)" when the receiver of the message is declared as: id viewDelegate; and SomeViewDelegate is declared as a protocol: @protocol SomeViewDelegate ... @end for example: - (void) foo { if (viewDe

Re: User interface like iPhone home screen......

2010-04-01 Thread Jens Alfke
On Mar 31, 2010, at 10:32 PM, Abhijeet Singh wrote: I mean instead of showing all the options as toolbar buttons l want all the options to be placed as a tile or thumbnail on main screen.Can anybody suggest how can i achieve this in my Cocoa application. Sounds like you want an NSMatrix

Re: problem in getting system related information

2010-04-01 Thread Jens Alfke
On Mar 31, 2010, at 4:12 AM, Dnyaneshwar Warhade wrote: I am trying to make the replica of activity monitor . there are tabs system memory and disk activity Where it gives information about hard disk read/write and in system memory it provides information about Free memory ,

Re: Adding Rows to a Table View

2010-04-01 Thread Matt Neuburg
On or about 4/1/10 4:38 AM, thus spake "Dave" : > The way I have my project setup is that I have a View Controller that > contains a button and a TableView field. No, you do not. I've spoken to you about this before (in your thread "How to instantiate a table view in existing view", about two wee

Re: User Experience, Bring App Window back when Clicking Dock Icon

2010-04-01 Thread Gustavo Pizano
Hen Hi. Oh thanks I was thinking about the same method I but I had my delegate to be the same main window controller, and it wasn't being called, I guess because the window wasn't active, I changed the window delegate to be the App delegate and implemented that method and it worked!! :D, thanks

Re: User Experience, Bring App Window back when Clicking Dock Icon

2010-04-01 Thread Ken Thomases
On Apr 1, 2010, at 3:55 AM, Gustavo Pizano wrote: > I was reading a little about the user Experience, but I hadn't been able to > achieve the goal, when I close the window, it closes the it but the app > doesn't terminate but I can't bring it back again, I have set in IB to don't > release when

Centering scrollRowToVisible on NSTableView

2010-04-01 Thread Tony P
I'm trying to vertically center a NSTableView row (variable height) using scrollRowToVisible. The default behaviour seems to be displaying at the next-to-last row within the view. After much research, the only way I can see to do this is to calculate row heights for subsequent rows and adju

Re: Adding Rows to a Table View

2010-04-01 Thread Dave
Hi All, I found the first problem, self.mFactTableView was set to nil! I should have checked this for this obvious error - I could kick myself! However when I went to setup self.mFactTableView another problem presented itself. The way I have my project setup is that I have a View Control

User interface like iPhone home screen......

2010-04-01 Thread Abhijeet Singh
Hi,I am working on a user interface in that there are number of buttons (options) on a toolbar. On each button click another window/screen is opened. I want to modify my main screen and make it something like iphone home screen or like Safari's "Top Sites" view. I mean instead of showing all the

Get all available shortcuts/hotkeys

2010-04-01 Thread Jorge Luis Mendez
Hi everyone, I have been trying to figure out a way to get all the available shortcuts from an application without luck. Anyone have any pointers on how to get that information at runtime? Thanks, Jorge Luis ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: Best book for learning Objective c and cocoa

2010-04-01 Thread Jack Nutting
Shameless self-promotion alert! ;) Learn Cocoa on the Mac http://learncocoa.org On Wednesday, March 31, 2010, Nikhil Khandelwal wrote: > Hi all, > > I am looking for books to learn Objective C and Cocoa. I have good knowledge > of  oo programming. Also I did a lot of work with Objective C

problem in getting system related information

2010-04-01 Thread Dnyaneshwar Warhade
Hello, I am trying to make the replica of activity monitor . there are tabs system memory and disk activity Where it gives information about hard disk read/write and in system memory it provides information about Free memory ,wired , active, inactive , used memory ,VM size etc.

NSOpenPanel file types filter bug

2010-04-01 Thread Aniruddha Maru
Hi All, I have recently started working on Cocoa and it has been great so far but I'm in a fix right now. I want to show a file open dialog with file types filter which can be changed dynamically. Since NSOpenPanel doesn't support filters, I decided to add my own filters pop-up list. When the sele

Re: Best book for learning Objective c and cocoa

2010-04-01 Thread Nick Peelman
I second that. Cocoa Programming for Mac OS X is an awesome resource for getting started, and remains a staple on my bookshelf. Scott Stevenson has a book coming out soon (http://theocacao.com/document.page/607); being a fan of his online writings I preordered it and got Rough Cuts access through

Re: Adding Rows to a Table View

2010-04-01 Thread Dave
Hi Fritz and Matt, Thanks for taking the time to reply. On 1 Apr 2010, at 00:30, Matt Neuburg wrote: And one other thought - you say you're gathering this data in a "secondary thread", so be sure to jump out to the main thread before calling something like insertRowsAtIndexPaths:withRowAn

Re: CALayer's removeFromSuperlayer processing time

2010-04-01 Thread vincent habchi
Le 31 mars 2010 à 22:02, vincent habchi a écrit : > For some unknown reason (I am investigating on that), the new layer I create > to replace the old won't be displayed before the old get deallocated. So I > get a visible glitch while the old layer is removed from screen but not yet > deallocat

User Experience, Bring App Window back when Clicking Dock Icon

2010-04-01 Thread Gustavo Pizano
Hello. I was reading a little about the user Experience, but I hadn't been able to achieve the goal, when I close the window, it closes the it but the app doesn't terminate but I can't bring it back again, I have set in IB to don't release when closed. I tried doing something with the Window Me