Re: Weird NSTableView with checkboxes issue

2009-03-18 Thread Peter Zegelin
Yes not sure what caused it. I have just copied a table and its datasource from another part of my project, which also has a checkbox and it also works fine in my sheet. I'm now gradually changing the datasource to what I want for this table. So far so good. So problem solved - but I'm no

Weird NSTableView with checkboxes issue

2009-03-18 Thread Peter Zegelin
I have an NSTableView in a sheet window. It has one column and a valid dataSource and delegate. There are 128 rows. If I populate the view with Textcells, sliders or popup button cells the tableview scrolls normally, but if I populate the listbox with checkbox cells the scrolling becomes e

Re: Custom modal panel, like NSSavePanel/NSOpenPanel

2009-03-18 Thread Michael Ash
On Wed, Mar 18, 2009 at 4:26 PM, Brad Peterson wrote: > > Hi all, > > I would like to implement a password prompt panel class similar to > NSSavePanel/NSOpenPanel, which can be shown without having to implement > didEndSelectors and delegates each time. > > That is, I want a class that displays

Re: Array of Preferences

2009-03-18 Thread Frank D. Engel, Jr.
I pulled that down and compared to what I was doing; the only relevant difference was the "Handles Content as a Compound Value" checkbox. Enabling that solved the problem. I'm glad I asked here rather than spending hours reworking the whole thing in code trying to work around this! Thank

Re: Array of Preferences

2009-03-18 Thread Frank D. Engel, Jr.
I'll take a look at that, thank you! On Mar 18, 2009, at 8:52 PM, Steven Riggs wrote: Hey Frank, I have a sample project that stores dictionary objects in user defaults with no code. Check it out: http://idisk.mac.com/steven.riggs-Public?view=web DictionaryInDefaults.zip I hope it helps.

Re: NSLog fixes output, but why?

2009-03-18 Thread James Maxwell
Thanks everybody for your comments! I'll go through them all in detail tonight. I'm still a bit unsure of myself when dealing with raw C in my Obj-C code (came by way of Java, not C), so this is all a bit of a learning curve... I did actually throw the execution of this particular chunk of

Re: Array of Preferences

2009-03-18 Thread Steven Riggs
Hey Frank, I have a sample project that stores dictionary objects in user defaults with no code. Check it out: http://idisk.mac.com/steven.riggs-Public?view=web DictionaryInDefaults.zip I hope it helps. Steven Riggs http://www.stevenriggs.com On Mar 18, 2009, at 8:14 PM, Frank D. Engel, J

Array of Preferences

2009-03-18 Thread Frank D. Engel, Jr.
I have an interesting puzzle on my hands, hoping someone here can help. I want to store an array of dictionaries as preferences. Each dictionary will have two keys; one is a string which will appear in an NSTableView for identification purposes. My initial approach here was to create an NSA

Re: NSTableView behavior changes

2009-03-18 Thread Raleigh Ledet
No Edit menu? That explains why you get the beep, nothing processed the key equivalent. Add a select all menu in your menu bar somewhere and assign it's action to First Responder's selectAll: method. Ideally, do this in an Edit menu because that's where people expect to find it. (You don't

Re: NSTableView behavior changes

2009-03-18 Thread Harry Plate
Raleigh, Ahhh. Certainly I was suspecting that the some other class wanted to deal with the key equivelant. > That's because Cmd-A is a key equivalent. The "Select All" Edit menu item gets > triggered for you. I don't understand what you mean by "uneditable" table > view. Editable and selectable

Re: NSTableView behavior changes

2009-03-18 Thread Raleigh Ledet
Harry, On Mar 18, 2009, at 11:18 AM, Harry Plate wrote: After more googling last night, I found similar suggestions; in fact I ended up subclassing the NSTableView, and overriding keyDown: This worked very nicely. One problem that still troubles me is I cannot seem to trap A - I was h

How does OS X launch login items hidden?

2009-03-18 Thread Rick Mann
I'm using bool success = [[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier: @"com.apple.itunes" options: NSWorkspaceLaunchAndHide additionalEventParamDescriptor: nil launchIdentifier: nil]; But NSWorkspaceLaunchAndHide does exactly that: it lets the app laun

Re: NSLog fixes output, but why?

2009-03-18 Thread Greg Parker
On Mar 18, 2009, at 3:05 PM, James Maxwell wrote: I've got a really frustrating, and really silly problem. I have some fairly complex machine learning code I'm working on. I've noticed inconsistent output from a particular method. I'm doing some fairly nasty array and matrix stuff, which i

Re: NSLog fixes output, but why?

2009-03-18 Thread Peter Ammon
On Mar 18, 2009, at 3:05 PM, James Maxwell wrote: I've got a really frustrating, and really silly problem. I have some fairly complex machine learning code I'm working on. I've noticed inconsistent output from a particular method. I'm doing some fairly nasty array and matrix stuff, which i

Re: NSLog fixes output, but why?

2009-03-18 Thread Chris Idou
Should we assume you have eliminated the obvious, that the arguments to NSLog don't have any method calls with side effects? Or are there multiple threads whose timing could be changed by the logging? From: James Maxwell To: Cocoa Dev Sent: Thursday, 19 Mar

Re: NSLog fixes output, but why?

2009-03-18 Thread A.M.
On Mar 18, 2009, at 6:05 PM, James Maxwell wrote: I've got a really frustrating, and really silly problem. I have some fairly complex machine learning code I'm working on. I've noticed inconsistent output from a particular method. I'm doing some fairly nasty array and matrix stuff, which i

NSLog fixes output, but why?

2009-03-18 Thread James Maxwell
I've got a really frustrating, and really silly problem. I have some fairly complex machine learning code I'm working on. I've noticed inconsistent output from a particular method. I'm doing some fairly nasty array and matrix stuff, which is all done in C, and I pass the arrays around wrapp

Re: Model & Table Cell Updating Issues

2009-03-18 Thread Walker Argendeli
Ok, well that works for the image. Thanks! I'm still not sure what to set the image to, though. I was binding to the table cell, but this isn't right, because it doesn't work. Also, because this is all in the model,, I need the controls to show the correct value based off what row os se

Re: [Q] Contextual Menu Items Size

2009-03-18 Thread Nate Weaver
Either set the attributed title of the items, or don't use the same menu instance for your popup and context menu. On Mar 18, 2009, at 11:38 AM, Eric Gorr wrote: I have a popup menu whose control size is small. To a couple of views, I have done the following: [myView setMenu:[myPopupMenu me

Re: Launching a specific app

2009-03-18 Thread Dave DeLong
NSWorkspace has the following method: launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier : iTunes' bundle identifier is "com.apple.itunes". Cheers, Dave On Mar 18, 2009, at 3:26 PM, Rick Mann wrote: Hi. I'm reading through the Launch Services docs, but s

Launching a specific app

2009-03-18 Thread Rick Mann
Hi. I'm reading through the Launch Services docs, but so far I have an unanswered question. We need to launch a specific app (iTunes), regardless of where the user might've placed it on disk. What's the right way to reference the app for LS APIs? TIA, -- Rick ___

Construct type array from CGImageSourceCopyTypeIdentifiers

2009-03-18 Thread Jushin
When I construct types for images, I just used CGImageSourceCopyTypeIdentifiers as follows for now: BTW is there any way to construct a types array with selected identifiers? For example, I just need PNG and JPEG identifiers. Thanks ___ Cocoa-dev mailin

Re: Limiting number of characters per line in a NSTextView

2009-03-18 Thread Martin Wierschin
I want my NSTextView to show only 32 characters per line and the 33rd character should be shown at next line of textview. My NSTextView will have fixed font. If your font is truly fixed width, you can probably just set the NSTextView frame so it exactly fits 32 characters on a line. Then set

Custom modal panel, like NSSavePanel/NSOpenPanel

2009-03-18 Thread Brad Peterson
Hi all, I would like to implement a password prompt panel class similar to NSSavePanel/NSOpenPanel, which can be shown without having to implement didEndSelectors and delegates each time. That is, I want a class that displays a password prompt, which I can show using syntax like:

Re: Termination Running Applications ...

2009-03-18 Thread has
Mic Pringle wrote: Is it possible to terminate other running applications (not my own) from within my application ? OSStatus QuitApplicationProcessWithPID(pid_t pid) { AppleEvent evt, res; AEDesc errDesc; OSStatus err; // build and send a 'quit' event err = AEBuildAppl

draw NSButtonCell or combo cell only when selected?

2009-03-18 Thread Chad Harrison
I'm looking to do something like iTunes does when you have a row selected - that is, show an NSImageCell or NSButtonCell combo with the text, but only when the row is selected (or in iTunes' case, when a track is playing). I am able to create a custom cell, but I'm not sure how to tell it

Re: Get the list of Places in Finder?

2009-03-18 Thread has
Oleg Krupnov wrote: I wonder if there is a programmatic way in Cocoa to get the list of "Places" from the left panel of Finder? (by default populated with Documents, Desktop, Home, Application, but can be customized with drag and drop). Thanks! There's no public API, unfortunately. You could

Re: NSTableView behavior changes

2009-03-18 Thread Harry Plate
Matt, >> 1) I defined my controller class: >>@interface MCController : NSResponder >> >> 2) I then defined (void)deleteBackward:(id) >> >> 3) in -awakeFromNib, I set my controller as 1st responder: >> >>[sourceTableView setNextResponder:self] > > Instead of 2, define keyDown and chec

[Q] Contextual Menu Items Size

2009-03-18 Thread Eric Gorr
I have a popup menu whose control size is small. To a couple of views, I have done the following: [myView setMenu:[myPopupMenu menu]]; Now, when I control-click on myView, I see the menu that myPopupMenu will display. The problem is that if I control-click on myView before I click on myPo

Re: [Q] "auto"-incrementing integer attribute in awakeFromInsert

2009-03-18 Thread Sean McBride
On 3/18/09 11:52 AM, Jon C. Munson II said: >What happens is the attribute is set with the correctly incremented number. >However, the tableview that is used to manage this entity displays two rows >every time a new entity is inserted. Fetching from awakeFromInsert is discouraged. There are some

[Q] "auto"-incrementing integer attribute in awakeFromInsert

2009-03-18 Thread Jon C. Munson II
Namaste! I'm having a little trouble getting a self-incrementing attribute to work in the awakeFromInsert override. After perusing the dox and Googling, I'm stumped on it. Here's my code (abbreviated): -(void)awakeFromInsert { int num  = 0; NSArray *a; NSManagedObjectCo

Re: Termination Running Applications ...

2009-03-18 Thread Sean McBride
On 3/18/09 2:41 PM, Mic Pringle said: >I'm currently working on a project where one of it's features is to >display a lift of running applications. This information is sourced >from NSWorkspace. However, I'd also like to give the user the option >to close any of these applications without having t

Re: NSTableView behavior changes

2009-03-18 Thread Matt Neuburg
On Tue, 17 Mar 2009 17:00:54 -0700, Harry Plate said: >Graham, > >Finally getting back to this problem. > >>>2) I would like my user to be able to select a table entry, and >>> be able >>> to respond to the 'delete' key - by discarding the selected entry. >>> Currently >>> that does not work a

Termination Running Applications ...

2009-03-18 Thread Mic Pringle
Hi, Is it possible to terminate other running applications (not my own) from within my application ? I'm currently working on a project where one of it's features is to display a lift of running applications. This information is sourced from NSWorkspace. However, I'd also like to give the user th

Re: Distribute font with app bundle

2009-03-18 Thread Buddy Kurz
You may wish to check out ATSApplicationFontsPath in this document Runtime Configuration Guidelines: Property List Key Reference buddy On Mar 18, 2009, at 3:04 AM, Memo Akten wrote: Hi All, I'd like to distribute a font with my app bundle, but not install it. Just load it straight from my

Get the list of Places in Finder?

2009-03-18 Thread Oleg Krupnov
I wonder if there is a programmatic way in Cocoa to get the list of "Places" from the left panel of Finder? (by default populated with Documents, Desktop, Home, Application, but can be customized with drag and drop). Thanks! ___ Cocoa-dev mailing list (C

Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!

2009-03-18 Thread Jerry Krinock
On 2009 Mar 17, at 20:14, Michael Ash wrote: What documentation are you looking at? In the NSApplication documentation both on my hard drive and on apple.com, it doesn't contain the phrasing you mention, and is considerably more clear. Are your docs out of date? Duh -- oh, I just figured out

Distribute font with app bundle

2009-03-18 Thread Memo Akten
Hi All, I'd like to distribute a font with my app bundle, but not install it. Just load it straight from my bundle for NSTextField and CATextLayer. My googling led to only this http://www.cocoabuilder.com/archive/message/cocoa/2005/1/16/125883 but that is 4 years old, I was wondering if there

Re: Growl vs. CFUserNotification

2009-03-18 Thread Jean-Daniel Dupas
Le 18 mars 09 à 05:45, Jerry Krinock a écrit : On 2009 Mar 15, at 09:03, Jean-Daniel Dupas wrote (in thread "GUI Calls in Tool Executable..."): Just to complete the answer, the correct way to display alert from a background process is to use the CFUserNotification API. Thanks, I wasn't

Limiting number of characters per line in a NSTextView

2009-03-18 Thread Ankur Singhal
Hi, I want my NSTextView to show only 32 characters per line and the 33rd character should be shown at next line of textview. My NSTextView will have fixed font. I am so much confused which one of NSTextStorage/NSLayoutManager/NSTextContainer/NSTextView along with will solve my purpose. To