OK, break it down for me... (question about gzip)

2010-06-08 Thread Graham Cox
I need to be able to make a .gzip file from a FOLDER on my hard disk programatically. I've searched the archives and Googled for it, and now I'm just confused. Some folk advocate linking to the library directly, other to invoke it via NSTask. Since it's a folder I need to compress, not

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Stephen J. Butler
On Tue, Jun 8, 2010 at 1:04 AM, Graham Cox graham@bigpond.com wrote: I need to be able to make a .gzip file from a FOLDER on my hard disk programatically. a) You can't gzip a folder. That's why people tar the folders, then gzip the tar file (or just use the 'z' option in tar). b) In a

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Graham Cox
It has been pointed out to me off-list that I've been labouring under the misapprehension that gzip is equivalent to zip, which appears not to be the case. It might explain why it was hard to find relevant info. So I need zip then... otherwise same discussion applies. I don't really care how I

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread John Joyce
On Jun 8, 2010, at 1:16 AM, Stephen J. Butler wrote: On Tue, Jun 8, 2010 at 1:04 AM, Graham Cox graham@bigpond.com wrote: I need to be able to make a .gzip file from a FOLDER on my hard disk programatically. a) You can't gzip a folder. That's why people tar the folders, then gzip the

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Graham Cox
On 08/06/2010, at 4:16 PM, Stephen J. Butler wrote: b) In a working OS X system, the unix executables will always be where they're supposed to be (ie: /bin, /sbin, /usr/bin, /usr/sbin, etc). Thanks Stephen, so given the four choices I looked at each and find zip in /usr/bin The question is

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Graham Cox
On 08/06/2010, at 4:21 PM, John Joyce wrote: which and that will let you locate the actual path of the command line tool you want to use. (pass that path to your next NSTask) Ok... but doesn't that just displace the problem one step? How do I find the path to which without being able to

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Kyle Sluder
On Jun 7, 2010, at 11:04 PM, Graham Cox graham@bigpond.com wrote: I need to be able to make a .gzip file from a FOLDER on my hard disk programatically. I would use ditto to produce the tarball, because it will produce the same results as the Finder. --Kyle Sluder (Sent from my hotel

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread glaurent
On Tue 08/06/10 08:34, Graham Cox graham@bigpond.com wrote: On 08/06/2010, at 4:21 PM, John Joyce wrote: which and that will let you locate the actual path of the command line tool you want to use. (pass that path to your next NSTask) Ok... but doesn't that just displace the

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Alastair Houghton
On 8 Jun 2010, at 07:25, Graham Cox wrote: On 08/06/2010, at 4:16 PM, Stephen J. Butler wrote: b) In a working OS X system, the unix executables will always be where they're supposed to be (ie: /bin, /sbin, /usr/bin, /usr/sbin, etc). Thanks Stephen, so given the four choices I looked at

Re: Scrolling Behavior of NSTextView

2010-06-08 Thread Paul Sanders
Martin, I tried the [NSTextView scrollRangeToVisible:] with NSMakeRange(0,0) , but it is the same as to use [scrollPoint:] solely. Only with [glyphRangeForTextContainer:] in prior the scroll-to-top works. I don't think it is the problem of coordinate system flip-ness, because when using

32bit float array to PNG thanks to NSBitmapImageRep problem

2010-06-08 Thread Pierre-Yves Aquilanti
Hello, i'm trying to convert a float array to a greyscale PNG with a NSBitmapImageRep but i doesn't work and all i get is a blank png (just white). To test the feasibility of my idea i created a float array of size 55*77 with half filled with 1500. and the other half filled with 3000.

Garbage collector

2010-06-08 Thread Takeichi Kanzaki Cabrera
Hi all, I'm beginning with an application for Mac OS X that in a future could become into an iphone app, could I use the garbage collector or is better don't use it? Regards, Takeichi ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: [iPhone] -UIScrollView

2010-06-08 Thread Scott Anguish
This is exactly what UIScrollView was intended for in Paging mode, and the documentation explains how to do this with a minimum of 2 or 3 views (I can't remember which I decided on, 2 will work, but 3 is smoother). I'm unsure of the restraints on loading single pages of PDF files, so that

Re: Garbage collector

2010-06-08 Thread Thomas Davie
At present, the iPhone SDK does not support garbage collection, so you're best off at least making it GC supported, rather than required. Bob On 8 Jun 2010, at 11:48, Takeichi Kanzaki Cabrera wrote: Hi all, I'm beginning with an application for Mac OS X that in a future could become into an

MacTech Conference 2010: Call for Speakers

2010-06-08 Thread Edward Marczak
The MacTech Conference 2010 is now actively seeking speakers: http://www.mactech.com/conference This is a new, community-oriented conference to be held in November in Los Angeles, California. Topics on all areas of development are being considered, and formats for presenting are open. Those

Erasing drawn content

2010-06-08 Thread Matej Bukovinski
Hi, In a cocoa application that I'm developing I have a custom NSView subclass that I use as an overlay view for annotating a WebView. The overlay view draws semi-trasparent rectangles in its drawRect: method for DOM elements that were selected by the user. Since the fill color for the drawn

Re: Activating application raises windows meant to be invisible

2010-06-08 Thread David Reitter
On May 28, 2010, at 1:04 AM, Peter Ammon wrote: If a window is ordered out, AppKit will not order it back in when the app is activated. Is it possible that a different window is created, or that the window was not ordered out to begin with? I have verified that it is the same window that

Re: Erasing drawn content

2010-06-08 Thread Steve Christensen
Perhaps call NSRectFillUsingOperation(rect, NSCompositeClear) before drawing each rectangle? On Jun 8, 2010, at 5:32 AM, Matej Bukovinski wrote: * PGP Bad Signature, Signed by an unverified key Hi, In a cocoa application that I'm developing I have a custom NSView subclass that I use as

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread John Joyce
On Jun 8, 2010, at 5:40 AM, Alastair Houghton wrote: On 8 Jun 2010, at 07:25, Graham Cox wrote: On 08/06/2010, at 4:16 PM, Stephen J. Butler wrote: b) In a working OS X system, the unix executables will always be where they're supposed to be (ie: /bin, /sbin, /usr/bin, /usr/sbin, etc).

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Charles Srstka
Something interesting I’ve noticed is that 10.6 now includes libarchive in /usr/lib, which would allow one to create tar files and the like without having to launch a shell tool. Unfortunately, Apple doesn’t seem to have included the headers for it, which may mean that they intend it to be

Re: Erasing drawn content

2010-06-08 Thread Matej Bukovinski
Thanks for the suggestion Steve. Unfortunately this causes the background to turn black and not transparent. I would need the view to become transparent (so the WebView underneath is visible). On 8.6.2010, at 16:04, Steve Christensen wrote: Perhaps call NSRectFillUsingOperation(rect,

[iPhone] NSManagedObjectContext save doesn't crash but breaks on objc_exception_throw

2010-06-08 Thread Hank Heijink (Mailinglists)
Dear all, I've run into the following problem, and I'm a bit stuck - I wonder if you can shed some light on this. I have an iPhone app that uses Core Data, and the problem occurs when the app terminates. I have an NSOperationQueue with potentially several NSOperations that are cancelled in the

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
Unfortunately this causes the background to turn black and not transparent. I would need the view to become transparent (so the WebView underneath is visible). Try this: [[NSColor clearColor] setFill]; NSRectFill (myRect); That's what I do. Regards, Paul Sanders

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Karl Moskowski
If Zip is an acceptable substitute for gzip, you can use my BSD-licensed ZipKit FW. Works on Mac (as a FW or static lib, GC supported) and iPhone (as a static lib), has file-based and in-memory zipping classes, supports Zip64 and is cancellable. There's not much in terms of docs (just a How to

Re: [iPhone] NSManagedObjectContext save doesn't crash but breaks on objc_exception_throw

2010-06-08 Thread Alexander Spohr
Is there anything in the log? What does save's error parameter return? atze Am 08.06.2010 um 17:53 schrieb Hank Heijink (Mailinglists): Dear all, I've run into the following problem, and I'm a bit stuck - I wonder if you can shed some light on this. I have an iPhone app that uses

BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread James Bucanek
Greetings, I've been trying to track down a peculiar bug reported by a customer, and I've narrowed it down to a problem returning a BOOL value via -[NSObject performSelector:] on a dual Quad-Core Intel Xeon processor running 64-bit code. It seems that the returned value contains random data,

Re: Printing and Segmented Control state [Solved]

2010-06-08 Thread James Merkel
Ok, should have known this -- the print version of the view is a separate instance of the view from the screen version, and the print version doesn't have the segmented control. So I have to get the state of the control from the screen version and set it into the print version so I can

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread Nick Zitzmann
On Jun 8, 2010, at 10:16 AM, James Bucanek wrote: I've been trying to track down a peculiar bug reported by a customer, and I've narrowed it down to a problem returning a BOOL value via -[NSObject performSelector:] on a dual Quad-Core Intel Xeon processor running 64-bit code. It seems

QuickTime web browser plugin - get current timecode

2010-06-08 Thread Paweł Kostecki
Hi all, Is there any possibility of getting a current timecode of a QuickTime video played on a web page (in QT plugin)? I mean a possibility similar to desktop [qtMovie currentTime] in Cocoa. What I need to do is to get a current slider timecode of a video played in QT plugin within a web

Re: QuickTime web browser plugin - get current timecode

2010-06-08 Thread Jean-Daniel Dupas
Le 8 juin 2010 à 17:45, Paweł Kostecki a écrit : Hi all, Is there any possibility of getting a current timecode of a QuickTime video played on a web page (in QT plugin)? I mean a possibility similar to desktop [qtMovie currentTime] in Cocoa. What I need to do is to get a current

Re: 32bit float array to PNG thanks to NSBitmapImageRep problem

2010-06-08 Thread Greg Guerin
Pierre-Yves Aquilanti wrote: NSData * binaryData=[NSData dataWithContentsOfFile:binaryPath]; // binary is just a 32bits array full of 1500. and 3000. as described previously Does the endian-ness of the floats in the file match the endian-ness of the processor the code is running on?

Re: [iPhone] Preprocessing events sent to UITableView

2010-06-08 Thread WT
Fair enough. The app I'm writing is a newspaper-like app, similar to The New York Times app. The client for whom I'm writing this app wants the reader to be able to swipe horizontally to switch sections (say, from latest news to sports to entertainment, etc). Each section has its own view

Re: [iPhone] Preprocessing events sent to UITableView

2010-06-08 Thread Matt Neuburg
On or about 6/8/10 9:42 AM, thus spake WT jrca...@gmail.com: The reader can tap on a section button and the contents of that section get dumped into the tableview but the client also wants the user to be able to swipe horizontally to switch sections. Naturally, the view controller for a

Re: Erasing drawn content

2010-06-08 Thread Kyle Sluder
On Jun 8, 2010, at 8:41 AM, Matej Bukovinski ma...@bukovinski.com wrote: Thanks for the suggestion Steve. Unfortunately this causes the background to turn black and not transparent. I would need the view to become transparent (so the WebView underneath is visible). You can't do this.

Re: Erasing drawn content

2010-06-08 Thread Kyle Sluder
On Jun 8, 2010, at 10:03 AM, Kyle Sluder kyle.slu...@gmail.com wrote: You can't do this. All your bees are composited back-to-front into the window's backing store, so filling with anything will obliterate your web view's drawing. Of course by bees, I meant views. --Kyle Sluder (Still on

CocoaHeads-NYC date change: *tomorrow*

2010-06-08 Thread Andy Lee
The CocoaHeads-NYC meeting this month will be on *WEDNESDAY* June 9 (tomorrow) rather than the usual Thursday. We don't have a speaker this month, so we'll just chat about WWDC and head for burgers early. I encourage you to bring questions and/or code if there's something you want to show

Re: [iPhone] NSManagedObjectContext save doesn't crash but breaks on objc_exception_throw

2010-06-08 Thread Hank Heijink (Mailinglists)
There's no error or log at all, unless I set the merge policy to the default, in which case the error parameter contains what I expect it to contain: a conflict list with the right objects and properties that I expect to be in conflict. I understand the error coming back from the save, but not

Having trouble with eventWithUID:occurrence: CalCalendarStore method

2010-06-08 Thread Mazen M. Abdel-Rahman
Hi All, The eventWithUID:occurrence: method of CalCalendarStore is not working for me as expected when retrieving a recurring event. I am not sure if there is a disconnect between the documentation and the CalCalendarStore documentation or if perhaps there is something I am not seeing.

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread James Bucanek
Nick Zitzmann mailto:n...@chronosnet.com wrote (Tuesday, June 8, 2010 9:27 AM -0600): On Jun 8, 2010, at 10:16 AM, James Bucanek wrote: I've been trying to track down a peculiar bug reported by a customer, and I've narrowed it down to a problem returning a BOOL value via -[NSObject

Re: Erasing drawn content

2010-06-08 Thread Matej Bukovinski
Sadly this also turns the background black just like a NSCompositeClear fill operation. On 8.6.2010, at 17:56, Paul Sanders wrote: Unfortunately this causes the background to turn black and not transparent. I would need the view to become transparent (so the WebView underneath is

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread Jean-Daniel Dupas
Le 8 juin 2010 à 19:23, James Bucanek a écrit : Nick Zitzmann mailto:n...@chronosnet.com wrote (Tuesday, June 8, 2010 9:27 AM -0600): On Jun 8, 2010, at 10:16 AM, James Bucanek wrote: I've been trying to track down a peculiar bug reported by a customer, and I've narrowed it down to a

Re: [iPhone] NSManagedObjectContext save doesn't crash but breaks on objc_exception_throw

2010-06-08 Thread Hank Heijink (Mailinglists)
On Jun 8, 2010, at 1:24 PM, David Brown wrote: Have you thought about avoiding the problem altogether? Instead of marking the objects and then needed to save them, write out a file somewhere that identifies those objects, outside of core data. Then, when your app is starting, check for

Re: Erasing drawn content

2010-06-08 Thread Matej Bukovinski
Thanks Kyle. Drawing only the portions that won't be covered by a smaller rectangle is the obvious solution to this problem but unfortunately one that requires a lot of drawing logic (especially when you can have several nested rectangles). I was hoping there exists a more elegant way of

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread Alexander Heinz
On Jun 8, 2010, at 1:37 PM, Jean-Daniel Dupas wrote: Le 8 juin 2010 à 19:23, James Bucanek a écrit : Nick Zitzmann mailto:n...@chronosnet.com wrote (Tuesday, June 8, 2010 9:27 AM -0600): On Jun 8, 2010, at 10:16 AM, James Bucanek wrote: I've been trying to track down a peculiar bug

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
On Jun 8, 2010, at 10:03 AM, Kyle Sluder kyle.slu...@gmail.com wrote: You can't do this. All your views are composited back-to-front into the window's backing store, so filling with anything will obliterate your web view's drawing. Of course, silly me. Can something be done with a

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread James Bucanek
Jean-Daniel Dupas mailto:devli...@shadowlab.org wrote (Tuesday, June 8, 2010 10:37 AM +0200): Le 8 juin 2010 à 19:23, James Bucanek a écrit : For the record, the following is equivalent (i.e. produces the same machine code) and is probably a little easier to read: BOOL returnValue =

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread Jean-Daniel Dupas
Le 8 juin 2010 à 19:52, Alexander Heinz a écrit : On Jun 8, 2010, at 1:37 PM, Jean-Daniel Dupas wrote: Le 8 juin 2010 à 19:23, James Bucanek a écrit : Nick Zitzmann mailto:n...@chronosnet.com wrote (Tuesday, June 8, 2010 9:27 AM -0600): On Jun 8, 2010, at 10:16 AM, James Bucanek

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread James Bucanek
Alexander Heinz mailto:ahei...@johnshopkins.edu wrote (Tuesday, June 8, 2010 10:53 AM -0400): Alternatively, if you can alter the method being called, (which I assume you can, since you posted the source) you could change the methods to return an NSNumber-wrapped boolean value, rather than a

Re: Erasing drawn content

2010-06-08 Thread Matej Bukovinski
Could you perhaps elaborate a bit how you think that a layer backed view could help? The window overlay sounds like it could work. Hoverer, a NSView overlay would be preferred since I'm inserting the overlay in the WebView's scroll view (and matching the documents view size via bounds change

Re: [iPhone] NSManagedObjectContext save doesn't crash but breaks on objc_exception_throw

2010-06-08 Thread David Brown
Have you thought about avoiding the problem altogether? Instead of marking the objects and then needed to save them, write out a file somewhere that identifies those objects, outside of core data. Then, when your app is starting, check for the presence of the file before anything else happens,

Re: Erasing drawn content

2010-06-08 Thread Kyle Sluder
On Jun 8, 2010, at 2:02 PM, Matej Bukovinski ma...@bukovinski.com wrote: Could you perhaps elaborate a bit how you think that a layer backed view could help? Layers are composed into their own backing stores, so you can accumulate data there rather than recalculating it every time you need

Re: BOOL returned via -performSelctor: not BOOL on 64-bit system

2010-06-08 Thread Michael Ash
I concede that you're technically correct. But pragmatically, the CPU register used to return integer and pointer values to the caller has always been the same register for both Motorola and Intel processors since as long as I can remember programming in C -- and that's been awhile. No

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
The window overlay sounds like it could work. Hoverer, a NSView overlay would be preferred since I'm inserting the overlay in the WebView's scroll view (and matching the documents view size via bounds change notifications). This works very well when scrolling both the web and overlay view

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
The window overlay sounds like it could work. Hoverer, a NSView overlay would be preferred since I'm inserting the overlay in the WebView's scroll view (and matching the documents view size via bounds change notifications). This works very well when scrolling both the web and overlay view

Re: Erasing drawn content

2010-06-08 Thread Quincey Morris
On Jun 8, 2010, at 14:10, Kyle Sluder wrote: It sounds like the overlay window is the best bet. Surely it's easier to do what the OP wanted with a clipping path? In drawRect: just draw the tint rectangles front-to-back instead of back-to-front, and after drawing each one remove the rect's

Re: Erasing drawn content

2010-06-08 Thread Kyle Sluder
On Tue, Jun 8, 2010 at 4:05 PM, Quincey Morris quinceymor...@earthlink.net wrote: On Jun 8, 2010, at 14:10, Kyle Sluder wrote: Surely it's easier to do what the OP wanted with a clipping path? In drawRect: just draw the tint rectangles front-to-back instead of back-to-front, and after

Re: SQLite Database 2 distinct database iphone.

2010-06-08 Thread Sandro Noël
Thank you Greg. Now i know it can be done. much appreciated! Sandro. On 2010-06-07, at 11:46 AM, Greg Reichow wrote: Greetings. I'm building a iPhone application which is database driven. in that application i've designed it to have two databases. One database will be distributed with

Re: OK, break it down for me... (question about gzip)

2010-06-08 Thread Graham Cox
Thanks to everyone who chipped in on this one. I have what I want working using ditto with NSTask. I've hard-coded the launch path to /usr/bin/ditto and of course, that works right now. I guess as long as that isn't likely to change in 10.7 and was also the same in 10.5 then I'll be fine. I

Re: Erasing drawn content

2010-06-08 Thread Graham Cox
On 09/06/2010, at 3:06 AM, Kyle Sluder wrote: Of course by bees, I meant views. Pity, I like the idea of more bee-based metaphors in APIs (or Apis). It could be known as Bee-OS. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

My Custom Framework Is Not Exporting One of My Header Files

2010-06-08 Thread Chris Tracewell
I just made my first private framework a few weeks ago. I took some common categories and custom classes I use across projects and put them in my new FW. All has been fine until today when I added a new class file to it. I clean and build the FW and then build my project that is utilizing the

Re: My Custom Framework Is Not Exporting One of My Header Files

2010-06-08 Thread Kiel Gillard
Have you set the scope of the necessary header files to public? file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/100-Targets/bs_targets.html On 09/06/2010, at 11:20

Re: My Custom Framework Is Not Exporting One of My Header Files

2010-06-08 Thread Graham Cox
On 09/06/2010, at 11:20 AM, Chris Tracewell wrote: Why would it not be exporting the file? Yes, I added it to the target when I created the file. Right-click the file in Xcode and set its role to Public. This necessary step is very obscure and the menu doesn't reflect the currently set

Cocoaheads Lake Forest (92630) meeting, Wed 6/9/2010 at 7 pm on implementing a Cocoa Touch app

2010-06-08 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, 6/9. We will be finishing up coding our card

Re: Erasing drawn content

2010-06-08 Thread Andy Lee
On Jun 8, 2010, at 8:58 PM, Graham Cox wrote: On 09/06/2010, at 3:06 AM, Kyle Sluder wrote: Of course by bees, I meant views. Pity, I like the idea of more bee-based metaphors in APIs (or Apis). It could be known as Bee-OS. Nice double pun! --Andy

get the selection in an NSOutlineView

2010-06-08 Thread Rua Haszard Morris
I have an NSOutlineView which has a single column, and 2 levels of tree - each item in the list can have child items but those subitems don't have children. How can I determine the selected items? NSTableView -selectedRow returns row indices that change dependent on whether parent items are

Re: get the selection in an NSOutlineView

2010-06-08 Thread Graham Cox
On 09/06/2010, at 2:29 PM, Rua Haszard Morris wrote: I have an NSOutlineView which has a single column, and 2 levels of tree - each item in the list can have child items but those subitems don't have children. How can I determine the selected items? -selectedRowIndexes NSTableView

Invalid exception being thrown: CIUnsharpMask is not kvc for the key inputIntensity - except that it is

2010-06-08 Thread Mark Aufflick
Hi all, So I have a property, unsharpMaskFilter, setup in init like so: CIFilter *filter = [CIFilter filterWithName:@CIUnsharpMask]; [filter setDefaults]; [filter setValue:[NSNumber numberWithFloat:0.1] forKey:@inputIntensity]; [filter setValue:[NSNumber