Re: Proper NSOperation isCancelled handling

2009-02-13 Thread Ken Thomases
On Feb 12, 2009, at 1:29 PM, Alex Curylo wrote: So I'm a bit confused about how my NSOperation subclass should implement the cancel method. Why are you overriding it? The -cancel method is not supposed to actively bring the operation to a stop. It's only supposed to set a flag. The ope

Re: Garbage Collection and NSManagedObject

2009-02-13 Thread Samuel Strupp
You are right i forgot to remove the persistant store from the coordinator. But i am not sure if that is important because i set the context and coordinator refs to nil. managedObjectContext = nil; persistentStoreCoordinator = nil; managedObjectModel = nil; After this I thought the garbage c

isNotEqualToString

2009-02-13 Thread Chunk 1978
i'm trying to minimize my if statement. i have the following which works: -=-=-=- if (([currentDesktopBackgroundImage isEqualToString:firstPath]) || ([currentDesktopBackgroundImage isEqualToString:secondPath])) { //Go North }

Re: isNotEqualToString

2009-02-13 Thread matt . gough
On 13 Feb 2009, at 10:00, Chunk 1978 wrote: -=-=-=- if ((![currentDesktopBackgroundImage isEqualToString:firstPath]) || (![currentDesktopBackgroundImage isEqualToString:secondPath])) { //Go South } lets assume that currentDesktopBackgrou

Re: isNotEqualToString

2009-02-13 Thread Alexander Spohr
Ahem, if you invert part, you’ll invert all... || should become && atze Am 13.02.2009 um 10:00 schrieb Chunk 1978: i'm trying to minimize my if statement. i have the following which works: -=-=-=- if (([currentDesktopBackgroundImage isEqualToString:firstPath]) || ([curre

Re: isNotEqualToString

2009-02-13 Thread Stephen J. Butler
On Fri, Feb 13, 2009 at 3:00 AM, Chunk 1978 wrote: > i'm trying to minimize my if statement. i have the following which works: > > -=-=-=- >if (([currentDesktopBackgroundImage isEqualToString:firstPath]) || > ([currentDesktopBackgroundImage isEqualToString:secondPath])) > > i'd like to re

Re: isNotEqualToString

2009-02-13 Thread Sherm Pendley
On Feb 13, 2009, at 4:00 AM, Chunk 1978 wrote: i'm trying to minimize my if statement. i have the following which works: -=-=-=- if (([currentDesktopBackgroundImage isEqualToString:firstPath]) || ([currentDesktopBackgroundImage isEqualToString:secondPath])) {

System Preferences "halo/spotlight" effect

2009-02-13 Thread John C. Daub
Hello. In Leopard's System Preferences application, when you type into the search field in the toolbar it presents a list of helpful keywords. In addition, the content area of the window dims and a halo/spotlight effect appears over each icon that is a possible match for what's being typed. I'm

Re: Proper NSOperation isCancelled handling

2009-02-13 Thread Alex Curylo
On 13-Feb-09, at 12:31 AM, Ken Thomases wrote: Why are you overriding it? The -cancel method is not supposed to actively bring the operation to a stop. It's only supposed to set a flag. The operation's work methods (-start, -main, and whatever they call) should be periodically checking

Re: How do I make one thread wait until another thread exits?

2009-02-13 Thread Michael Ash
On Thu, Feb 12, 2009 at 11:08 AM, Oleg Krupnov wrote: > Thanks, Mike. > > I assume that I need to also use > > #define OPERATION_NOT_FINISHED 0 > > and > > condLock = [[NSConditionLock alloc] initWithCondition: > OPERATION_NOT_FINISHED]; > > Right? Strictly speaking this is unnecessary. NSCondit

Re: Proper NSOperation isCancelled handling

2009-02-13 Thread Kyle Sluder
On Fri, Feb 13, 2009 at 8:55 AM, Alex Curylo wrote: > Because all -start does is initiate an NSURLConnection. If it's failing to > connect or whatever, I want the operation to stop when the user says so, not > whenever -didFailWithError gets around to being called. That's not what -cancel is supp

Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread Kyle Sluder
On Fri, Feb 13, 2009 at 7:51 AM, John C. Daub wrote: > I'm figuring in System Preferences it's using an overlay window, but since > my content scrolls I cannot use a window and must use an NSView. I did find > -[NSView addSubview:positioned:relativeTo:], which helped me position my > "halo view" a

Re: How do I make one thread wait until another thread exits?

2009-02-13 Thread James Bucanek
Oleg Krupnov wrote (Thursday, February 12, 2009 9:08 AM +0200): Thanks, Mike. I assume that I need to also use #define OPERATION_NOT_FINISHED 0 and condLock = [[NSConditionLock alloc] initWithCondition: OPERATION_NOT_FINISHED]; Right? I have a doubt here, h

Re: isNotEqualToString

2009-02-13 Thread Gordon Apple
Or just replace the "||" with "&&". DeMorgan's theorem. Basic boolean logic. On 2/13/09 3:19 AM, "cocoa-dev-requ...@lists.apple.com" wrote: > Subject: Re: isNotEqualToString > To: Chunk 1978 > Cc: cocoa-dev Dev > Message-ID: > Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=

Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread Adam R. Maxwell
On Feb 13, 2009, at 4:51 AM, John C. Daub wrote: I'm trying to replicate that overlay halo/spotlight behavior, in a similar sort of window (window full of icons). I'm seeking guidance in how to achieve this. I did this on an OmniAppKit preference window, and it works pretty well using an

NSCollectionView inside an NSSplitView?

2009-02-13 Thread Jean-Nicolas Jolivet
I'm having weird problems with a CollectionView inside an NSSplitView... it looks fine but as soon as I re-size (either by dragging the split view's divider or by re-sizing the window) the CollectionView's animation is flickering a LOT, and the items in my collection view are jumping all ov

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Randall Meadows
On Feb 13, 2009, at 11:09 AM, Jean-Nicolas Jolivet wrote: I'm having weird problems with a CollectionView inside an NSSplitView... it looks fine but as soon as I re-size (either by dragging the split view's divider or by re-sizing the window) the CollectionView's animation is flickering a L

Retrieving the distinct values of an attribute for a Core Data entity

2009-02-13 Thread Jon C. Munson II
Namaste! I'm hoping someone can point me in the right direction for the following. I'm not sure what search terms to use, so I was blindly groping around before I wrote the list. I need to retrieve the distinct values of a given attribute in a Core Data entity. In SQL, this is trivial: "SELECT

Re: Window Max Zoom Size

2009-02-13 Thread Anthony Smith
I'm surprised there isn't a maxZoomSize or something. This doesn't look like it deals with zoom just resizing in general. I'm new to Mac development so I could just be missing something. Thanks for the input! Anthony Smith On Feb 12, 2009, at 11:39 PM, John C. Randolph wrote: On Feb 12,

Re: Retrieving the distinct values of an attribute for a Core Data entity

2009-02-13 Thread I. Savant
On Fri, Feb 13, 2009 at 1:25 PM, Jon C. Munson II wrote: > I need to retrieve the distinct values of a given attribute in a Core Data > entity. It's important to remember that Core Data is not a database system. It shares things in common, but because that is not its focus, there are things yo

Re: Retrieving the distinct values of an attribute for a Core Data entity

2009-02-13 Thread I. Savant
On Fri, Feb 13, 2009 at 2:08 PM, I. Savant wrote: > For example, I don't know that this is possible within a fetch > request (via a predicate), but I do know that you can fetch the > non-distinct data you want and use an array or set operator ... Just to clarify the very confused statement ab

RE: Retrieving the distinct values of an attribute for a Core Data entity

2009-02-13 Thread Jon C. Munson II
Namaste! Yes, 'twas and is indeed. That, I believe answers my question. Many thanks! Peace, Love, and Light, /s/ Jon C. Munson II > -Original Message- > From: I. Savant [mailto:idiotsavant2...@gmail.com] > Sent: Friday, February 13, 2009 2:08 PM > To: jmun...@his.com > Cc: Cocoa-Dev

Re: Window Max Zoom Size

2009-02-13 Thread Ken Thomases
On Feb 13, 2009, at 1:06 PM, Anthony Smith wrote: I'm surprised there isn't a maxZoomSize or something. This doesn't look like it deals with zoom just resizing in general. I'm new to Mac development so I could just be missing something. Thanks for the input! You want the -windowWillUseSta

Re: Window Max Zoom Size

2009-02-13 Thread Andy Lee
Did you look closely at the docs for zoom: before overriding it? Did you try Joar's suggestion to look at NSWindow's delegate methods? What I'm getting at is... I think windowWillUseStandardFrame:defaultFrame: is what you want, though I haven't tried it myself. --Andy On Feb 13, 2009,

Re: Window Max Zoom Size

2009-02-13 Thread Anthony Smith
That looks like it makes sense. I'm assuming -zoom: is only called when being zoomed in and not zoomed out. Is that correct or do I need to detect which way it's zooming? On Feb 13, 2009, at 2:15 PM, Ken Thomases wrote: On Feb 13, 2009, at 1:06 PM, Anthony Smith wrote: I'm surprised there

Re: Window Max Zoom Size

2009-02-13 Thread Jean-Daniel Dupas
Le 13 févr. 09 à 20:15, Ken Thomases a écrit : On Feb 13, 2009, at 1:06 PM, Anthony Smith wrote: I'm surprised there isn't a maxZoomSize or something. This doesn't look like it deals with zoom just resizing in general. I'm new to Mac development so I could just be missing something. Thanks

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Markus Spoettl
On Feb 13, 2009, at 7:09 PM, Jean-Nicolas Jolivet wrote: I'm having weird problems with a CollectionView inside an NSSplitView... it looks fine but as soon as I re-size (either by dragging the split view's divider or by re-sizing the window) the CollectionView's animation is flickering a LOT

Re: Window Max Zoom Size

2009-02-13 Thread Anthony Smith
Sorry, I was backwards: "I'm assuming -zoom: is only called when being zoomed out and not zoomed in." On Feb 13, 2009, at 2:26 PM, Anthony Smith wrote: That looks like it makes sense. I'm assuming -zoom: is only called when being zoomed in and not zoomed out. Is that correct or do I need

Re: Window Max Zoom Size

2009-02-13 Thread Anthony Smith
When a zoom is performed on a window I want to be able to specify the width or height it will zoom out to. Similar to Safari/WebKit's variable zoom size. On Feb 13, 2009, at 2:31 PM, Jean-Daniel Dupas wrote: Le 13 févr. 09 à 20:15, Ken Thomases a écrit : On Feb 13, 2009, at 1:06 PM, Antho

Re: Window Max Zoom Size

2009-02-13 Thread Andy Lee
On Feb 13, 2009, at 2:39 PM, Anthony Smith wrote: Sorry, I was backwards: "I'm assuming -zoom: is only called when being zoomed out and not zoomed in." I guess I would repeat my earlier question: did you look at the documentation for zoom:? Hint: look at the first sentence. --Andy

Re: Window Max Zoom Size

2009-02-13 Thread Clark Cox
On Fri, Feb 13, 2009 at 11:40 AM, Anthony Smith wrote: > When a zoom is performed on a window I want to be able to specify the width > or height it will zoom out to. Similar to Safari/WebKit's variable zoom > size. People have already pointed to the -windowWillUseStandardFrame:defaultFrame: deleg

Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread John C. Daub
on 2/13/09 10:26 AM, Kyle Sluder at kyle.slu...@gmail.com wrote: > On Fri, Feb 13, 2009 at 7:51 AM, John C. Daub wrote: >> I'm figuring in System Preferences it's using an overlay window, but since >> my content scrolls I cannot use a window and must use an NSView. I did find >> -[NSView addSubvi

Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread John C. Daub
on 2/13/09 10:41 AM, Adam R. Maxwell at amaxw...@mac.com wrote: > On Feb 13, 2009, at 4:51 AM, John C. Daub wrote: > >> I'm trying to replicate that overlay halo/spotlight behavior, in a >> similar sort of window (window full of icons). I'm seeking guidance in >> how to achieve this. > > I did t

Re: Window Max Zoom Size

2009-02-13 Thread Sean McBride
On 2/13/09 8:31 PM, Jean-Daniel Dupas said: >I don't understand what you mean by "zoom size" -- ___

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Jean-Nicolas Jolivet
I managed to capture it on video... Here it is: http://silvercocoa.com/flicker.mov Basically I get this whether I resize the window or the split view (using the divider). I also tried replacing my custom view (the rounded rectangle) with a regular NSView... still the same problem On

Re: Window Max Zoom Size

2009-02-13 Thread Anthony Smith
I have been reading the docs and I have stated that I do agree that - windowWillUseStandardFrame:defaultFrame: is what I want. I was trying to clarify to Jean what I meant by "zoom size" as he seemed to be confused by it. My question is whether I need to detect and handle the direction of

NSRunLoop / CFRunLoop

2009-02-13 Thread Alexander Cohen
Hi, Not sure if this is the right place to ask since my question is about CFRunLoop, not Cocoa but CoreFoundation. If not, please direct me to the right list. I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there is a simple call for it but i'm stuck with tiger for n

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Jean-Nicolas Jolivet
Well, after some tests, it appears I am getting the same result even without using an NSSplitView... so apparently the problem is elsewhere... I'm running out of ideas here hehe... On 13-Feb-09, at 3:18 PM, Jean-Nicolas Jolivet wrote: I managed to capture it on video... Here it is: http:

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Markus Spoettl
On Feb 13, 2009, at 10:02 PM, Jean-Nicolas Jolivet wrote: Well, after some tests, it appears I am getting the same result even without using an NSSplitView... so apparently the problem is elsewhere... I'm running out of ideas here hehe... Judging from the video it appears that you resize th

Re: Binding to custom NSCell [Solved]

2009-02-13 Thread Corbin Dunn
On Feb 12, 2009, at 8:53 PM, Ken Tozier wrote: After looking at NSActionCell, I noticed the "setControlView" method and this seems to be the missing link. NSActionCell sets it's control view while NSCell does not. When I manually set the control view for my custom cell to the table that co

Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Chunk 1978
is this possible? it seems that programatically changing com.apple.desktop.plist (Background > Default > Change) from TimeInterval to Never will not override the settings in System Preferences. i though applescript could be an option but it seems that using an applescript to accomplish this would

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Jean-Nicolas Jolivet
If I disable the item's re-sizing, the behavior is less apparent... it's still a little odd (sometimes the items are attached to the right side of the collection viewthen all of a sudden they go back to their original place etc..) but it's definitely not as bad... however, obviously, m

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread I. Savant
On Feb 13, 2009, at 4:30 PM, Chunk 1978 wrote: is this possible? it seems that programatically changing com.apple.desktop.plist (Background > Default > Change) from TimeInterval to Never will not override the settings in System Preferences. i though applescript could be an option but it seems

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Nick Zitzmann
On Feb 13, 2009, at 2:30 PM, Chunk 1978 wrote: is this possible? it seems that programatically changing com.apple.desktop.plist (Background > Default > Change) from TimeInterval to Never will not override the settings in System Preferences. What exactly are you trying to accomplish? Nick Z

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Chunk 1978
i'm trying to set the desktop background from an app, but i've noticed that it will not work if the user has their desktop settings set to change. so i'm trying to uncheck "Change Picture" from the System Prefs (or change TimeInterval to Never in the com.apple.desktop.plist) before setting the new

Re: Converting a CMYK NSImage to RGB

2009-02-13 Thread Ken Ferry
Hi Ron, It was the -[NSImage lockFocus]/-[NSImage unlockFocus] that did it. You should just take them out, they weren't relevant to what you were trying to do. -[NSImage lockFocus] sets the receiver up as a drawing _destination_. You aren't trying to draw into the image here, you're trying to dr

Re: NSRunLoop / CFRunLoop

2009-02-13 Thread Jean-Daniel Dupas
Le 13 févr. 09 à 21:54, Alexander Cohen a écrit : Hi, Not sure if this is the right place to ask since my question is about CFRunLoop, not Cocoa but CoreFoundation. If not, please direct me to the right list. I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there i

NSTableView crash when selected.

2009-02-13 Thread Harry Plate
I am struggling w/ a crash in my first Cocoa app that is using a TableView. Some history: my app and its table view was working just fine when I was simply adding NSString objects to the table. Then I started using NSAttributedString instead so I could get the display ellipses. Now after draggin

Re: NSRunLoop / CFRunLoop

2009-02-13 Thread Ken Thomases
On Feb 13, 2009, at 2:54 PM, Alexander Cohen wrote: I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there is a simple call for it but i'm stuck with tiger for now. Your main thread, before any secondary threads are created, can get its current run loop and stash a re

Re: NSTableView crash when selected.

2009-02-13 Thread Shawn Erickson
On Fri, Feb 13, 2009 at 2:17 PM, Harry Plate wrote: > I am struggling w/ a crash in my first Cocoa app that is using a TableView. > > Some history: my app and its table view was working just fine when I was > simply adding NSString objects to the table. > > Then I started using NSAttributedString

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Ken Thomases
On Feb 13, 2009, at 3:30 PM, Chunk 1978 wrote: is this possible? it seems that programatically changing com.apple.desktop.plist (Background > Default > Change) from TimeInterval to Never will not override the settings in System Preferences. i though applescript could be an option but it seems

Re: NSRunLoop / CFRunLoop

2009-02-13 Thread Michael Ash
On Fri, Feb 13, 2009 at 5:21 PM, Ken Thomases wrote: >> And while i'm at it, i'd like to do something like [obj >> performSelectorOnMainThread...] in CoreFoundation using CFRunLoops. I'm sure >> it's possible but i'm not sure where to start. > > You'd create a custom run loop source. It would man

alloc/release confusion

2009-02-13 Thread Boon Chew
Hi all, I am very new to Cocoa programming (but have programmed in C/C++ before) and there is one thing I don't understand with alloc and release. Sometimes I see code that alloc an object and release it within the same method, even though it's clear that the object is still live and well. Fo

Re: alloc/release confusion

2009-02-13 Thread Kenny Leung
It's all detailed here: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html -Kenny ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact t

Images In Dock Menu?

2009-02-13 Thread Chunk 1978
i have a NSMenu that i use as both a right-click menu and the dock menu. The images i use for some of the menu items will appear in the right-click menu, but they do not show up in the dock menu. i've connected the the File's Owner dockMenu to the NSMenu in IB so to add the menu to the app's dock

Re: Proper NSOperation isCancelled handling

2009-02-13 Thread Ken Heglund
On Feb 13, 2009, at 8:23 AM, Kyle Sluder wrote: On Fri, Feb 13, 2009 at 8:55 AM, Alex Curylo wrote: Because all -start does is initiate an NSURLConnection. If it's failing to connect or whatever, I want the operation to stop when the user says so, not whenever -didFailWithError gets arou

Re: NSTableView crash when selected.

2009-02-13 Thread Corbin Dunn
Appreciate any suggestions, Yes, here's the things I would do, in this order: 1. break on objc_exception_throw : http://www.corbinstreehouse.com/blog/index.php/2008/08/your-most-important-breakpoint-in-cocoa/ 2. Use Instruments to find the over release: http://www.corbinstreehouse.com/blog/i

NSTreeController - Remove Children

2009-02-13 Thread none given
I have a NSTreeController with: Node1 --- value1 --- value2 Node2 --- value1 --- value2 --- value3 With the following, I am able to remove a user selection: [treeController removeObjectsAtArrangedObjectIndexPaths:[treeController selectionIndexPaths]]; I cannot seem to find how to do this by co

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Jerry Krinock
On 2009 Feb 13, at 13:34, Jean-Nicolas Jolivet wrote: If I disable the item's re-sizing, the behavior is less apparent... it's still a little odd (sometimes the items are attached to the right side of the collection viewthen all of a sudden they go back to their original place etc..)

Writing kCFPreferencesAnyUser preferences by limited user

2009-02-13 Thread Alexander Shmelev
Hello, I have Cocoa application, which have to store global settings, so I use CFPreferences...(..., kCFPreferencesAnyUser, kCFPreferencesCurrentHost). Everything was ok while I launched application as admin user, but when I switched to limited user, settings changes were not saved. I have

Re: newbie question on creating .png files

2009-02-13 Thread Steven Spencer
To get a NSBitmapImageRep from a NSImage, have a look at the Reducer sample code at location : http://developer.apple.com/samplecode/Reducer/listing16.html file : ImageReducer.m routine : BitmapImageRepFromNSImage at the end of the file. - Steve > > >On 12.02.2009, at 17:14, Jean-Daniel Dup

Re: alloc/release confusion

2009-02-13 Thread Bryan Henry
When you call -show, the UIAlertView is retained elsewhere (somewhere in SpringBoard's internals). It does look a bit odd, and understandably so, but the -release is correct there because you still want to relinquish your ownership of the object...the ownership you took when you sent the -a

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Jean-Nicolas Jolivet
Thanks for the tip!!! I played with the auto-resize settings (on all the views involved, which means..quite a bunch) and I finally found a combo that appears to be much much better... Still a bit of stuttering/drawing glitches but nothing close to how bad it was before... On 13-Feb-09,

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Chunk 1978
when running my apple script i get this error: -=-=-=- System Events got an error: Access for assistive devices is disabled. -=-=-=- so if i goto system prefs and check "Enable access for assistive devices", then running the script i get this error: -=-=-=- System Events got an error: Can't get

Re: Writing kCFPreferencesAnyUser preferences by limited user

2009-02-13 Thread Nick Zitzmann
On Feb 13, 2009, at 4:54 PM, Alexander Shmelev wrote: I have found that I should use Security.framework. Then I wrote code below, it shows authentication dialog for limited user, but settings still not saving for limited user. What do I do wrong? Could you advise me how to fix code? You

Re: alloc/release confusion

2009-02-13 Thread Boon Chew
Thanks Bryan. How do I go about knowing whether a method like show would do the retain? The reference doc doesn't say it. Also, what if it doesn't? Would a premature release dealloc an object that's still alive (such as a dialog), causing the system to crash when the memory is overwritten by

Re: Converting a CMYK NSImage to RGB

2009-02-13 Thread Ron Aldrich
Hi Ken, Actually, the -[NSImage lockFocus]/-[NSImage unlockFocus] were added to deal with a multi-thread problem that was deadlocking things. If a background thread updated screen state while I was creating the RGB image representation, I would later see a message in the console log read

Re: alloc/release confusion

2009-02-13 Thread Sherm Pendley
On Fri, Feb 13, 2009 at 7:55 PM, Boon Chew wrote: > > How do I go about knowing whether a method like show would do the retain? You don't *need* to know whether other objects retain their arguments. They follow the same rules your own objects follow, so if they do retain it, it's their responsi

Cursor color in NSTextField?

2009-02-13 Thread Jean-Nicolas Jolivet
I was wondering if it was possible to change the cursor color in an NSTextField? I see that NSTextView has setInsertionPointColor: However, NSTextField doesn't and even if I access the editor (using the "currentEditor" method) NSText also has no setInsertionPointColor method... Jean-N

How to handle clicks on NSOutlineView

2009-02-13 Thread Jacob Rhoden
Hi guys, I am trying to do an action when an item in an NSOutlineView is clicked. How do I work out which item was actually clicked on? Ive tried all sorts of things and nothing seems to work. (Google or Cocoa programmng for mac os x 3rd edition are not that helpful on this!) -(void)awakeFr

Re: Writing kCFPreferencesAnyUser preferences by limited user

2009-02-13 Thread Jerry Krinock
On 2009 Feb 13, at 16:54, Nick Zitzmann wrote: On Feb 13, 2009, at 4:54 PM, Alexander Shmelev wrote: I have found that I should use Security.framework. Then I wrote code below, it shows authentication dialog for limited user, but settings still not saving for limited user. What do I do w

Re: NSRunLoop / CFRunLoop

2009-02-13 Thread Alexander Cohen
Le 13 févr. 09 à 21:54, Alexander Cohen a écrit : Hi, Not sure if this is the right place to ask since my question is about CFRunLoop, not Cocoa but CoreFoundation. If not, please direct me to the right list. I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there

Re: How to handle clicks on NSOutlineView

2009-02-13 Thread Nick Zitzmann
On Feb 13, 2009, at 6:22 PM, Jacob Rhoden wrote: I am trying to do an action when an item in an NSOutlineView is clicked. How do I work out which item was actually clicked on? Did you try -clickedRow? Nick Zitzmann ___

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Ken Thomases
On Feb 13, 2009, at 6:25 PM, Chunk 1978 wrote: when running my apple script i get this error: -=-=-=- System Events got an error: Access for assistive devices is disabled. -=-=-=- so if i goto system prefs and check "Enable access for assistive devices", then running the script i get this erro

Re: Cursor color in NSTextField?

2009-02-13 Thread Jean-Nicolas Jolivet
Hmmm to avoid any confusion, what I want to change is the *caret* color (the insertion point...) not the mouse cursor! I realized later how it might have sound confusing... On 13-Feb-09, at 8:16 PM, Jean-Nicolas Jolivet wrote: I was wondering if it was possible to change the cursor colo

Line spacing in NSTextView

2009-02-13 Thread Slava Pestov
Hi all, Can someone enlighten me, how does NSTextView compute line spacing? When I display a piece of text in stickies, with Helvetica 12 (or any other font, really), and the same piece of text in my application, stickies adds another 2 pixels of spacing between every line, and the result looks m

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Chunk 1978
thanks a million ken!... this helps me on so many levels :) On Fri, Feb 13, 2009 at 9:02 PM, Ken Thomases wrote: > On Feb 13, 2009, at 6:25 PM, Chunk 1978 wrote: > >> when running my apple script i get this error: >> >> -=-=-=- >> System Events got an error: Access for assistive devices is disabl

iTableView and subclassing NSTableView

2009-02-13 Thread Stephen Zyszkiewicz
I am trying to use Matt Gemmell's iTableView (Source List and Colored Checkboxes): http://mattgemmell.com/source It includes a SourceListTableView subclass of NSTableView. The problem is that the checkboxes within the table are not being unchecked/checked. Do I need to implement a keydown

Re: Images In Dock Menu?

2009-02-13 Thread Peter Ammon
On Feb 13, 2009, at 3:27 PM, Chunk 1978 wrote: i have a NSMenu that i use as both a right-click menu and the dock menu. The images i use for some of the menu items will appear in the right-click menu, but they do not show up in the dock menu. i've connected the the File's Owner dockMenu to th

Re: How to handle clicks on NSOutlineView

2009-02-13 Thread Graham Cox
On 14 Feb 2009, at 12:22 pm, Jacob Rhoden wrote: I am trying to do an action when an item in an NSOutlineView is clicked. How do I work out which item was actually clicked on? Ive tried all sorts of things and nothing seems to work. (Google or Cocoa programmng for mac os x 3rd edition are

Re: Line spacing in NSTextView

2009-02-13 Thread Graham Cox
On 14 Feb 2009, at 1:15 pm, Slava Pestov wrote: Hi all, Can someone enlighten me, how does NSTextView compute line spacing? When I display a piece of text in stickies, with Helvetica 12 (or any other font, really), and the same piece of text in my application, stickies adds another 2 pixels o

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread I. Savant
On Feb 13, 2009, at 5:34 PM, Ken Thomases wrote: Contrary to I. Savant, I don't think going through NSUserDefaults or CFPreferences will work. It still won't inform the necessary processes of the change in an active manner. You're likely right - the process in question would have to be

Can anyone suggest a way to do this?

2009-02-13 Thread Graham Cox
This may be more appropriate for the Quartz mailing list, which I'm not on, so I'll ask here first... When stroking a path, I can clip to the inside or the outside of the path to get a stroke inside or outside of the path's edge. But if the path is open-ended, this doesn't work. Instead wha

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Ken Thomases
On Feb 13, 2009, at 9:36 PM, I. Savant wrote: On Feb 13, 2009, at 5:34 PM, Ken Thomases wrote: Contrary to I. Savant, I don't think going through NSUserDefaults or CFPreferences will work. It still won't inform the necessary processes of the change in an active manner. You're likely ri

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread I. Savant
On Feb 13, 2009, at 10:53 PM, Ken Thomases wrote: I don't even think there's a supported way for it to listen for changes. NSUserDefaultsDidChangeNotification? -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: NSRunLoop / CFRunLoop

2009-02-13 Thread Adam R. Maxwell
On Feb 13, 2009, at 12:54 PM, Alexander Cohen wrote: I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there is a simple call for it but i'm stuck with tiger for now. And while i'm at it, i'd like to do something like [obj performSelectorOnMainThread...] in CoreFoundati

Re: Programatically Uncheck "Change Picture" In Desktop Settings?

2009-02-13 Thread Ken Thomases
On Feb 13, 2009, at 10:04 PM, I. Savant wrote: On Feb 13, 2009, at 10:53 PM, Ken Thomases wrote: I don't even think there's a supported way for it to listen for changes. NSUserDefaultsDidChangeNotification? I believe that's only for internally-generated changes. There are a couple of m

Re: How to handle clicks on NSOutlineView

2009-02-13 Thread Jacob Rhoden
On 14/2/09 3:39 PM, Graham Cox wrote: On 14 Feb 2009, at 12:22 pm, Jacob Rhoden wrote: I am trying to do an action when an item in an NSOutlineView is clicked. How do I work out which item was actually clicked on? Ive tried all sorts of things and nothing seems to work. (Google or Cocoa progr

Re: Images In Dock Menu?

2009-02-13 Thread Gregory Weston
Chunk 1978 wrote: i have a NSMenu that i use as both a right-click menu and the dock menu. The images i use for some of the menu items will appear in the right-click menu, but they do not show up in the dock menu. i've connected the the File's Owner dockMenu to the NSMenu in IB so to add the m

Re: iTableView and subclassing NSTableView

2009-02-13 Thread Jerry Krinock
On 2009 Feb 13, at 18:31, Stephen Zyszkiewicz wrote: The problem is that the checkboxes within the table are not being unchecked/checked. Yes, that was rather surprising. I pounded on my mouse a few times. Do I need to implement a keydown event in SourceListTableView? If so, how do I do

Where to declare/initialise an NSOperationQueue

2009-02-13 Thread Jacob Rhoden
Hi Guys, I have been starting to use NSOperationQueue. I have ended up with one put in each controller (ie see below), but now I have one in too many controllers. How does it work? Should I just have one global variable for the operation queue, or do multiple NSOperationQueue's "share" the sa