CCCrypt()

2010-06-23 Thread Richard Hood
does anyone know in which library the CCCrypt() routine is defined? I've linked against libcrypto.dylib where it's defined in the header and libSystem.dylib where the man page says it is but I'm still getting undefined symbol errors on link. Richard Hood r

Re: checking if an app installed

2010-06-23 Thread Jens Alfke
On Jun 23, 2010, at 6:38 PM, Angelo Chen wrote: > Thanks for the fast reply, this works very well, now I'd like to check if > certain plugin for Quicktime got installed too, is there a similar service? i > tried following and it returns nil: > NSURL * bURL = [[NSWorkspace sharedWorkspace] > UR

Re: Finder open / close notifications

2010-06-23 Thread Ken Thomases
On Jun 23, 2010, at 6:00 PM, dev.dig...@verostudios.com wrote: > I'm trying to receive a notification when a file is opened basically like the > main Recent Items menu. I'd like to poll a directory and monitor file > operations for certain file types. Specifically open / close operations ...

iPhone TabBarController and NavigationController with Core Data

2010-06-23 Thread Sandro Noël
Greetings. I've been at this for a week trying to figure things out and I'm getting nowhere. This is my first iPhone application so please be gentle. ok, I created the application from the tab bar application template, and checked core data stack support. created the model and imported startup

Finder open / close notifications

2010-06-23 Thread dev . digest
Hello, I'm trying to receive a notification when a file is opened basically like the main Recent Items menu. I'd like to poll a directory and monitor file operations for certain file types. Specifically open / close operations ... just looking for suggestions, I've dabbled with Uli UKKQ

Re: Memory management on returning nil in init

2010-06-23 Thread Bill Appleton
i type lots of stuff all the way out its easier to debug and the compilers are very good at optimizing that sort of thing there is a big balance between efficiency, size, speed, clarity, etc its usually clarity that is in short supply On Wed, Jun 23, 2010 at 7:42 PM, Scott Anguish wrote:

Re: Memory management on returning nil in init

2010-06-23 Thread Scott Anguish
Yes, that works as well. The reason we’ve advocated the longer form is that it is clearer what is happening to those who are not as intimate with the quirks like this. I also recall reading (but don’t quote me on this) that the longer form generates less instructions. I can’t recall where thou

Re: LightTable Sample CoreAnimation Code

2010-06-23 Thread Kyle Sluder
On Wed, Jun 23, 2010 at 7:09 PM, Alexander Heinz wrote: > I've been attempting to make sense of Apple's "LightTable" sample code for > Core Animation, and I'm completely lost. Specifically, a couple of calls > appear to be assigning an NSImage to the contents of a CALayer, which, as I > previou

LightTable Sample CoreAnimation Code

2010-06-23 Thread Alexander Heinz
Hello all, I've been attempting to make sense of Apple's "LightTable" sample code for Core Animation, and I'm completely lost. Specifically, a couple of calls appear to be assigning an NSImage to the contents of a CALayer, which, as I previously understood, (and according to the documentation)

Re: checking if an app installed

2010-06-23 Thread Angelo Chen
Hi, Thanks for the fast reply, this works very well, now I'd like to check if certain plugin for Quicktime got installed too, is there a similar service? i tried following and it returns nil: NSURL * bURL = [[NSWorkspace sharedWorkspace] URLForApplicationWithBundleIdentifier:@"com.apple.AppleInt

How to debug: "Save partially failed: Error saving the persistent store."

2010-06-23 Thread Gideon King
I am encountering this issue when trying to save my atomic store. The backtraces don't seem to give anything useful to locate the issue. Any suggestions as to how to find the cause of this? Thanks Gideon___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: checking if an app installed

2010-06-23 Thread Stephen J. Butler
On Wed, Jun 23, 2010 at 7:48 PM, Angelo Chen wrote: > Hi, > Is there a way to check if a certain application is installed? say if iMovie > is installed? thanks, Three ways: -[NSWorkspace absolutePathForAppBundleWithIdentifier:] (10.3) -[NSWorkspace fullPathForApplication:] (10.0) -[NSWorkspace

checking if an app installed

2010-06-23 Thread Angelo Chen
Hi, Is there a way to check if a certain application is installed? say if iMovie is installed? thanks, Angelo ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Restoring a NSTreeController selection

2010-06-23 Thread Markus Spoettl
Hi List, I have a NSOutlineView bound to a NSTreeController that delivers my model objects. That NSTreeController sorts the model objects through sort descriptors. What I would like to do is save the current selection and restore it at a later time. Saving is easy, I get the -selectedObjects

Re: NSTimeZone abbreviations

2010-06-23 Thread David Rowland
And I reported it. On Jun 23, 2010, at 4:52 PM, Rick Mann wrote: > I've reported this bug, and sent Apple sample code to reproduce it. It's an > awful change, and I hope just an oversight that gets fixed in the next iOS 4 > update. > > On Jun 23, 2010, at 15:51:31, August Hahn wrote: > >> On

NSOpenPanel won't allow selecting aliases

2010-06-23 Thread Seth Willits
Apparently I've never noticed that in my open panels, I can't select aliases. Say for instance that on my Desktop there is an alias to deeply nested folder. In the open panel, when it lists the Desktop folder's contents, the alias is disabled so I can't double-click on it to drill into that fold

Not sure what's wrong with this code to using NSUserDefaults...

2010-06-23 Thread Patrick William Walker
... beyond me but here it is. NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [prefs setObject: @"120" forKey: @"Length"]; [prefs synchronize]; When the program is run in the iPhone simulator (v3.2, not using 4.0 yet), it just dies. Nothing on the console log s

Re: NSTimeZone abbreviations

2010-06-23 Thread Rick Mann
I've reported this bug, and sent Apple sample code to reproduce it. It's an awful change, and I hope just an oversight that gets fixed in the next iOS 4 update. On Jun 23, 2010, at 15:51:31, August Hahn wrote: > On iOS 3.2 or less the behavior of NSTimeZone's abbreviationForDate was to > give

NSTimeZone abbreviations

2010-06-23 Thread August Hahn
On iOS 3.2 or less the behavior of NSTimeZone's abbreviationForDate was to give back a 'normal' abbreviation, i.e. PST for Pacific time. In 4.0 for the US I still get PST, but for outside North America it gives back GMT+/-XX:XX. In France it was showing CEST, now I get GMT+02:00. Not very user-f

Re: iOS4: CFReadStream and background operation

2010-06-23 Thread John Michael Zorko
Jens, >> 2. However, CFReadStreams created _while_ the app was in the background >> often (though not always) _don't_ call their callbacks _until_ the app is >> brought in the foreground, then all of a sudden the callback happens. > > I think foreground/background is a red herring — that has a

Re: changes to NSView's frame in its window

2010-06-23 Thread Alexander Cohen
Wow, nice to know. Probably not a good idea to count on it though, right? AC On Jun 23, 2010, at 3:38 PM, Michael Ash wrote: > On Wed, Jun 23, 2010 at 1:33 PM, Alexander Cohen > wrote: >> Hello, >> >> I have a view in an NSScrollView's document view that has a small child >> window attached

Re: iOS4: CFReadStream and background operation

2010-06-23 Thread John Michael Zorko
Jens, >> 2. However, CFReadStreams created _while_ the app was in the background >> often (though not always) _don't_ call their callbacks _until_ the app is >> brought in the foreground, then all of a sudden the callback happens. > > I think foreground/background is a red herring — that has a

Re: Memory management on returning nil in init

2010-06-23 Thread Charles Srstka
On Jun 23, 2010, at 3:00 PM, Jens Alfke wrote: > Yes. Any expression of the form > > if(A = B) > > i.e. an assignment directly inside an if, will result in a warning that this > looks confusingly like a comparison. If you prefer the if(A = B) syntax, though, this can be worked around by

Re: Memory management on returning nil in init

2010-06-23 Thread Jens Alfke
On Jun 23, 2010, at 12:47 PM, davel...@mac.com wrote: >if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) Yes. Any expression of the form if(A = B) i.e. an assignment directly inside an if, will result in a warning that this looks confusingly like a comparison.

Re: Memory management on returning nil in init

2010-06-23 Thread davelist
On Jun 21, 2010, at 2:44 PM, Scott Anguish wrote: > The old style > >> if (self = [super init]) > > will cause a warnings with certain settings now and in the future. > Does this also apply to code such as: if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) should it

Re: changes to NSView's frame in its window

2010-06-23 Thread Michael Ash
On Wed, Jun 23, 2010 at 1:33 PM, Alexander Cohen wrote: > Hello, > > I have a view in an NSScrollView's document view that has a small child > window attached to it, meaning the window follows that view wherever it goes. > But when i scroll the scrollview, not much changes for that view. So i'm

Re: iOS4: UDP sockets in the background

2010-06-23 Thread Gerd Knops
On Jun 23, 2010, at 2:05 PM, Fritz Anderson wrote: > > On 23 Jun 2010, at 1:15 PM, Gerd Knops wrote: > >> On Jun 22, 2010, at 10:28 PM, Angelica Grace Tanchico wrote: > ... >> >>> Can the new iOS 4 maintain UDP socket connection in the background? Or is >>> it only TCP? >> >> I have been doi

Re: -enclosingScrollView returns nil when receiver is a descendant of the clip view

2010-06-23 Thread jonat...@mugginsoft.com
On 23 Jun 2010, at 19:50, Kyle Sluder wrote: > > To describe it a bit more visually, here's a diagram of our view hierarchy: > > Scroll View > |- Clip View > |- Accessory view > |- Document view > > Calling -enclosingScrollView on the accessory view returns nil. I > believe that it should ret

Re: force rendering of views off screen

2010-06-23 Thread Matt Neuburg
On Wed, 23 Jun 2010 14:27:43 +0200, Martin Gla? said: >i am developing an ipad app which offers a full screen UIScrollView which >itself has several subviews, representing the pages the user can flip >through. >problem is: every subview renders a pdf page and does so on-demand, lazy, >when it slid

Re: iOS4: UDP sockets in the background

2010-06-23 Thread Fritz Anderson
On 23 Jun 2010, at 1:15 PM, Gerd Knops wrote: > On Jun 22, 2010, at 10:28 PM, Angelica Grace Tanchico wrote: ... > >> Can the new iOS 4 maintain UDP socket connection in the background? Or is it >> only TCP? > > I have been doing that without a problem since early iOS 3, so no reason to > exp

-enclosingScrollView returns nil when receiver is a descendant of the clip view

2010-06-23 Thread Kyle Sluder
Hi list, We recently noticed that -enclosingScrollView will only return an ancestor scroll view if the receiver is a descendant of the scroll view's document view. This is a problem for us, since we put our field editors and other accessory views in a subview of the scroll view's clip view that is

Re: changes to NSView's frame in its window

2010-06-23 Thread John Joyce
On Jun 23, 2010, at 1:28 PM, Kyle Sluder wrote: > On Wed, Jun 23, 2010 at 10:33 AM, Alexander Cohen > wrote: >> I have a view in an NSScrollView's document view that has a small child >> window attached to it, meaning the window follows that view wherever it >> goes. But when i scroll the scr

Re: changes to NSView's frame in its window

2010-06-23 Thread Kyle Sluder
On Wed, Jun 23, 2010 at 10:33 AM, Alexander Cohen wrote: > I have a view in an NSScrollView's document view that has a small child > window attached to it, meaning the window follows that view wherever it goes. > But when i scroll the scrollview, not much changes for that view. So i'm > wonderi

Re: iOS4: UDP sockets in the background

2010-06-23 Thread Gerd Knops
On Jun 22, 2010, at 10:28 PM, Angelica Grace Tanchico wrote: > > Hello, > > Can the new iOS 4 maintain UDP socket connection in the background? Or is it > only TCP? I have been doing that without a problem since early iOS 3, so no reason to expect it would stop working in iOS4. Gerd __

changes to NSView's frame in its window

2010-06-23 Thread Alexander Cohen
Hello, I have a view in an NSScrollView's document view that has a small child window attached to it, meaning the window follows that view wherever it goes. But when i scroll the scrollview, not much changes for that view. So i'm wondering if there is anyway to get changes to a views "global" f

force rendering of views off screen

2010-06-23 Thread Martin Glaß
hello everyone. i'm totally new to the mac platform but already feel comfortable with the cocoa frameworks. i am developing an ipad app which offers a full screen UIScrollView which itself has several subviews, representing the pages the user can flip through. problem is: every subview renders a p

Problem with NavigationControllers in TabBar Options

2010-06-23 Thread John Duff
I wrote a little blog post awhile back about putting NavigationControllers into a TabBarController and everything worked fine for what I was doing. Someone has expanded on what I did in the blog post a little bit and created a TabBarController with more than 5 NavigationControllers in it so the las

IBPlugin with Core Animated button.

2010-06-23 Thread Alexander Zvyagin
Hi, All! I'm try to making Core Animated button encapsulated to Interface Builder Plugin. >From inside, this button is NSControl created as layer-backed NSView and >filled with CALayers. All images of button states are draw by CALayers using mouseEvents (not by a simple drawRect): this are als

Re: Problem with stopModalWithCode on a different thread

2010-06-23 Thread John Joyce
On Jun 23, 2010, at 9:16 AM, Bill Appleton wrote: >> Plugins don’t impose themselves, nor are they invoked by a user; they’re > always invoked by content on a web page. The user might go to that web page > specifically to use the plugin, or it might be a side effect, but the > mechanism is the sa

Re: Problem with stopModalWithCode on a different thread

2010-06-23 Thread Bill Appleton
> Plugins don’t impose themselves, nor are they invoked by a user; they’re always invoked by content on a web page. The user might go to that web page specifically to use the plugin, or it might be a side effect, but the mechanism is the same regardless. there is a big difference between navigatin

Re: Custom views in navigationbar (iOS 3.2)

2010-06-23 Thread glenn andreas
On Jun 23, 2010, at 5:51 AM, Christian Ziegler wrote: > Hi guys, > > I'm having a hard time with the navigation bar. What I'm trying to do is > adding a custom breadcrumbs navigation to the bar. I coded two classes, a > subclass of UIButton for the breadcrumbs segments and a sublcass of UIView

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Alastair Houghton
On 23 Jun 2010, at 11:14, Ben Haller wrote: > 3. I added [[pipe fileHandleForWriting] closeFile] and [[pipe > fileHandleForReading] closeFile] calls to close the files associated with the > pipes when my tasks completed. This change fixed the problem; I no longer > run out of file descriptors.

Re: Using Field Editor correctly in custom NSCell

2010-06-23 Thread Alastair Houghton
On 23 Jun 2010, at 02:56, Graham Cox wrote: > For example, it seems that the cell should override > -setUpFieldEditorAttributes: but what should this method actually do? In the > cell code I have, this method has been commented out, and the field editor > "set up" is being done in -editWithFram

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Dave Keck
>  Ah, interesting.  I missed that in the docs.  It still seems bad to me that > the file handle will actually dealloc without closing its associated file > descriptor, but perhaps you are right that that is the documented behavior. >  I'll just stop worrying about it and move on, then.  Thanks! N

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Ben Haller
On 23-Jun-10, at 6:59 AM, jonat...@mugginsoft.com wrote: On 23 Jun 2010, at 11:47, Ben Haller wrote: On 23-Jun-10, at 6:22 AM, Uli Kusterer wrote: Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller: So I have a workaround for the problem, but I want to understand *why* it works. Shouldn't NSP

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread jonat...@mugginsoft.com
On 23 Jun 2010, at 11:47, Ben Haller wrote: > On 23-Jun-10, at 6:22 AM, Uli Kusterer wrote: > >> Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller: >>> So I have a workaround for the problem, but I want to understand *why* it >>> works. Shouldn't NSPipe close its associated files when it

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Jean-Daniel Dupas
Le 23 juin 2010 à 12:47, Ben Haller a écrit : > On 23-Jun-10, at 6:22 AM, Uli Kusterer wrote: > >> Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller: >>> So I have a workaround for the problem, but I want to understand *why* it >>> works. Shouldn't NSPipe close its associated files when it deallo

Custom views in navigationbar (iOS 3.2)

2010-06-23 Thread Christian Ziegler
Hi guys, I'm having a hard time with the navigation bar. What I'm trying to do is adding a custom breadcrumbs navigation to the bar. I coded two classes, a subclass of UIButton for the breadcrumbs segments and a sublcass of UIView for the whole bar. The bar has a home segment which represents t

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Ben Haller
On 23-Jun-10, at 6:22 AM, Uli Kusterer wrote: Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller: So I have a workaround for the problem, but I want to understand *why* it works. Shouldn't NSPipe close its associated files when it deallocs? Why should it be necessary to call -closeFile? This

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Ben Haller
On 23-Jun-10, at 6:34 AM, Jean-Daniel Dupas wrote: Le 23 juin 2010 à 12:14, Ben Haller a écrit : So I have a workaround for the problem, but I want to understand *why* it works. Shouldn't NSPipe close its associated files when it deallocs? Why should it be necessary to call -closeFile? T

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Jean-Daniel Dupas
Le 23 juin 2010 à 12:14, Ben Haller a écrit : > > So I have a workaround for the problem, but I want to understand *why* it > works. Shouldn't NSPipe close its associated files when it deallocs? Why > should it be necessary to call -closeFile? This behavior seems to be > specifically cont

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Uli Kusterer
Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller: > So I have a workaround for the problem, but I want to understand *why* it > works. Shouldn't NSPipe close its associated files when it deallocs? Why > should it be necessary to call -closeFile? This behavior seems to be > specifically contrad

Re: File descriptors not freed up without a -closeFile call

2010-06-23 Thread Jean-Daniel Dupas
Le 23 juin 2010 à 12:14, Ben Haller a écrit : > Hi all. I'm using NSTask and NSPipe to launch lots of little processes, and > I'm running out of file descriptors. In my googling and archive searching, I > found some info that led me to several approaches: > > 1. I ran ObjectAlloc and Leaks

File descriptors not freed up without a -closeFile call

2010-06-23 Thread Ben Haller
Hi all. I'm using NSTask and NSPipe to launch lots of little processes, and I'm running out of file descriptors. In my googling and archive searching, I found some info that led me to several approaches: 1. I ran ObjectAlloc and Leaks under Instruments and confirmed that I am not leaking pi

Re: Auto-hide the window

2010-06-23 Thread jonat...@mugginsoft.com
On 23 Jun 2010, at 04:03, Dong Linlan wrote: > Hi there, I want to make my window make my window auto-hided and when the > cursor move to the edge of the screen it will show. Just like the effect of > QuickSilver's Shelf plugin. I google and found nothing useful. Should I run > my app as an daem

Re: Incomplete rendering returned from glReadPixels

2010-06-23 Thread Ben Haller
On 22-Jun-10, at 12:28 PM, Michael Ash wrote: On Tue, Jun 22, 2010 at 9:25 AM, Ben Haller wrote: It's a little weird because this method gets called sometimes on a view that is not yet installed in a window, so I just make a window then and there. (This is run in a headless command-line a

Re: Problem with stopModalWithCode on a different thread

2010-06-23 Thread Jens Alfke
On Jun 22, 2010, at 7:49 PM, Bill Appleton wrote: > i am pointing out that there is a giant, giant, giant difference between > plugins that impose themselves on the user and those that are invoked because > the user wants them. Plugins don’t impose themselves, nor are they invoked by a user; t

Re: Isolate NSTextView from NSColorWell

2010-06-23 Thread Bernard Knaepen
The NSTextView is indeed richtext and this is what I need. Do I need to subclass the NSColorWell or the NSTextView? I need to be able to change the color of the text as well... Thanks, Bernard. On 23 Jun 2010, at 09:02, Scott Anguish wrote: > is the NSTextView set as allowing rich text? if s