Re: How to redraw a view in slow-motion

2011-06-20 Thread Graham Cox
On 20/06/2011, at 4:47 PM, Matthias Arndt wrote: > another idea is to cache the last output in a bitmap, redraw it in the next > iteration, and update the cache after resizing. But I'll look into this only > if a simple redraw won't be sufficient: The view is already doing this for you. Every

If No Memory Leaks, Is It Good Enough for Memory Management?

2011-06-20 Thread Bing Li
Dear all, I am still a new programmer of Cocoa. In my program, at least right now, there are no memory leaks according to Instruments. Is it good enough for memory management? What I designed is a TCP server which receives TCP messages. When I tested it, 200,000 XML were sent to it with a loop wi

If No Memory Leaks, Is It Good Enough for Memory Management?

2011-06-20 Thread Bing Li
Dear all, I am still a new programmer of Cocoa. In my program, at least right now, there are no memory leaks according to Instruments. Is it good enough for memory management? What I designed is a TCP server which receives TCP messages. When I tested it, 200,000 XML were sent to it with a loop wi

Re: NSArrayController loses selection upon CoreData refreshObject.

2011-06-20 Thread Quincey Morris
On Jun 19, 2011, at 23:47, Motti Shneor wrote: > Background: I use an NSTableView with an NSArrayController to display a list > of CoreData entity instances (say instances of "Note" entity). I DO NOT > configure the array controller for "Entity" mode, because this is a "read > only" view. All

Re: How to redraw a view in slow-motion

2011-06-20 Thread Matthias Arndt
Hi Graham, hi Uli, guys, you're gems! Thanks for all the input. Currently it's too early to dive into some high sophisticated optimization, and with Graham's info I'm confident the view's back buffer will work for me. Am 20. Jun 2011 um 08:59 schrieb Graham Cox : > The view is already doing th

Re: Automatically mirroring folders

2011-06-20 Thread Matt Gough
Can you not make use of: kFSEventStreamCreateFlagIgnoreSelf "Ignore events generated by this client. For example, an application might want to watch for changes to a file so that it can reread it, but should not needlessly reread it if the change to the file was caused by the application itself

Re: If No Memory Leaks, Is It Good Enough for Memory Management?

2011-06-20 Thread Conrad Shultz
First, please tell me you have read up on memory management after every person on this list told you to do so. And bought a C book. That said, no, Instruments not showing any leaks is not itself sufficient to prove you are managing memory properly. For one, Instruments will generally only show

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Kyle Sluder
On Jun 20, 2011, at 12:36 AM, James Merkel wrote: > It turns out if I use setUsesThreadedAnimation:YES on the progress indicator, > the bar indicator animates. > > The docs say this method sets a hint as to whether the receiver should > implement animation of the progress indicator in a separa

Re: If No Memory Leaks, Is It Good Enough for Memory Management?

2011-06-20 Thread Tony Romano
Well, a loose definition for a leak is memory not being referenced anymore and not returned to the heap manager. However, you can still have large consumptions of memory while being referenced and it's not considered a leak by the Leaks tool. BUT, you still have a problem due to your memory consu

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
Yeah, I just kind of avoided the basic problem. The app isn't receiving at least some events -- for example the menus can't be pulled down. On the other hand, the spinning beach ball doesn't appear, and I can drag the progress window around. I'll have to see if a cancel button will work.

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
It turns out if I use setUsesThreadedAnimation:YES on the progress indicator, the bar indicator animates. The docs say this method sets a hint as to whether the receiver should implement animation of the progress indicator in a separate thread. I guess the hint is taken and the animation i

Re: Automatically mirroring folders

2011-06-20 Thread Tony Romano
You coded your application to tell you when the directory has changed and it's doing exactly that. I'm not sure what changes you are interested in knowing or ignoring(I.e. File added, file modified, file deleted). In all cases, you will need to track something so you have a reference, get a notif

finder get info window

2011-06-20 Thread Rick C.
Hi again, I'm assuming there must be a way to call the standard Finder get info window in cocoa but I can't figure it out? I know this is possible in applescript but hoping I don't have to go there... Thanks!___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Mike Abdullah
On 20 Jun 2011, at 09:31, James Merkel wrote: > Yeah, I just kind of avoided the basic problem. The app isn't receiving at > least some events -- for example the menus can't be pulled down. On the other > hand, the spinning beach ball doesn't appear, and I can drag the progress > window arou

Re: finder get info window

2011-06-20 Thread jonat...@mugginsoft.com
On 20 Jun 2011, at 09:48, Rick C. wrote: > Hi again, > > I'm assuming there must be a way to call the standard Finder get info window > in cocoa but I can't figure it out? I know this is possible in applescript > but hoping I don't have to go there... I think that you will have to access the

Re: finder get info window

2011-06-20 Thread Graham Cox
On 20/06/2011, at 6:48 PM, Rick C. wrote: > 'm assuming there must be a way to call the standard Finder get info window > in cocoa Seems a strange assumption. How do you "call" a window anyway? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: finder get info window

2011-06-20 Thread Rick C.
Sorry I just meant a way to launch that window similar to the way this will reveal an item in Finder: [[NSWorkspace sharedWorkspace] selectFile:filePath inFileViewerRootedAtPath:nil]; If Applescript is the only way then I guess I'll have to give it a try. Thanks to you both! On Jun 20, 2011

Re: finder get info window

2011-06-20 Thread jonat...@mugginsoft.com
On 20 Jun 2011, at 12:16, Rick C. wrote: > Sorry I just meant a way to launch that window similar to the way this will > reveal an item in Finder: > > [[NSWorkspace sharedWorkspace] selectFile:filePath > inFileViewerRootedAtPath:nil]; > > If Applescript is the only way then I guess I'

Re: [iOS] What's the point of UISegementedControl.tintColor?

2011-06-20 Thread Michael Crawford
Rick, if that is how you believe it should work, file a bug on it. Apple might agree, once you bring it to their attention. -Michael On Jun 15, 2011, at 3:21 PM, Rick Mann wrote: > > On Jun 15, 2011, at 12:19 , Luke Hiesterman wrote: > >> If you set it to a color that isn't black, you will b

Running at Logout (like Technical Note TN2228, but for logout)

2011-06-20 Thread Markus Hanauska
I would like to write a little tool that syncs my preference files of various apps between different Macs. I have a couple of applications that have plenty of complicated settings and I would like to keep these settings always in sync between several different Macs. The problem is that I cannot

Bug in NSBezierPath?

2011-06-20 Thread Graham Cox
I've found what I think is a bug in NSBezierPath. I'm just wondering if others have found this, if there's a workaround, or whether I've just stuffed up somewhere. Given a path formed from two closed subpaths such as: [first subpath] MoveTo() LineTo() LineTo() ... LineTo() ClosePath() [second

Re: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?

2011-06-20 Thread Jeff Kelley
If you’re creating the web view in -viewDidLoad, you should probably release it and nil the pointer to it in -viewDidUnload, not -dealloc. Jeff Kelley On Sat, Jun 18, 2011 at 12:19 PM, Matt Neuburg wrote: > >"Important: Before releasing an instance of UIWebView for which you > >have set a dele

Re: CATransactions having no effect in CALayer draw delegate

2011-06-20 Thread David Duncan
On Jun 19, 2011, at 2:14 PM, Ken Tozier wrote: > On Jun 19, 2011, at 3:57 PM, Kyle Sluder wrote: > >> You're setting the contents property of the layer. So returning nil >> from -actionForKey: should do the trick. I just found this post by >> Matt Neuburg that might explain why you're having trou

Re: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?

2011-06-20 Thread David Duncan
On Jun 20, 2011, at 8:21 AM, Jeff Kelley wrote: > If you’re creating the web view in -viewDidLoad, you should probably release > it and nil the pointer to it in -viewDidUnload, not -dealloc. You need to do both. You aren't guaranteed that your -viewDidUnload method will ever be called, so if yo

Re: If No Memory Leaks, Is It Good Enough for Memory Management?

2011-06-20 Thread Scott Ellsworth
On Mon, Jun 20, 2011 at 12:26 AM, Bing Li wrote: > Dear all, > > I am still a new programmer of Cocoa. In my program, at least right now, > there are no memory leaks according to Instruments. Is it good enough for > memory management? No. This is not good enough. If you are doing your memory ma

Re: Weird behavior of -URLByAppendingPathComponent:

2011-06-20 Thread Nathan Sims
FWIW, the standard (can't remember which RFC I saw this in) is for treating a double slash // (or any number of slashes) as a single slash / in URLs (after the initial http://). On Jun 19, 2011, at 9:14 PM, Jens Alfke wrote: > Something seems wrong with -[NSURL URLByAppendingPathComponent:] --

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Nathan Sims
On Jun 20, 2011, at 1:14 AM, Kyle Sluder wrote: > I look forward to the day when OS X automatically kills beachballing programs > after a certain time, a la iOS. Because then maybe iTunes will finally get > rewritten. Ditto for Safari. ___ Cocoa-de

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 2:01 AM, Mike Abdullah wrote: On 20 Jun 2011, at 09:31, James Merkel wrote: Yeah, I just kind of avoided the basic problem. The app isn't receiving at least some events -- for example the menus can't be pulled down. On the other hand, the spinning beach ball doesn't

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 11:47 AM, James Merkel wrote: > > On Jun 20, 2011, at 2:01 AM, Mike Abdullah wrote: > >> >> On 20 Jun 2011, at 09:31, James Merkel wrote: >> >>> Yeah, I just kind of avoided the basic problem. The app isn't >>> receiving at least some eve

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Quincey Morris
On Jun 20, 2011, at 11:47, James Merkel wrote: > Upon further investigation I see that the beach ball does finally appear. > I guess the question is, what is the definition of unresponsive? An app will > always have short unresponsive periods when it is doing something. I try to relate it to vis

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 12:05 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 11:47 AM, James Merkel wrote: On Jun 20, 2011, at 2:01 AM, Mike Abdullah wrote: On 20 Jun 2011, at 09:31, James Merkel wrote: Yeah, I just kind of avoided the basic problem. The

How to design a utilities panel as seen in XCode4?

2011-06-20 Thread Luc Van Bogaert
Hi, In the application I'm building, I'm using some kind of "inspector" panel that will display and allow the editing of various attributes of some selected object. We're talking about a significant number of attributes, so I would like to arrange them into logical groups to present them to the

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Greg Parker
On Jun 20, 2011, at 11:47 AM, James Merkel wrote: > Another question -- when should a progress indicator be put up? The length of > time in my processing loop can very greatly. I could be processing 3 files or > 300 files. It seems a waste to flash a progress indicator for very short > processin

Re: How to design a utilities panel as seen in XCode4?

2011-06-20 Thread jonat...@mugginsoft.com
On 20 Jun 2011, at 21:51, Luc Van Bogaert wrote: > Hi, > > In the application I'm building, I'm using some kind of "inspector" panel > that will display and allow the editing of various attributes of some > selected object. We're talking about a significant number of attributes, so I > would

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 2:05 PM, Greg Parker wrote: On Jun 20, 2011, at 11:47 AM, James Merkel wrote: Another question -- when should a progress indicator be put up? The length of time in my processing loop can very greatly. I could be processing 3 files or 300 files. It seems a waste to flash

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:17 PM, James Merkel wrote: > I am trying to come up with a way of not using threads (because of the > potential problems). All I really want to do is give the user a way of > canceling the long process. I was thinking of just sampling a ca

Disable implicit animations in layer backed NSScrollViews?

2011-06-20 Thread Daniel Waylonis
I'm stuck on a weird bug with NSTableViews and CALayers. I tried to ask up at WWDC in one of the labs, but didn't get an answer. I have a auto-resizing NSTableView subclass in NSScrollView in a layer backed view. I'm using the 10.6 SDK and targeting 10.5 as well. When I resize, the contents "

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 3:33 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:17 PM, James Merkel wrote: I am trying to come up with a way of not using threads (because of the potential problems). All I really want to do is give the user a way of canceling t

Re: Disable implicit animations in layer backed NSScrollViews?

2011-06-20 Thread Kyle Sluder
On Mon, Jun 20, 2011 at 3:52 PM, Daniel Waylonis wrote: > When I resize, the contents "jump" in the table view.  I believe it is > because there's an implicit animation to move the bounds and/or position.  Or > maybe something in the clip?  I'd also not like it to fade in if I toggle > between

UIScrolview in only one direction at time

2011-06-20 Thread Tales Pinheiro de Andrade
Hello, is it possible to temporally disable the scroll in one direction? For example, if the user start scrolling in horizontal, so it's only possible to scroll in that direction, until the scroll end. After that, if the user starts scrolling in vertical, it's temporally (until the scrolls end)

Re: Automatically mirroring folders

2011-06-20 Thread Leonardo
It's simply great! I am going to try it right now. The point is that I didn't see that option, and I have checked that page several times. My head is full of variables... I need a break. Regards -- Leonardo > Da: Matt Gough > Data: Mon, 20 Jun 2011 08:53:40 +0100 > A: Leonardo > Cc: > Oggett

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:54 PM, James Merkel wrote: > I'm opening all digital camera files in a folder (JPEG, TIF, etc), > extracting a thumbnail and some Exif data, and putting the data in a > TableView. The time consuming part is finding the thumbnails in the f

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 7:23 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:54 PM, James Merkel wrote: I'm opening all digital camera files in a folder (JPEG, TIF, etc), extracting a thumbnail and some Exif data, and putting the data in a TableView. The time

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread davelist
On Jun 20, 2011, at 11:43 PM, James Merkel wrote: > > > On Jun 20, 2011, at 7:23 PM, Conrad Shultz wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 6/20/11 3:54 PM, James Merkel wrote: >>> I'm opening all digital camera files in a folder (JPEG, TIF, etc), >>> extracting

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 8:43 PM, James Merkel wrote: On Jun 20, 2011, at 7:23 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:54 PM, James Merkel wrote: I'm opening all digital camera files in a folder (JPEG, TIF, etc), extracting a thumbnail and some Exif

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 8:43 PM, James Merkel wrote: > First of all (kind of basic) what is GCD ? Sorry, I shouldn't just throw acronyms around. GCD stands for "Grand Central Dispatch" - Apple's newest technology for concurrent programming. It has a relatively

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 8:57 PM, James Merkel wrote: > Ok, I see GCD == Grand Central Dispatch. Available on Snow Leopard. > I'm on 10.5.8. I'll probably have to buy a new machine and get back to > you on this! Ruh-roh. If you need to support pre-SL, you can go w

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread Ken Tozier
Hi James, I recently finished a file routing app that does a lot of heavy duty operations to files and found that the combination of NSInvocationOperations/NSOperationQueue to be really programmer friendly. Among the stuff my app does is copy large image files from A to B, creates thumbnails

Re: Disable implicit animations in layer backed NSScrollViews?

2011-06-20 Thread Kyle Sluder
On Jun 20, 2011, at 9:47 PM, Daniel Waylonis wrote: > Hi Kyle, > > Thanks for the suggestion. > > Unfortunately: > > - (void)resizeWithOldSuperviewSize:(NSSize)oldSize { > [CATransaction begin]; > [CATransaction setDisableActions:YES]; > [super resizeWithOldSuperviewSize:oldSize]; > [C

Use kAERestart to Restart Computer

2011-06-20 Thread Andy Boutte
Does any body have some sample code that they can share that will restart the computer? I have looked at the code on these pages: http://applerr.com/forum/mac/3648/programmatically-put-a-mac-into-sleep.htm http://developer.apple.com/library/mac/#qa/qa1134/_index.html What I cant figure out is w

NSSavePanel called from 64-bit NPAPI plugin

2011-06-20 Thread Kevin Peterson
I'm attempting a "save as" [NSSavePanel savePanel] modal dialog from an NPAPI plugin compiled for x86_64 and running under Safari 5.0.5 on OSX 10.6.7. Whenever the call to runModal completes Safari ends up in a wedged state in which none of menu pull downs are accessible (all greyed out) and t

Re: How to redraw a view in slow-motion

2011-06-20 Thread Ken Tozier
Hi Matthias I got frustrated with my own coding and thought I'd take another crack at your animation problem as a diversion... Here's the result, enjoy -Ken #define DRAW_LINES_BLOCK_SIZE 100 #define DRAW_LINES_BLOCK_DELAY 1 - (void) setFrame:(NSRect) inRect { // I'm assuming you st

User interface items not get touch events in custom view in iOS app

2011-06-20 Thread talesp
Hi, I have a custom view if a few buttons in it. These buttons are added to the view programatically in initWithFrame method: - (id)initWithFrame:(CGRect)frame {     self = [super initWithFrame:frame];     if (self) {         btnGlass = [UIButton buttonWithType:UIButtonTypeCustom];         btnG

Re: Use kAERestart to Restart Computer

2011-06-20 Thread Nick Zitzmann
On Jun 19, 2011, at 11:00 PM, Andy Boutte wrote: > Does any body have some sample code that they can share that will restart the > computer? I have looked at the code on these pages: > > http://applerr.com/forum/mac/3648/programmatically-put-a-mac-into-sleep.htm > http://developer.apple.com/li