Re: How to show progress indicator for background job

2010-01-17 Thread Ron Fleckner
On 17/01/2010, at 4:06 PM, Grant Christensen wrote: Hi, apologies for having a wrong topic, replied instead of created a new message. On 16/01/2010, at 11:25 PM, Grant Christensen wrote: Hi all, Somewhat new to cocoa (Mac even) development, and I have a UI layout question that I am hop

Re: Clipping subview drawing to arbitrary path or image (iPhone)

2010-01-17 Thread Rick Mann
On Jan 16, 2010, at 21:23:16, David Duncan wrote: > I'm not certain where you see that comment, but it is incorrect (with respect > to iPhone OS 3.x – the mask property did not exist on 2.x). Scroll to the bottom of this page: http://developer.apple.com/Mac/library/documentation/Cocoa/Conceptu

Re: How to show progress indicator for background job

2010-01-17 Thread Grant Christensen
Hi Ron, Thanks for that... I should have thought to check out how Apple did it themselves. I was thinking a status message would be ok, but wasn't sure about the progress bar, but then it could all be handled in a text label anyway... "Downloading update... 10% complete". Gant On 17/01/2010

Re: Accessing Variables from Multiple NIBs

2010-01-17 Thread Quincey Morris
On Jan 16, 2010, at 22:08, Jon Buys wrote: > Well, before this goes any further, I'm going to go ahead and answer my own > question here. > > The problem is that in the code below, I'm actually instantiating two > AppController objects, one in each NIB. So, one AppController doesn't have > an

Re: How to show progress indicator for background job

2010-01-17 Thread Quincey Morris
On Jan 17, 2010, at 00:58, Grant Christensen wrote: > Thanks for that... I should have thought to check out how Apple did it > themselves. I was thinking a status message would be ok, but wasn't sure > about the progress bar, but then it could all be handled in a text label > anyway... "Downlo

[iphone] Release Navigation View Controller Question

2010-01-17 Thread Philip Vallone
Hi, I have Navigation based application. When I switch from one view to the next I use the following code. In the below code, is it ok to release "browseviewController"? BrowseViewController *browseviewController = [[BrowseViewController alloc] initWithNibName:@"BrowseViewController" bundle:

Re: [iphone] Release Navigation View Controller Question

2010-01-17 Thread Tom Davie
Yes, that code is 100% fine. Here's the logic from purely your point of view. You allocate browserviewController and in doing so take ownership. You do some stuff with browserviewController. You are finished with browserviewController, and don't want to do anything else with it, so you resign own

Re: NSTextField sendActionOn:

2010-01-17 Thread jonat...@mugginsoft.com
On 17 Jan 2010, at 04:56, Brad Stone wrote: > I tried that (textDidBeginEditing) but it fires only after the user hits a > key to begin typing, not when they first enter the field (i.e. the action > that makes the focus ring show up). I want to be notified as soon as the > user clicks in the f

Re: NSTextField sendActionOn:

2010-01-17 Thread Graham Cox
On 17/01/2010, at 3:56 PM, Brad Stone wrote: > I was able to capture the mouseDown event in the field but only in a subclass > which is causing me problems elsewhere. Indeed, a mouse click is not the only reason a field might become focused - the user could tab into it as well. Overriding -b

Re: [iphone] Release Navigation View Controller Question

2010-01-17 Thread Philip Vallone
Thanks Tom. Great explanation! On Jan 17, 2010, at 6:05 AM, Tom Davie wrote: > Yes, that code is 100% fine. > > Here's the logic from purely your point of view. > > You allocate browserviewController and in doing so take ownership. > You do some stuff with browserviewController. > You are fini

NSDrawNinePartImage crash, autorelease sent to freed object

2010-01-17 Thread Richard
hey there i have written a chat client as part of an app i am developing that uses a subclassed NSTextView to draw bubbles around messages, in the iChat style. this works well for me and a few hundred other users, except for one who reports that any time a message is entered the application crashe

Can a model key path binding access a super class property

2010-01-17 Thread Grant Christensen
Hi all, I have two classes, one defining a few base properties, and another more specific class inheriting from it. Example below: @interface BBSBaseClass : NSObject { NSString*aValue; } @property (readwrite, copy) NSString*aV

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread J. Scott Tury
Dave, If you are setting up NSURLConnection on an NSOperation, I would suggest you keep the operation around as you get the data back. The symptom you describe, sounds like you are starting the NSURLConnection, but then you leave your main method in the NSOperation you created. This essentia

problem in display of leopard app on snowleopard

2010-01-17 Thread cocoa learner
Hi All, I have encountered a veered problem (or I am not able to understand). I have developed an App (using NSImageView, NSView, NSProgressIndicator etc.) using Base SDK Mac OS X 10.5. And it works fine on leopard. But when I run the App on Snow Leopard the App (User interface) looks more dull (o

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread Keith Duncan
> Solution 1 would be to have you do a synchronous NSURLConnection in your main > method. This will show you everything is working in that thread and that you > do indeed get data back from your server. This isn't a good idea since it limits the cancelabilty of your operation. > NSRunLoop* cur

Re: NSTextField sendActionOn:

2010-01-17 Thread Brad Stone
Here's why I need this - I've been trying to solve this problem for 2 weeks! This issue all revolves around a NSCollectionView. Each CollectionViewItem has a view containing a NSTextField, NSDatePicker, NSButton (checkbox), and an NSLevelIndicator. The selection index of my CollectionView is b

Re: Can a model key path binding access a super class property

2010-01-17 Thread James Bucanek
Grant Christensen wrote (Sunday, January 17, 2010 6:53 AM +1000): In my window I have a NSTableView that is using an array controller to get access to my data. The array controller is bound to an array of BBSMoreSpecific classes. The problem I am having is that

Re: Bindings Problem

2010-01-17 Thread Jeffrey Oleander
> On Sat, 2010/01/16, Ken Thomases wrote: >> On 2010 Jan 14, at 17:11, Carter R. Harrison wrote: >> My model is an NSMutableSet that contains >> NSMutableDictionaries. > > I think this is asking for trouble.  A set of mutable > dictionaries doesn't make much sense. > > ..."Equal" is determined b

Re: NSTextField sendActionOn:

2010-01-17 Thread jonat...@mugginsoft.com
On 17 Jan 2010, at 16:30, Brad Stone wrote: > Here's why I need this - I've been trying to solve this problem for 2 weeks! > > This issue all revolves around a NSCollectionView. Each CollectionViewItem > has a view containing a NSTextField, NSDatePicker, NSButton (checkbox), and > an NSLevelI

Re: NSTextField sendActionOn:

2010-01-17 Thread Brad Stone
I finally had a breakthrough! I'm not sure it's the "best" solution but it works and hopefully will be instructive for others trying to do the same thing connection views. There's a lot of steps (which is why I think it may not be the "best") so I'll try to be as clear as possible. 1) when a

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread Dave DeLong
Thanks for the responses! It hadn't occurred to me to spin the runloop myself. My main reason for using an NSOperationQueue for the connections was because the spawner of the connections was also the connection delegate, and it would've taken some interesting code dancing to handle the delegate

Re: NSURLRequest and NSOperationQueue

2010-01-17 Thread J. Scott Tury
The issue that Dave has run into is that when you call the asynchronous NSURLConnection call, NSURLConnection looks to see what thread you are calling it on, and it will only call your delegate back on that Thread (if it exists). If you exit your NSOperation main method, your thread is going to

Bindings: NSMutableArray -> NSArrayController -> NSPopUp

2010-01-17 Thread Charles Jenkins
I am struggling with bindings. I have worked through the examples in the Hillegass book, but it seems that none of the examples using NSPopUp quite matches what I need. In my app, just before a view appears, it gets handed a list of games in an NSMutableArray. It makes the array available with

RegexkitLite - Possible bug?

2010-01-17 Thread K . Darcy Otto
I've been working with RegexkitLite, and I'm wondering whether someone else who has RegexkitLite can reproduce this problem, or spot what I'm doing wrong: NSString *originalString = @"IMUIUIUIUUIUIUIUUIUIUIUUIUIUIUUIUIUIUUIUIUIUUIUIUIUUIUIUIU"; // Using the built-in "range:" option NSStri

Re: problem in display of leopard app on snowleopard

2010-01-17 Thread Graham Cox
On 18/01/2010, at 2:58 AM, cocoa learner wrote: > Hi All, > > I have encountered a veered problem (or I am not able to understand). > I have developed an App (using NSImageView, NSView, NSProgressIndicator > etc.) using Base SDK Mac OS X 10.5. And it works fine on leopard. But when I > run the A

Re: If Array Controller is empty, how to populate pop-up list?

2010-01-17 Thread Jenny M
Hi Ken, Thanks for your tips. We're closer I think. I took off the Selected Index binding and instead bound the Selected Value to ArrayController-selection-name. I'm probably binding it wrong though, because I haven't quite gotten it to work yet. I think what you say makes sense, about the select

[SOLVED]: Re: Can a model key path binding access a super class property

2010-01-17 Thread Grant Christensen
Thanks for the nudge in the right direction James... I went back to the debugger and found an underlying problem with the two variables in the base class that were not coming through. It as a mere coincidence that it was those two in the base class, and I was not setting them correctly in the f

Re: Bindings Problem

2010-01-17 Thread Ken Thomases
On Jan 17, 2010, at 11:15 AM, Jeffrey Oleander wrote: >> On Sat, 2010/01/16, Ken Thomases wrote: >>> On 2010 Jan 14, at 17:11, Carter R. Harrison wrote: >>> My model is an NSMutableSet that contains >>> NSMutableDictionaries. >> >> I think this is asking for trouble. A set of mutable >> diction

Re: If Array Controller is empty, how to populate pop-up list?

2010-01-17 Thread Ken Thomases
On Jan 17, 2010, at 4:36 PM, Jenny M wrote: > Thanks for your tips. We're closer I think. I took off the Selected Index > binding and instead bound the Selected Value to > ArrayController-selection-name. I'm probably binding it wrong though, because > I haven't quite gotten it to work yet. > >

Re: RegexkitLite - Possible bug?

2010-01-17 Thread John Engelhart
On Sun, Jan 17, 2010 at 4:15 PM, K.Darcy Otto wrote: > I've been working with RegexkitLite, and I'm wondering whether someone else > who has RegexkitLite can reproduce this problem, or spot what I'm doing > wrong: > > NSString *originalString = > @"IMUIUIUIUUIUIUIUUIUIUIUUIUIUIUUIUIUIUUIUIUIUUIUI

Screen saver using Asynchronous IO lags at close

2010-01-17 Thread Justin Delegard
I am writing a screen saver that forks a process and reads its stdout chunk by chunk. Since I didn't want it to block on reads, I tried to find the non-blocking IO parts of Cocoa. I found Cocoa's NSNotificationCenter, and the associated methods with the NSFileHandle class, and that seemed to f

Blocking for input during a loop?

2010-01-17 Thread Per Bull Holmen
Hi Is it possible, in Cocoa, do program a loop which goes something like this: for i=1 to 20 do something block for GUI user input do something with the input repeat It is for a simple game that plays tones etc, and lets the user guess what was played. Originally, I had implemented it without a

Crash on Snow Leopard in _LSAcquireIconRefForURL

2010-01-17 Thread Dusan
I'm seeing an identical crash to this one reported in September 2009: http://lists.apple.com/archives/Cocoa-dev/2009/Sep/msg01781.html There's no resolution in that thread so I was wondering whether anyone had any ideas on how to circumvent this. I overrode _notePendingRecentDocumentURLsForKey:

Re: Crash on Snow Leopard in _LSAcquireIconRefForURL

2010-01-17 Thread Kyle Sluder
On Sun, Jan 17, 2010 at 6:47 PM, Dusan wrote: > I'm seeing an identical crash to this one reported in September 2009: If you can reliably reproduce the crash, test against the latest seed to which you have access. If it's still a problem, file a bug. I *think* I've seen this crash in the wild be

Re: Blocking for input during a loop?

2010-01-17 Thread Kyle Sluder
On Sun, Jan 17, 2010 at 1:59 PM, Per Bull Holmen wrote: > Is it possible, in Cocoa, do program a loop which goes something like this: > > for i=1 to 20 > do something > block for GUI user input > do something with the input > repeat This is a bad idea. Don't block the UI thread, because then the

Re: Crash using IKImageBrowserView

2010-01-17 Thread Ashley Clark
Were these crashes under Leopard or Snow Leopard. I was seeing similar crashes in GLEngine under GC/Leopard but so far haven't been able to reproduce any of them under Snow Leopard. On Apr 9, 2009, at 10:32 AM, Bill Bumgarner wrote: > On Apr 8, 2009, at 12:36 PM, Ashley Clark wrote: >> Thread 0

Typo in notification name

2010-01-17 Thread Eimantas Vaičiūnas
Hi all! I've been implementing a preferences for my app to be added to login item list and wanted to observe notification for changes in loginItems list. I used notification watcher app and noticed that apple has a typo in notification name: - com.apple.loginItemsListDidChnage instead of - com.ap