Re: Transparent image

2009-02-10 Thread Christian Graus
OK - I've overridden isOpaque and I am returning NO. This method is being called, so I am sure I've done that bit right. In the same code, I added code to set the background color to clearColor ( net result is that the background is black ) or used the code you gave me earlier ( net result is,

Re: NSScrollView: is setting the document view size supported?

2009-02-10 Thread Luke Evans
Hey guys - thanks. OK, I was setting bounds rather than frame. Oops. Now I don't have the weird zoom effect of the content growing to fit the clip view, but I do have the content marching down relative to the clip view as I switch back and forth between small and large content. I think

Subclassing NSMatrix to tile with hexagons

2009-02-10 Thread Matthew Anderson
Hello All -- I'm trying to subclass NSMatrix to lay cells out in a hexagonal tiling instead of a proper grid (as a foundation for a game with a hexagonally tiled board). It seemed an appropriate base class, as I still index cell locations with rows and columns. Cells are constrained to be of a

Why its necessary to include .dylib file to project as well as to /usr/local/lib?

2009-02-10 Thread Rahulkumar
Hi all, I had created a dynamic library in C++ using Xcode. I had used this library in some project. I added it's .h file to project and .dylib file to frameworks group. To make it work I also copied .dylib to /usr/local/lib/. Can somebody tell me why this is done? What's need of

NSSavePanel called from BSD application - no keyboard input

2009-02-10 Thread Kevin Martin
Hi, I am pretty new to Cocoa and Objective C, so please forgive me if the answer is obvious. I have done a search of the archive and have found a few people experiencing the same problem - but no solution. I have a console application that I want to be able to run on both Windows and OS

RubyCocoa: IB do not read class files

2009-02-10 Thread Tymon Tobolski
Hi I have 10.5.6 and last XCode release. When I create RubyCocoa project, create controller class and add there ib_outlets and ib_action they are not seen in IB. When I drag .rb file to IB i got error http://dl-client.getdropbox.com/u/70986/rc.png . Same is with Read class file. Any

Re: Transparent Image

2009-02-10 Thread Christian Graus
The IKImageView and IKImageBrowserView do some pretty funky stuff under the hood and don't support background or image transparency as far as I am tell. Subclassing them and overriding the drawing methods causes nothing but pain, believe me. OK - so you're saying that the IKImageView is

Re: how to receive some string from iphone's app to stanalne app on mac?

2009-02-10 Thread Carlo Gulliani
[SOLVED] I've found the solution: AsyncSocket class. This class helps keeping some data between 2 apps. You can find more information and to see 'how to use' on http://www.macresearch.org/cocoa-scientists-part-xxix-message i hope, it's helpful From: Ricky

Re: FSExchangeObjects / FSReplaceObject

2009-02-10 Thread Scott Anguish
If it is in published headers (i.e. not private framework headers), it should be documented. If not, it's a bug that should be filed. On 10-Feb-09, at 12:03 AM, Adam R. Maxwell wrote: On Feb 9, 2009, at 8:46 PM, Chris Idou wrote: As I understand it, we are supposed to use FSReplaceObject

Re: NSCollectionView: Different-sized items? Docs?

2009-02-10 Thread Scott Anguish
On 9-Feb-09, at 3:57 PM, Jerry Krinock wrote: Is there any basic documentation like a Collection View Programming Guide, covering NSCollectionView and friends? I've not been able to find any. No, not currently. It's a known issue and is being tracked.

UIScrollView - photo viewer like usage

2009-02-10 Thread Ruotger Skupin
Hi, this is going to sound like an angry rant but actually it isn't. I'm simply a bit frustrated... I have been trying to use UIScrollView to build an Photo app-like image viewer. The view is supposed to show photos with swiping between them, zooming and rotating with interface rotation.

Inserting node in an OutlineView bound to a TreeController and preserve expanded items

2009-02-10 Thread Olivier Lance
** Sorry if this is a double post, I've had some troubles with my subscription so I don't know if it has already been posted ** Hi everybody, I know this subject has seen many entries in this mailing list (or others), but I couldn't find any answer solving my own problem... I'm must also admit

Re: NSSavePanel called from BSD application - no keyboard input

2009-02-10 Thread Kevin Martin
On 9 Feb 2009, at 15:54, Kevin Martin wrote: I have attached code that should allow you to replicate the problem. Sorry, didn't realise I couldn't attach, Here is the code: http://kev.khn.org.uk/nsspprob.mm.txt Thanks, Kevin Martin ___ Cocoa-dev

Re: NSSavePanel called from BSD application - no keyboard input

2009-02-10 Thread Sean McBride
On 2/9/09 3:54 PM, Kevin Martin said: I have a console application that I want to be able to run on both Windows and OS X, The only real UI related task I have is to prompt for paths for loading and saving files. I really prefer a nice dialog to asking the user to enter a path on the console.

Re: One Shot Windows: WARNING

2009-02-10 Thread Michael Ash
On Tue, Feb 10, 2009 at 1:02 AM, Matt Neuburg m...@tidbits.com wrote: Actually, having looked at your example, I reproduced the crash from the bottom up by starting with the Document Architecture template. I created a window controller class, made it the Document nib's owner, overrode

Re: CGFloat and 64 Bit

2009-02-10 Thread Michael Ash
On Tue, Feb 10, 2009 at 10:29 AM, Sean McBride s...@rogue-research.com wrote: On 2/9/09 6:48 PM, Clark Cox said: So, I belive #if defined(x) (x) is good defensive programming. Nope, it's still redundant. And I am 100% sure of that. So is gcc's -Wundef a leftover from a pre-C89 era? Or is

Re: NSScreen order?

2009-02-10 Thread Michael Ash
On Tue, Feb 10, 2009 at 10:31 AM, Jonathan Hendry jonhen...@mac.com wrote: Is there any way to predict how the displays will be numbered? Or to force the Mimo to be screen 3? (I'd rather not add code to the app to account for my toy monitor.) I realize this counts as adding code, but it seems

Re: Why its necessary to include .dylib file to project as well as to /usr/local/lib?

2009-02-10 Thread Nick Zitzmann
On Feb 9, 2009, at 5:37 AM, Rahulkumar wrote: Can somebody tell me why this is done? What's need of including the file in /usr/local/lib even though we included it in project directly? It's a feature of Mach-O, the executable format used by Mac OS X. When you link a binary against a

Re: underlining

2009-02-10 Thread Eric Slosser
On Feb 6, 2009, at 1:08 PM, Eric Slosser wrote: I figured out (thanks to Jeff Lynch) that it's not horribly wrong, it's just that the baseline of the underline is too high. The break in the underline is there because NSLayoutManager doesn't draw on top of the descender of the 'p'. So

Re: NSScreen order?

2009-02-10 Thread Jean-Daniel Dupas
Le 10 févr. 09 à 17:23, Michael Ash a écrit : On Tue, Feb 10, 2009 at 10:31 AM, Jonathan Hendry jonhen...@mac.com wrote: Is there any way to predict how the displays will be numbered? Or to force the Mimo to be screen 3? (I'd rather not add code to the app to account for my toy monitor.)

Re: NSSavePanel called from BSD application - no keyboard input

2009-02-10 Thread Michael Ash
On Mon, Feb 9, 2009 at 10:54 AM, Kevin Martin ke...@khn.org.uk wrote: Hi, I am pretty new to Cocoa and Objective C, so please forgive me if the answer is obvious. I have done a search of the archive and have found a few people experiencing the same problem - but no solution. I have a

Re: NSCollectionView: Different-sized items? Docs?

2009-02-10 Thread kmortensen
This piece is good for beginners - Beyond Tables and Cells: Introducing Animated Collection Views https://developer.apple.com/mac/codingheadstarts.php You need an ADC account. Keith On Tue, February 10, 2009 3:23 am, Scott Anguish wrote: On 9-Feb-09, at 3:57 PM, Jerry Krinock wrote: Is

Objective-C question

2009-02-10 Thread Andy Bettis
I have an id object that I'd like to test to see if it's a certain class or a subclass of that class. isKindOfClass gives a very specific test, is there an easy way to test for an object being a subclass of a class? Rev. Andy ___ Cocoa-dev

Re: CGFloat and 64 Bit

2009-02-10 Thread Clark Cox
On Tue, Feb 10, 2009 at 7:29 AM, Sean McBride s...@rogue-research.com wrote: On 2/9/09 6:48 PM, Clark Cox said: So, I belive #if defined(x) (x) is good defensive programming. Nope, it's still redundant. And I am 100% sure of that. So is gcc's -Wundef a leftover from a pre-C89 era? Or is it

Re: Objective-C question

2009-02-10 Thread Mike Abdullah
Read the documentation on -isKindOfClass: again. It does exactly what you want. -isMemberOfClass: performs the more specific test of excluding subclasses. On 10 Feb 2009, at 17:16, Andy Bettis wrote: I have an id object that I'd like to test to see if it's a certain class or a subclass of

Re: Objective-C question

2009-02-10 Thread Andy Lee
On Feb 10, 2009, at 12:16 PM, Andy Bettis wrote: I have an id object that I'd like to test to see if it's a certain class or a subclass of that class. isKindOfClass gives a very specific test, is there an easy way to test for an object being a subclass of a class? See isMemberOfClass:,

Re: Objective-C question

2009-02-10 Thread Randall Meadows
On Feb 10, 2009, at 10:16 AM, Andy Bettis wrote: I have an id object that I'd like to test to see if it's a certain class or a subclass of that class. isKindOfClass gives a very specific test, is there an easy way to test for an object being a subclass of a class? That's exactly what

Re: Objective-C question

2009-02-10 Thread I. Savant
On Tue, Feb 10, 2009 at 12:26 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: Read the documentation on -isKindOfClass: again. It does exactly what you want. -isMemberOfClass: performs the more specific test of excluding subclasses. In addition, a common gotcha (for me, anyway - it still

Re: Objective-C question

2009-02-10 Thread Jean-Daniel Dupas
Le 10 févr. 09 à 18:33, I. Savant a écrit : On Tue, Feb 10, 2009 at 12:26 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: Read the documentation on -isKindOfClass: again. It does exactly what you want. -isMemberOfClass: performs the more specific test of excluding subclasses. In

Folder watching

2009-02-10 Thread Mark Woods
I'm creating an application that watches certain folders for new files, and then performs various tasks on these files. I'm developing it as a Foundation Tool that will run in the background. I'm having difficulties deciding how best to implement the folder watching code. I was really

Re: Objective-C question

2009-02-10 Thread I. Savant
On Tue, Feb 10, 2009 at 1:10 PM, Jean-Daniel Dupas devli...@shadowlab.org wrote: Just for the record, you can also compare class, but not with the isKindOfClass: method. The method below is similar too ([value isKindOfClass:[NSString class]]) [[value class] isSubclassOfClass:[NSString

Re: One Shot Windows: WARNING

2009-02-10 Thread Matt Neuburg
On Tue, 10 Feb 2009 11:12:17 -0500, Michael Ash michael@gmail.com said: On Tue, Feb 10, 2009 at 1:02 AM, Matt Neuburg m...@tidbits.com wrote: Actually, having looked at your example, I reproduced the crash from the bottom up by starting with the Document Architecture template. I created a

Re: Folder watching

2009-02-10 Thread I. Savant
On Tue, Feb 10, 2009 at 10:30 AM, Mark Woods mwoods...@googlemail.com wrote: So all that leaves is kqueue. Is that my only option? If FSEvents won't work (for compatibility reasons), then yes, KQueue is probably your best shot. Google UKKQueue for a ready-made wrapper. -- I.S.

Re: One Shot Windows: WARNING

2009-02-10 Thread Michael Ash
On Tue, Feb 10, 2009 at 1:18 PM, Matt Neuburg m...@tidbits.com wrote: On Tue, 10 Feb 2009 11:12:17 -0500, Michael Ash michael@gmail.com said: On Tue, Feb 10, 2009 at 1:02 AM, Matt Neuburg m...@tidbits.com wrote: Actually, having looked at your example, I reproduced the crash from the

Re: Folder watching

2009-02-10 Thread Mark Woods
Many thanks for your help. On Feb 10, 2009, at 6:22 PM, I. Savant wrote: On Tue, Feb 10, 2009 at 10:30 AM, Mark Woods mwoods...@googlemail.com wrote: So all that leaves is kqueue. Is that my only option? If FSEvents won't work (for compatibility reasons), then yes, KQueue is probably

Possible to change value transformer for binding at runtime?

2009-02-10 Thread Andreas Eriksson
Hi, is there a way to change the value transformer used for a binding at runtime? / Andreas ___ 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

High-quality image upscaling

2009-02-10 Thread Randall Meadows
I have to upscale JPEG images from 72DPI to, say 250DPI (user- selectable). I figured Core Image would be the way to go, but... The CI docs for CILanczosScaleTransform say You typically use this filter to scale down an image; well, I will be needing to scale the image UP. What filter is

Re: Possible to change value transformer for binding at runtime?

2009-02-10 Thread I. Savant
On Tue, Feb 10, 2009 at 1:35 PM, Andreas Eriksson aeriks...@gmail.com wrote: is there a way to change the value transformer used for a binding at runtime? Just the value transformer? No, I don't believe so. You can, however, -unbind:... then -bind:... with the desired options (a value

Re: Folder watching

2009-02-10 Thread Jerry Krinock
On 2009 Feb 10, at 07:30, Mark Woods wrote: I'm creating an application that watches certain folders for new files, and then performs various tasks on these files. I'm developing it as a Foundation Tool that will run in the background. Well, kqueue would work, but launchd can watch

Re: Transparent image

2009-02-10 Thread Christian Graus
Thanks - that's pretty much what I am going to do. I will move the objects that need transparency to NSImageView today, and then once we get this version out for demo purposes, I will start rewriting the tools I needed from IKImageView. Shame, really, I've wasted days on IKImageView. The docs

Re: RubyCocoa: IB do not read class files

2009-02-10 Thread Tymon Tobolski
Wiadomość napisana w dniu 2009-02-10, o godz. 20:22, przez Matthew Firlik: On Feb 9, 2009, at 9:38 AM, Tymon Tobolski wrote: I have 10.5.6 and last XCode release. When I create RubyCocoa project, create controller class and add there ib_outlets and ib_action they are not seen in IB.

Re: -[PDFView drawPage:] and Printing

2009-02-10 Thread John Calhoun
On Feb 9, 2009, at 8:51 PM, Kyle Sluder wrote: Okay, so at this point I guess I need to establish just what's going on. Does PDFView refer to a view containing the enclosing scroll view, or perhaps the scroll view itself? For better or worse, the PDFView is the enclosing view ... but as you

Re: -[PDFView drawPage:] and Printing

2009-02-10 Thread Kyle Sluder
On Tue, Feb 10, 2009 at 2:59 PM, John Calhoun calho...@apple.com wrote: -[PDFView drawPage:] was put in PDFView as a convenience so it can be overriden in a subclass of PDFView. The default implementation of this method calls -[PDFPage drawWithBox:] for the page in question. Excellent, it all

Re: Distributed Objects question

2009-02-10 Thread Allyn Bauer
Thanks for the response Ken. Do you have any online resources that outline details regarding a communication protocol? Neither of the books I have discuss it, and I'm having trouble finding a good online resource. I usually work best with example code, so if that is all that is available, I'd

Re: NSSavePanel called from BSD application - no keyboard input

2009-02-10 Thread Kyle Sluder
On Tue, Feb 10, 2009 at 2:24 PM, Kevin Martin ke...@khn.org.uk wrote: Chances are I will write a wrapper app in the future, but I'm not familiar enough with Cocoa at the moment. Reading through the docs I can't even figure out how I would do non blocking i/o with an NSPipe, Never mind how I

Re: One Shot Windows: WARNING

2009-02-10 Thread Seth Willits
On Feb 10, 2009, at 10:30 AM, Michael Ash wrote: I downloaded the example, ran it, and reproduced the crash. I then enabled zombies and ran it again. The crash message said: 2009-02-10 13:27:16.566 DocumentTest[97982:813] *** -[MyWindowController tableView:objectValueForTableColumn:row:]:

Re: NSSavePanel called from BSD application - no keyboard input

2009-02-10 Thread Kevin Martin
On 10 Feb 2009, at 20:26, Kyle Sluder wrote: Just because it's there doesn't mean you have to use it. Granted, we're talking about blocking I/O in the context of an application, which needs to be pumping its runloop, but you can continue to use read(2) and write(2) without NSPipe, as long as

[MEET] CocoaHeads-NYC meeting Thu 02/12

2009-02-10 Thread Andy Lee
The next meeting of CocoaHeads-NYC will be: Thursday Feb 12 6:00PM to 8:00PM at Tekserve, at 119 West 23rd between 6th and 7th http://www.tekserve.com. Demitri Muna will talk about adding a search field to your application. As usual, please bring Cocoa programming questions and see if

Re: High-quality image upscaling

2009-02-10 Thread James Walker
Randall Meadows wrote: I have to upscale JPEG images from 72DPI to, say 250DPI (user-selectable). I figured Core Image would be the way to go, but... I don't know a Core Image filter for that, but it seems like a natural thing to expect. You might want to ask on the Quartz mailing list.

Re: Which keyboard (barcode scanner) did the event come from?

2009-02-10 Thread Kevin Gessner
On Feb 9, 2009, at 11:47 PM, Gerd Knops wrote: Assuming I have two identical USB keyboards (actually barcode scanners) connected to a mac, is there any way to tell which of them a keyboard event came from? [snip] Is there some way to, say, get a unique USB device ID or something like

Re: One Shot Windows: WARNING

2009-02-10 Thread Matt Neuburg
On Tue, 10 Feb 2009 13:30:52 -0500, Michael Ash michael@gmail.com said: Connected it in the nib, then implemented -dealloc: - (void)dealloc { [tv setDataSource: nil]; [super dealloc]; } Crash went away, again exactly as predicted. The problem is simply that the one shot setting ends up

Re: NSToolbarItems - deallocating view-based items

2009-02-10 Thread Peter Ammon
On Feb 9, 2009, at 7:13 PM, Steve Cronin wrote: Folks; I have a mix of view and image based toolbar items. The views are all IBOutlets defined in IB. Everything is working well - events are handled and items arevalidated, everything is dandy. Except when the user customizes the toolbar.

Re: Best practice for terminating at launch time?

2009-02-10 Thread Rob Keniger
On 11/02/2009, at 9:39 AM, Graham Cox wrote: The next question is about actually terminating. I currently simply call [NSApp terminate:] which works, but I'm a bit worried that there could be a way that this won't actually Quit, since it's only a request to Quit, not a command. For

Re: Best practice for terminating at launch time?

2009-02-10 Thread Graham Cox
On 11 Feb 2009, at 11:08 am, Rob Keniger wrote: You can do something like the following in - applicationDidFinishLaunching: if([alert runModal] == NSAlertFirstButtonReturn) { exit(0); } else { [NSApp applicationOpenUntitledFile:NSApp]; } A straight exit() may not be elegant

Network communications help

2009-02-10 Thread gumboots
I currently have a RealBasic application that manages a furnace temperature controller. Using the TCPSocket class in RB the app listens to a port and I can query this application from other computers on the LAN and set parameters of the temperature controller, by passing strings. What I

view beyond the top of screen

2009-02-10 Thread Norio
Hi, Is there anyones who know the ways to move a translucent view over the screen top edge? My visible view is on the translucent view which acts like flipping. So the translucent flipping view is a little bigger than the visible view. The window which has the translucent view is also

Re: Best practice for terminating at launch time?

2009-02-10 Thread Rob Keniger
On 11/02/2009, at 10:46 AM, Graham Cox wrote: OK, that's fine for the termination part - thanks! The problem with the code you outline though is that the call to - runModal runs the event loop which allows the untitled document to continue to open behind the alert. I'd like to discover a

Re: Best practice for terminating at launch time?

2009-02-10 Thread Graham Cox
On 11 Feb 2009, at 1:28 pm, Rob Keniger wrote: On 11/02/2009, at 10:46 AM, Graham Cox wrote: OK, that's fine for the termination part - thanks! The problem with the code you outline though is that the call to - runModal runs the event loop which allows the untitled document to continue

Re: Best practice for terminating at launch time?

2009-02-10 Thread Rob Keniger
On 11/02/2009, at 1:07 PM, Graham Cox wrote: Yes, I tried that. It solves the case of the untitled document but not if the user launched the app with a file, which opens behind the alert. I need a hook earlier than applicationWillFinishLaunching:, but there doesn't seem to be one,

Re: Best practice for terminating at launch time?

2009-02-10 Thread Graham Cox
On 11 Feb 2009, at 3:11 pm, Rob Keniger wrote: I guess you'd need to implement - application:openFile: and - application:openFiles: in the application delegate and return NO from these methods. Bingo. That's the one. Actually I only needed to implement -application:openFile:, but in

Re: UIScrollView - photo viewer like usage

2009-02-10 Thread Daryl Thachuk
So my questions: Has anyone done this successfully (with UIScrollView)? Is it better to re-implement all this with layers to have more control over everything? Yes it is possible to do this with UIScrollView but only for a small amount of images. You eventually run out of memory on the

Re: One Shot Windows: WARNING

2009-02-10 Thread Michael Ash
On Tue, Feb 10, 2009 at 3:38 PM, Seth Willits sli...@araelium.com wrote: On Feb 10, 2009, at 10:30 AM, Michael Ash wrote: I downloaded the example, ran it, and reproduced the crash. I then enabled zombies and ran it again. The crash message said: 2009-02-10 13:27:16.566

Re: Network communications help

2009-02-10 Thread Chris Idou
From what you are saying, I would get the classic intro to UNIX network programming and read the part on sockets: http://www.amazon.com/UNIX-Network-Programming-Richard-Stevens/dp/0139498761 From: gumbo...@mac.com gumbo...@mac.com To: Cocoa-Dev List

Re: NSToolbarItems - deallocating view-based items

2009-02-10 Thread Steve Cronin
Peter; Thanks for the reply but . The documentation for NSToolbarItem for =setView says: ...The view for the receiver. The view and all of its contents must conform to the NSCoding protocol if the toolbar supports customization There is no further discussion in the documentation.

Re: Network communications help

2009-02-10 Thread Ken Thomases
On Feb 10, 2009, at 7:44 PM, gumbo...@mac.com wrote: I currently have a RealBasic application that manages a furnace temperature controller. Using the TCPSocket class in RB the app listens to a port and I can query this application from other computers on the LAN and set parameters of the

memory leak analyzer tools

2009-02-10 Thread Valentin Dan
Hi, What tools are there to analyze memory leaks in programs ? Is there something that would tell the exact location of the leak (the object that's not being released) ? Thanks! ___ Valentin Dan, Software Engineer

Re: memory leak analyzer tools

2009-02-10 Thread Robert Marini
I've often found the Clang Static Analyzer to be of great use in these matters though it is still in development and can produce false positives (and miss a few things). Instruments also includes a Leaks tool that can assist in tracking down leaks (be sure to expand the right extended

Using Core Animation for Morphing?

2009-02-10 Thread Oleg Krupnov
I am curious if Core Animation can be used for morphing shapes, i.e. setting custom transformations of layers, other than the provided affine and 3D transforms? If there's no direct way to do this, is there a way to force the layer to repaint in each frame? (In this case I hope I could still use