Re: Problem with friend function and gcc 4.2 with

2008-08-11 Thread Ken Worley
First, I appreciate the response and discussion. Thank you. My response is not meant to be argumentative, but I'd like to get to the bottom of this. The main thrust of that discussion (on bytes.com) seems to be that since the friend function is both declared and defined inline within the

Re: Lazy Loading of images

2008-08-11 Thread Johannes Fahrenkrug
Kyle, Thank you very much, that was what I needed to know!! - Johannes On Sun, Aug 10, 2008 at 8:09 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Fri, Aug 8, 2008 at 9:52 AM, Johannes Fahrenkrug > <[EMAIL PROTECTED]> wrote: >> I'd like to display placeholder images until the table cell gets >>

Re: NSImage and zooming PDFs vs. bitmaps

2008-08-11 Thread Hamish Sanderson
On 8 Aug 2008, at 17:53, Ken Ferry wrote: The correct answer is to call setDataRetained:YES on your image. However, there may be a bug in Leopard and previous with NSImage cache expiration that prevents that from being enough. If you seem to be hitting it, you can probably work around it by add

Re: NSArrayController's selectedIndexes

2008-08-11 Thread Negm-Awad Amin
Am Sa,09.08.2008 um 09:32 schrieb Ryan Brown: Never mind, the "(Missing) KVO notification old and new values" section on mmalc's Cocoa Bindings Examples and Hints confirmed that this is a bug. It mentions that this won't be fixed for the forseeable future... could someone elaborate as to w

NSTokenField with plain text

2008-08-11 Thread Chris Idou
I've seen programs where a NSTokenField allows plain text interspersed with tokens. But when I use NSTokenField it insists on making all text that is entered to be part of a token. How do I restrict the set of allowable tokens and make anything else entered to be just plain text? ___

NSTokenField with plain text

2008-08-11 Thread Chris Idou
I've seen programs where a NSTokenField allows plain text interspersed with tokens. But when I use NSTokenField it insists on making all text that is entered to be part of a token. How do I restrict the set of allowable tokens and make anything else entered to be just plain text? ___

Sort Descriptor problem in NSTableView

2008-08-11 Thread Graham Cox
I have a table view where one column's strings are sorted using (NSCaseInsensitiveSearch | NSNumericSearch). To do this I use compare:options: on the strings. I'd like to be able to allow the user to sort ascending or descending in the usual way by clicking the column header but using the a

Non-NSObject object and garbage collection

2008-08-11 Thread Oleg Krupnov
My application relies fully on garbage collection as the memory management method. Now I want to use a Quartz object which is not derived from NSObject. Will it cause a memory leak if I treat the Quartz object in the same way as I do to all my NSObject descendants, i.e. no retains and rely only o

Thread deadlock?

2008-08-11 Thread Trygve Inda
I am seeing a deadlock I think... It works in the debugger, but hangs when running alone. The killThread is called as part of the applicationWillTerminate delegate method. My thought is that somehow after blocking to wait for kConditionThreadIdle, my performSelectorOnMainThread is getting called.

Re: Web links with PyObjC

2008-08-11 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 8:02 PM, Aaron <[EMAIL PROTECTED]> wrote: > Thanks, but I have no idea how to make it link to a web link in the source. Use +[NSWorkspace openURL]. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Non-NSObject object and garbage collection

2008-08-11 Thread Antonio Nunes
On 11 Aug 2008, at 12:56, Oleg Krupnov wrote: Will it cause a memory leak if I treat the Quartz object in the same way as I do to all my NSObject descendants, i.e. no retains and rely only on garbage collection? You either take care of the object's life time manually as you would in a non-ga

Re: Non-NSObject object and garbage collection

2008-08-11 Thread Antonio Nunes
On 11 Aug 2008, at 13:14, Antonio Nunes wrote: Will it cause a memory leak if I treat the Quartz object in the same way as I do to all my NSObject descendants, i.e. no retains and rely only on garbage collection? You either take care of the object's life time manually as you would in a non-g

Re: Non-NSObject object and garbage collection

2008-08-11 Thread Jean-Daniel Dupas
Le 11 août 08 à 14:25, Antonio Nunes a écrit : On 11 Aug 2008, at 13:14, Antonio Nunes wrote: Will it cause a memory leak if I treat the Quartz object in the same way as I do to all my NSObject descendants, i.e. no retains and rely only on garbage collection? You either take care of the obj

Re: including a cocoa bundle in a carbon app

2008-08-11 Thread Jonathan deWerd
On Aug 10, 2008, at 5:39 PM, Uli Kusterer wrote: On 10.08.2008, at 19:38, Bob Sabiston wrote: I got my Cocoa bundle to compile on the Intel machine. It still doesn't load within my app, though. Is there something special I need to do to include it in my project? I just dragged it in on the

Re: Using @selector()

2008-08-11 Thread Negm-Awad Amin
Am Sa,09.08.2008 um 11:23 schrieb Christian Giordano: yep, it works with that :) I presume it is an error in the book. Personally I thought that passing the method not as string it would have recognized the scope (target) automatically. Fortunaly they don't. Selector-dispatching is performed dy

URL Text Color in NSTextView

2008-08-11 Thread Simon Wolf
I am using an NSTextView to display the contents of a Credits.html file. The credits file contains URLs which I am specifying as HTML links. For example, one line in my Credits.html file may be: "Distributed under a http://creativecommons.org/licenses/by/3.0/ " target="_blank">Creative Commo

How to check the capital letter?

2008-08-11 Thread Macarov Anatoli
HI! Cocoa, Obj-C. How to check the capital letter? Вы уже с Yahoo!? Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: How to check the capital letter?

2008-08-11 Thread Jaime Magiera
On Aug 11, 2008, at 8:52 AM, Macarov Anatoli wrote: HI! Cocoa, Obj-C. Hi, You'll want to look into NSScanner and NSCharacterSet. The String Programming Guide should provide all you need... http://developer.apple.com/documentation/Cocoa/Conceptual/Strings/index.html hope that helps, Jai

Re: URL Text Color in NSTextView

2008-08-11 Thread Uli Kusterer
On 11.08.2008, at 14:45, Simon Wolf wrote: All of my attempts to change the foreground color via NSForegroundColorAttributeName have failed so far as have attempts to set the color in the Credits.html file (CSS works for standard text, not links however). IIRC NSTextView has a method to

Re: How to check the capital letter?

2008-08-11 Thread Mike Abdullah
On 11 Aug 2008, at 13:52, Macarov Anatoli wrote: HI! Cocoa, Obj-C. How to check the capital letter? You really need to explain what it is you actually want to do. Вы уже с Yahoo!? Испытайте обновленную и улучшенную. Yahoo! П

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 10:52 PM, Macarov Anatoli wrote: HI! Cocoa, Obj-C. How to check the capital letter? Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @"Aa"; char first = [str characterAtIndex:0]; char second = [

Re: How to check the capital letter?

2008-08-11 Thread Jean-Daniel Dupas
Le 11 août 08 à 15:29, Ron Fleckner a écrit : On 11/08/2008, at 10:52 PM, Macarov Anatoli wrote: HI! Cocoa, Obj-C. How to check the capital letter? Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @"Aa"; char first =

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 11:29 PM, Ron Fleckner wrote: On 11/08/2008, at 10:52 PM, Macarov Anatoli wrote: HI! Cocoa, Obj-C. How to check the capital letter? Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @"Aa"; char first

Re: URL Text Color in NSTextView

2008-08-11 Thread Simon Wolf
On 11 Aug 2008, at 14:27, Uli Kusterer wrote: On 11.08.2008, at 14:45, Simon Wolf wrote: All of my attempts to change the foreground color via NSForegroundColorAttributeName have failed so far as have attempts to set the color in the Credits.html file (CSS works for standard text, not link

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 11:35 PM, Jean-Daniel Dupas wrote: Le 11 août 08 à 15:29, Ron Fleckner a écrit : Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @"Aa"; char first = [str characterAtIndex:0]; char second = [s

Re: How to check the capital letter?

2008-08-11 Thread Uli Kusterer
On 11.08.2008, at 15:29, Ron Fleckner wrote: NSString *str = @"Aa"; char first = [str characterAtIndex:0]; char second = [str characterAtIndex:1]; NSLog(@"%c is [EMAIL PROTECTED]", first, isupper(first) ? @"uppercase" : @"lowercase"); NSLog(@"%c is [EMAIL PROTECTED]",

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 11:54 PM, Uli Kusterer wrote: On 11.08.2008, at 15:29, Ron Fleckner wrote: NSString *str = @"Aa"; char first = [str characterAtIndex:0]; char second = [str characterAtIndex:1]; NSLog(@"%c is [EMAIL PROTECTED]", first, isupper(first) ? @"uppercase" :

NSConditionLock vs MPQueue

2008-08-11 Thread Trygve Inda
I am using NSConditionLock in Cocoa but it seems unable to match the capabilities of MPQueue for my needs. I am using -- from my worker thread, do something on the main thread -- [lock lockWhenCondition:kTaskComplete]; In the Carbon version I used MPWaitOnQueue. The difference is that MPWaitOn

addObserver:

2008-08-11 Thread Chris Idou
I'm making the following call (and defining observeValueForKeyPath on self etc) on an NSArrayController, hoping to get notifications of it changing. But I don't seem to be getting any notifications. Should this work? [arrayController addObserver:self forKeyPath:@"content" o

Re: Sort Descriptor problem in NSTableView

2008-08-11 Thread Keary Suska
8/11/08 4:35 AM, also sprach [EMAIL PROTECTED]: > I have a table view where one column's strings are sorted using > (NSCaseInsensitiveSearch | NSNumericSearch). To do this I use > compare:options: on the strings. > > I'd like to be able to allow the user to sort ascending or descending > in the u

Re: addObserver:

2008-08-11 Thread Negm-Awad Amin
Am Mo,11.08.2008 um 16:15 schrieb Chris Idou: I'm making the following call (and defining observeValueForKeyPath on self etc) on an NSArrayController, hoping to get notifications of it changing. But I don't seem to be getting any notifications. Should this work? [arrayController addOb

Re: addObserver:

2008-08-11 Thread Keary Suska
8/11/08 8:15 AM, also sprach [EMAIL PROTECTED]: > I'm making the following call (and defining observeValueForKeyPath on self > etc) on an NSArrayController, hoping to get notifications of it changing. But > I don't seem to be getting any notifications. Should this work? > > > [arrayController ad

Re: How to check the capital letter?

2008-08-11 Thread Marco Masser
How to check the capital letter? If you don't want to mess around with NSCharacterSet and NSScanner, you could also do this: NSString *string = @"abcABC"; NSUInteger index = 0; // The character at this index will be checked NSString *character = [string substringWithRange:NSMakeRange(index,

Re: Memory Leaks & Instruments Questions

2008-08-11 Thread Nathan Vander Wilt
On Aug 10, 2008, at 12:37 PM, Michael Kaye wrote: I've ben running my app with leaks in Instruments and it is reporting a fair number of leaks. On analyzing these leaks, they all appear to be related to apple frameworks methods/code and never as a direct result of any objects I've instanti

Table Column NSSegmentedCell - Segment not Selecting

2008-08-11 Thread hac
I have a table column that contains multiple types of cells. One is an NSSegmentedCell. To do this, I have tried variations of the following code. I use it in the table's data source as well as to override the column's dataCellForRow method: NSSegmentedCell *theCell = [[[NSSegmentedCell alloc] ini

Re: Table Column NSSegmentedCell - Segment not Selecting

2008-08-11 Thread hac
I've solved my own problem, finally. I have set the data source to return an NSNumber containing the selected index rather than an actual cell. I still don't really understand why I do this for only some types of cells, but this solution works fine. On Sun, Aug 10, 2008 at 11:32 PM, hac <[EMAIL PR

Miniaturizing a window when PowerPoint is in full screen mode

2008-08-11 Thread Angie Frazier
I'm having trouble getting a window in my application to miniaturize when PowerPoint is open in full screen mode. The window counts down to zero, when it hits zero, it should miniaturize itself to the dock. This works as expected unless PowerPoint is also running in full screen mode. The miniaturiz

Re: Why use NSObjectController?

2008-08-11 Thread Sean McBride
On 8/10/08 10:08 PM, Seth Willits said: >>> What is it that NSObjectController offers me? >> >> An implementation of the NSEditor and NSEditorRegistration protocols. > >Now I'll just have to figure out when I'd want to use those... I seem to have run into this situation the other day. Maybe my e

Re: Memory Leaks & Instruments Questions

2008-08-11 Thread Sean McBride
On 8/10/08 8:37 PM, Michael Kaye said: >I've ben running my app with leaks in Instruments and it is reporting >a fair number of leaks. Is your app garbage collected? Instruments reports many many false positives in GC apps. -- Sean Mc

Re: Thread deadlock?

2008-08-11 Thread Michael Ash
On Mon, Aug 11, 2008 at 8:09 AM, Trygve Inda <[EMAIL PROTECTED]> wrote: > I am seeing a deadlock I think... It works in the debugger, but hangs when > running alone. The killThread is called as part of the > applicationWillTerminate delegate method. You can use gdb to attach to the program after i

Re: NSImage and zooming PDFs vs. bitmaps

2008-08-11 Thread Ken Ferry
On Aug 11, 2008, at 1:15 AM, Hamish Sanderson <[EMAIL PROTECTED] > wrote: On 8 Aug 2008, at 17:53, Ken Ferry wrote: The correct answer is to call setDataRetained:YES on your image. However, there may be a bug in Leopard and previous with NSImage cache expiration that prevents that from bei

Re: NSConditionLock vs MPQueue

2008-08-11 Thread Michael Ash
On Mon, Aug 11, 2008 at 10:07 AM, Trygve Inda <[EMAIL PROTECTED]> wrote: > I am using NSConditionLock in Cocoa but it seems unable to match the > capabilities of MPQueue for my needs. > > I am using > > -- from my worker thread, do something on the main thread -- > > [lock lockWhenCondition:kTaskCo

Re: Get specified window from nib

2008-08-11 Thread Michael Ash
On Sun, Aug 10, 2008 at 10:01 PM, Fosse <[EMAIL PROTECTED]> wrote: > I have one nib containing more than ten dialogs and want to get the > specified window after nib is loading.. Don't take this badly, but if you have one nib with ten windows and you only want to access one of them, you're doing i

Newbie Error on Loading XML

2008-08-11 Thread Matt Keyes
Hello, I am trying to load an XML file from the project, and here is what I do: NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"MyXmlFile" ofType:@"Xml"]]; NSXMLDocument *xmlDoc = nil; @try { xmlDoc = [[NSXMLDocument alloc] initWithContentsOfURL:url];

Re: Newbie Error on Loading XML

2008-08-11 Thread Randall Meadows
On Aug 11, 2008, at 11:16 AM, Matt Keyes wrote: I am trying to load an XML file from the project, and here is what I do: NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"MyXmlFile" ofType:@"Xml"]]; NSXMLDocument *xmlDoc = nil; @try { xmlDoc = [[NSXMLDocu

RE: Newbie Error on Loading XML

2008-08-11 Thread Matt Keyes
That makes sense. I am new to Objective-C and the compiler did not complain with the missing arguments... lesson learned! > CC: cocoa-dev@lists.apple.com > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: Newbie Error on Loading XML > Date: Mon, 11 Aug 2008 11:24:07 -0600 > > On

Re: Newbie Error on Loading XML

2008-08-11 Thread Devon Ferns
You're missing some parameters for initWithContentsOfURL The full method signature is - (id)initWithC

Re: Miniaturizing a window when PowerPoint is in full screen mode

2008-08-11 Thread Eric Schlegel
On Aug 11, 2008, at 6:14 AM, Angie Frazier wrote: I'm having trouble getting a window in my application to miniaturize when PowerPoint is open in full screen mode. The window counts down to zero, when it hits zero, it should miniaturize itself to the dock. This works as expected unless Powe

Re: Thread deadlock?

2008-08-11 Thread Peter Duniho
Date: Mon, 11 Aug 2008 12:09:05 + From: Trygve Inda <[EMAIL PROTECTED]> I am seeing a deadlock I think... It works in the debugger, but hangs when running alone. The killThread is called as part of the applicationWillTerminate delegate method. My thought is that somehow after blocking to

Newbie Question on "self"

2008-08-11 Thread Matt Keyes
Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" i.e. this.m_sMyString = "this is my string"; In Objective-C, this doesn't seem as clear to me (or at least it doesn't compile). For example: - (id

Re: Newbie Question on "self"

2008-08-11 Thread I. Savant
> In Objective-C, this doesn't seem as clear to me (or at least it doesn't > compile). For example: > > - (id)initWithString:(NSString *) string { >self.myString = [[NSString alloc] initWithString:string]; > } > > Produces an error: > > error: request for member 'myString' in something not a

Re: Newbie Question on "self"

2008-08-11 Thread Jonathan Hess
On Aug 11, 2008, at 10:47 AM, Matt Keyes wrote: Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" i.e. this.m_sMyString = "this is my string"; In Objective-C, this doesn't seem as clear to me (

Re: NSConditionLock vs MPQueue

2008-08-11 Thread Adam R. Maxwell
On Monday, August 11, 2008, at 09:56AM, "Michael Ash" <[EMAIL PROTECTED]> wrote: >On Mon, Aug 11, 2008 at 10:07 AM, Trygve Inda <[EMAIL PROTECTED]> wrote: >> I am using NSConditionLock in Cocoa but it seems unable to match the >> capabilities of MPQueue for my needs. >> >> I am using >> >> -- fro

Re: Why use NSObjectController?

2008-08-11 Thread R.L. Grigg
On Aug 11, 2008, at 8:52 AM, Sean McBride wrote: But it seems you can't send commitEditing to a textfield. Why? If this was supported, wouldn't it greatly simplify things, meaning no need to have a NSController subclass, etc.? This is what confuses alot of newbs like me. Not arguing again

Re: Newbie Question on "self"

2008-08-11 Thread Matt Neuburg
On Mon, 11 Aug 2008 17:47:59 +, Matt Keyes <[EMAIL PROTECTED]> said: >Hello again, > >In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" > >i.e. this.m_sMyString = "this is my string"; > >In Objective-C, this does

RE: Newbie Question on "self"

2008-08-11 Thread Matt Keyes
Thanks y'all... in all the Obj-C examples I've read, I've never seen the -> operator used. I should have thought to check! (since in C++ it would be this->whatever). Thanks again, Matt > Date: Mon, 11 Aug 2008 11:05:55 -0700 > Subject: Re: Newbie Question on "self" > From: [EMAIL PROTECTED]

Re: Newbie Question on "self"

2008-08-11 Thread Todd Heberlein
- (id)initWithString:(NSString *) string { self.myString = [[NSString alloc] initWithString:string]; } Well, you don't need the "self" prefix, but you may want to look at using "setters" and "getters". It would look like this @interface MyThingy : NSObject { ... NSString*

Re: Newbie Question on "self"

2008-08-11 Thread Gregory Weston
Matt Keyes wrote: Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" i.e. this.m_sMyString = "this is my string"; In Objective-C, this doesn't seem as clear to me (or at least it doesn't compil

Re: Newbie Question on "self"

2008-08-11 Thread Charles Steinman
--- On Mon, 8/11/08, Todd Heberlein <[EMAIL PROTECTED]> wrote: > Well, you don't need the "self" prefix, but > you may want to look at > using "setters" and "getters". It would > look like this > > @interface MyThingy : NSObject { > ... > NSString* myString; > ... > }; >

Opening an external file in a external application

2008-08-11 Thread John Love
I have a multiple document Cocoa app where I (try to) open an external file in whatever application the file belongs to -- in my case, an Excel spreadsheet in Excel. The new Cocoa document window shown keeps track of the calculation progress in Excel via a NSProgressIndicator and a NSTextF

Re: Thread deadlock?

2008-08-11 Thread Scott Ribe
> ...but it would surprise if you have to take the lock > just to inspect the condition (per the "threadMustExit" method). That part is correct, as it's the entire point behind conditions, atomically check a condition and release the lock at the same time (and subsequently relock)--in order to avo

Delayed termination to allow release

2008-08-11 Thread Trygve Inda
My main thread creates a few other objects which have NSThreads and/or timers. I have found that when I quit the app, and the threads are ended, something in the OS is retaining my objects for a bit... They end up never being dealloc'd which messes a few things up as some data is written to disk at

Re: Cocoa Dev Style: Using Class versus Object Methods

2008-08-11 Thread Christopher Nebel
On Aug 8, 2008, at 8:33 AM, Uli Kusterer wrote: On 08.08.2008, at 07:28, Nick Zitzmann wrote: On Aug 7, 2008, at 11:08 AM, Lee, Frederick wrote: 1) why use instantiated objects versus classes (via class methods)? Because class methods other than +new return autoreleased objects, wh

Re: NSConditionLock vs MPQueue

2008-08-11 Thread Scott Ribe
If all your thread questions here relate to cleanly shutting down the thread, you could just spin on isFinished. Then file a bug report asking for a join method in NSThread... -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice __

Re: Challenge 18 in Hillegass Book

2008-08-11 Thread James G.
On Aug 10, 2008, at 10:03 AM, Kyle Sluder wrote: On Sat, Aug 9, 2008 at 8:54 PM, James Gorham <[EMAIL PROTECTED]> wrote: I think that's where I'm unclear. Making the Document class aware of the view is easy enough with an IBOutlet. But how to properly make the view aware of the document I'

Use of AppKit in command-line app on headless node

2008-08-11 Thread Rick Hoge
Hi - I am trying to factor some frameworks so that code used in a document- based Cocoa app can be shared with command-line tools that might run on a headless node (no window server). I've seen some discussion in the past on questions such as whether NSImage and related classes can be use

Opening an external file in a external application

2008-08-11 Thread John Love
I have a multiple document Cocoa app where I (try to) open an external file in whatever application the file belongs to -- in my case, an Excel spreadsheet in Excel. The new Cocoa document window shown keeps track of the calculation progress in Excel via a NSProgressIndicator and a NSTextF

Re: Delayed termination to allow release

2008-08-11 Thread David Duncan
On Aug 11, 2008, at 11:33 AM, Trygve Inda wrote: My main thread creates a few other objects which have NSThreads and/or timers. I have found that when I quit the app, and the threads are ended, something in the OS is retaining my objects for a bit... They end up never being dealloc'd which m

Re: Delayed termination to allow release

2008-08-11 Thread Charles Steinman
--- On Mon, 8/11/08, Trygve Inda <[EMAIL PROTECTED]> wrote: > My main thread creates a few other objects which have > NSThreads and/or > timers. I have found that when I quit the app, and the > threads are ended, > something in the OS is retaining my objects for a bit... > They end up never > bein

Re: Memory Leaks & Instruments Questions

2008-08-11 Thread Michael Kaye
Thanks for the reply - very helpful. Looks like I have some work to do. Appreciate the explanation of the singleton business too. To the other replier - no I'm not using GC with this app but thanks for the pointer. Regards. Michael. On 11 Aug 2008, at 16:21, Nathan Vander Wilt wrote: On

Re: Thread deadlock?

2008-08-11 Thread Trygve Inda
> Key Trygve, > > This looks similar to the threading code we talked about a while > back. Far be it for me to say that my threading code is bugless :), > but I haven't run into a deadlock problem, and the code you posted > has two changes that would give me pause... > > >> [self per

Change in NSDocument between 10.4 and 10.5

2008-08-11 Thread Randall Meadows
The application I'm working on is NSDocument-based. In my client's workflow, these documents will typically live on a server volume mounted on the desktop, and be edited from there. When a document is opened, it's file name (extension)[1] is changed to indicate that it is currently being

Re: Why use NSObjectController?

2008-08-11 Thread Mike Abdullah
But then you'd have to figure out which text field to send it to, and whether the command is necessary. NSObjectController takes care of that for you. On 11 Aug 2008, at 19:05, R.L. Grigg wrote: On Aug 11, 2008, at 8:52 AM, Sean McBride wrote: But it seems you can't send commitEditing to

Re: Delayed termination to allow release

2008-08-11 Thread Negm-Awad Amin
Am Mo,11.08.2008 um 20:33 schrieb Trygve Inda: My main thread creates a few other objects which have NSThreads and/or timers. I have found that when I quit the app, and the threads are ended, something in the OS is retaining my objects for a bit... They end up never being dealloc'd which me

Re: Use of AppKit in command-line app on headless node

2008-08-11 Thread Rick Hoge
I am trying to factor some frameworks so that code used in a document-based Cocoa app can be shared with command-line tools that might run on a headless node (no window server). I've seen some discussion in the past on questions such as whether NSImage and related classes can be used hea

Re: Delayed termination to allow release

2008-08-11 Thread Trygve Inda
> --- On Mon, 8/11/08, Trygve Inda <[EMAIL PROTECTED]> wrote: > >> My main thread creates a few other objects which have >> NSThreads and/or >> timers. I have found that when I quit the app, and the >> threads are ended, >> something in the OS is retaining my objects for a bit... >> They end up ne

Re: Delayed termination to allow release

2008-08-11 Thread Gregory Weston
Trygve Inda wrote: My main thread creates a few other objects which have NSThreads and/or timers. I have found that when I quit the app, and the threads are ended, something in the OS is retaining my objects for a bit... They end up never being dealloc'd which messes a few things up as some

Re: Thread deadlock?

2008-08-11 Thread Peter Duniho
Date: Mon, 11 Aug 2008 12:29:55 -0600 From: Scott Ribe <[EMAIL PROTECTED]> ...but it would surprise if you have to take the lock just to inspect the condition (per the "threadMustExit" method). That part is correct, as it's the entire point behind conditions, atomically check a condition and

Should I retain a variable returned from this accessor?

2008-08-11 Thread Sean DeNigris
Hi, how do I handle memory management for todoUid below? Do I have to retain or autorelease it? I'm using Scripting Bridge to communicate with iCal. Also, this is a sub-routine and todoUid will only be used in the method that calls it. - (NSString*) saveToiCalTodo: (NSString*) theSummary

Objective-C and Cocoa Training in the MD/DC/VA Area?

2008-08-11 Thread Lyndsey Ferguson
Hello, Is anyone aware of training in the Maryland, DC, Virginia area? I'm already aware of AboutObjects.com, but I'm looking at all the options. Thanks in advance, Lyndsey Ferguson --- Mr. Lyndsey Ferguson [EMAIL PROTECTED] http://winterlandexpat.blogspot.com/ _

Re: Newbie Question on "self"

2008-08-11 Thread Scott Ribe
> Using dot-syntax calls getters and setters. You would get exactly the same > behavior by calling self.myString = anotherString. That assumes Objective-C 2. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-

Re: Newbie Question on "self"

2008-08-11 Thread Charles Steinman
--- On Mon, 8/11/08, Scott Ribe <[EMAIL PROTECTED]> wrote: > > Using dot-syntax calls getters and setters. You would > get exactly the same > > behavior by calling self.myString = anotherString. > > That assumes Objective-C 2. The code in question was using properties with synthesized accessors.

Re: Thread deadlock?

2008-08-11 Thread Scott Ribe
> Which part is correct? The original code? The original code was what I meant. However I was thinking of traditional conditions & locks; NSConditionLock does operate at a higher level, and you are right that there is no need for an unconditional lock. But really, I don't see a need for a lock at

Re: Use of AppKit in command-line app on headless node

2008-08-11 Thread Ken Ferry
Hi Rick, I think you might be misreading that technote.. what it says is that trying to guess which methods are and are not safe doesn't work, because a method that does not happen to require the windowserver in one release may require it in another. The section you're quoting is about what to do

Re: Objective-C and Cocoa Training in the MD/DC/VA Area?

2008-08-11 Thread Kyle Sluder
On Mon, Aug 11, 2008 at 3:13 PM, Lyndsey Ferguson <[EMAIL PROTECTED]> wrote: > Is anyone aware of training in the Maryland, DC, Virginia area? I'm already > aware of AboutObjects.com, but I'm looking at all the options. Though it's not really training so much as an informal meetup, there's an NSCo

Re: Use of AppKit in command-line app on headless node

2008-08-11 Thread Jean-Daniel Dupas
Le 11 août 08 à 22:26, Ken Ferry a écrit : Hi Rick, I think you might be misreading that technote.. what it says is that trying to guess which methods are and are not safe doesn't work, because a method that does not happen to require the windowserver in one release may require it in another.

Re: Should I retain a variable returned from this accessor?

2008-08-11 Thread Kyle Sluder
On Mon, Aug 11, 2008 at 3:12 PM, Sean DeNigris <[EMAIL PROTECTED]> wrote: > Hi, how do I handle memory management for todoUid below? Do I have to > retain or autorelease it? > > [...snip...] > >// Get uid to return >NSString* todoUid = [newTodo uid]; > > [...snip...] > >ret

Re: Use of AppKit in command-line app on headless node

2008-08-11 Thread Michael Ash
On Mon, Aug 11, 2008 at 2:58 PM, Rick Hoge <[EMAIL PROTECTED]> wrote: > > >> I am trying to factor some frameworks so that code used in a >> document-based Cocoa app can be shared with command-line tools that might >> run on a headless node (no window server). >> >> I've seen some discussion in the

Re: Should I retain a variable returned from this accessor?

2008-08-11 Thread Nathan Kinsinger
On Aug 11, 2008, at 1:12 PM, Sean DeNigris wrote: Hi, how do I handle memory management for todoUid below? Do I have to retain or autorelease it? I'm using Scripting Bridge to communicate with iCal. Also, this is a sub-routine and todoUid will only be used in the method that calls it.

Re: Thread deadlock?

2008-08-11 Thread Trygve Inda
>> Which part is correct? The original code? > > The original code was what I meant. However I was thinking of traditional > conditions & locks; NSConditionLock does operate at a higher level, and you > are right that there is no need for an unconditional lock. But really, I > don't see a need fo

Re: Thread deadlock?

2008-08-11 Thread Scott Ribe
> Which blocks until the method completes, so I need a way to end the thread, > but in the original code the killThread method blocks waiting for the thread > to finish. > > I probably need to launch a timer or other notification system when the > thread finishes. Why? -- Scott Ribe [EMAIL PROT

Re: Thread deadlock?

2008-08-11 Thread Trygve Inda
There is a chance that my calls to performSelectorOnMainThread can have waitUntilDone:NO I use [myNSData writeToFile:path atomically:YES] NSFileHandle and NSFileManager are shown as not thread safe, but NSData is... Perhaps it is ok, but I would think NSData uses one or both of the above. One of

Re: Thread deadlock?

2008-08-11 Thread Scott Ribe
> There is a chance that my calls to performSelectorOnMainThread can have > waitUntilDone:NO > > I use [myNSData writeToFile:path atomically:YES] > > NSFileHandle and NSFileManager are shown as not thread safe, but NSData > is... Perhaps it is ok, but I would think NSData uses one or both of the

Re: including a cocoa bundle in a carbon app

2008-08-11 Thread Bob Sabiston
On Aug 10, 2008, at 6:39 PM, Uli Kusterer wrote: On 10.08.2008, at 19:38, Bob Sabiston wrote: I got my Cocoa bundle to compile on the Intel machine. It still doesn't load within my app, though. Is there something special I need to do to include it in my project? I just dragged it in on th

Re: Thread deadlock?

2008-08-11 Thread Trygve Inda
>> There is a chance that my calls to performSelectorOnMainThread can have >> waitUntilDone:NO >> >> I use [myNSData writeToFile:path atomically:YES] >> >> NSFileHandle and NSFileManager are shown as not thread safe, but NSData >> is... Perhaps it is ok, but I would think NSData uses one or both

List box like in Mail app

2008-08-11 Thread Devraj Mukherjee
Hi all, I want to create a user interface that kind of looks like the Mail application (so a left hand toolbar with options and the right hand pane has different views presented depending on the selection). My question is how do I go about creating a list item that is 1. Grouped like in Mail 2.

Re: List box like in Mail app

2008-08-11 Thread Kyle Sluder
On Mon, Aug 11, 2008 at 7:23 PM, Devraj Mukherjee <[EMAIL PROTECTED]> wrote: > 1. Grouped like in Mail -outlineView:isGroupItem: NSOutlineView delegate method. > 2. Has a number associated to the list Custom NSCell subclass for column. > 3. Icons for each list item Column with NSImageCell. >

Re: Thread deadlock?

2008-08-11 Thread Peter Duniho
Date: Mon, 11 Aug 2008 21:15:27 + From: Trygve Inda <[EMAIL PROTECTED]> The real issue here is that I need to use [self performSelectorOnMainThread:@selector(doUnsafeStuff) withObject:nil waitUntilDone:YES]; Which blocks until the method completes, so I need a way to end the thr

Re: Thread deadlock?

2008-08-11 Thread Michael Ash
On Mon, Aug 11, 2008 at 5:15 PM, Trygve Inda <[EMAIL PROTECTED]> wrote: >>> Which part is correct? The original code? >> >> The original code was what I meant. However I was thinking of traditional >> conditions & locks; NSConditionLock does operate at a higher level, and you >> are right that the

Re: List box like in Mail app

2008-08-11 Thread I. Savant
On Aug 11, 2008, at 7:30 PM, Kyle Sluder wrote: 3. Icons for each list item Column with NSImageCell. Well ... this will require another custom cell if you're planning on using an outline view because of the disclosure triangle and indentation. Search your local example code for "ImageA

  1   2   >