CoreData -- addPersistentStoreWithType crashing

2008-12-10 Thread Ben Lachman
Hi all: I've been making some changes to one of my apps which include a change to the data model. Now whenever I start up the app it crashes (EXEC_BAD_ACCESS) in addPersistentStoreWithType:configuration:URL:options:error:. I've factored out all the passed arguments and it's still crashi

Re: how to manage two nib files

2008-12-10 Thread Ken Thomases
On Dec 8, 2008, at 8:40 AM, XiaoGang Li wrote: Thanks. I have read these references, but I still have no idea about my issue, Maybe I did not understand them completely now, but I am worried that maybe I have not give a clear expression in my first email. Maybe I need give a more detailed

Re: Weird behavior of mouse location when performing a drag

2008-12-10 Thread chaitanya pandit
Try this, NSPoint apoint = [self convertPoint:[sender draggedImageLocation] fromView:nil]; HTH, Chaitanya On 08-Dec-08, at 11:26 PM, Gustavo Pizano wrote: Hello all. Well Im performing a drag-ndrop between views of the same app, I implemented the - (NSDragOperation)draggingUpdated:(id <

Re: NSTask and environment variables

2008-12-10 Thread Ken Thomases
On Dec 9, 2008, at 4:51 AM, Ingvar Nedrebo wrote: On Dec 9, 2008, at 00:43, Chris Idou wrote: I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and

Return Control To Next Active App Without Hiding?

2008-12-10 Thread Chunk 1978
the closest thing i've come to being able to bring front the most recent app is using this: [NSApp hide:self]; [NSApp unhideWithoutActivation]; but that flashes my app, and kinda looks like a glitch... is there any standard method i can use to make this happen instead? ___

Re: How to launch window of the application on clicking of dock icon?

2008-12-10 Thread Ken Thomases
On Dec 9, 2008, at 11:49 PM, Arun wrote: Thanks for the reply. My app is not a document based. I tried using the applicationDidBecomeActive to bring up my main window. It works only when my application is not active. i.e., when the MenuBar is occupied by other application. If i launch my a

Re: How to detect a paste request for file copy/paste?

2008-12-10 Thread Conor
You still need to give the pasteboard an array of the file type for NSFilesPromisePboardType. Your missing the line: [pboard setPropertyList:[NSArray arrayWithObjects:@"txt", nil] forType:NSFilesPromisePboardType]; But I would recommend initiating the promised drag with the NSView's metho

Re: The thread that starts by NSTask didn't clear up

2008-12-10 Thread Etienne Guérard
Hi, On Dec 10, 2008, at 2:26 AM, Xianyu_Ge wrote: thanks for your reply. I means in my project, I want to use NSTask to launch an application, and send application some parameters, when use NSTask launch application that will add a new thread, right? As far as I understand, you use NSTask

Re: Problems with multiple selection and NSArrayController

2008-12-10 Thread Volker in Lists
Hi, does the detail arraycontroller show all categories and selects the ones contained in the set of your selected master rows? Can't you just display only the detail categories that are within the set of the selected master? This would be easy to do even with multiple master objects sele

Problem drawing outside of drawRect: in a custom table cell

2008-12-10 Thread Graham Cox
I need to draw outside of the usual drawRect: method (no really, I do!) The reason is that I have a custom cell that is used in a table/ outline view that draws a colour swatch. When clicked it pops up a menu of colours so the user can choose another colour. While tracking the menu, the cell

Wake up Reason

2008-12-10 Thread sheen mac
Hi All, Is it possible to know the reason the MacBook wake from sleep?. Its from wake on lan or ac power change or lid wake ? . Where i will get more info about this?. Thanks in Advance, Sheen ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: How Can I Notify DrawRect Method?

2008-12-10 Thread I. Savant
On Dec 9, 2008, at 8:44 PM, Graham Cox wrote: I realise this is an implementation detail, but there's nothing in the docs that implies that the defaults values are unarchived from disk every time; why would they be? Never implied that. :-) The unarchiving I referred to is non- NSCoding-c

Re: How Can I Notify DrawRect Method?

2008-12-10 Thread I. Savant
On Dec 9, 2008, at 10:37 PM, Sean McBride wrote: Well, such things are never black and white, of course... but I just wanted to add that caching the value increases your application's memory use (admittedly only slightly in the case being discussed). But in the general case, by increasing

Re: The thread that starts by NSTask didn't clear up

2008-12-10 Thread Etienne Guérard
OK It seems that in leopard NSTask uses a thread to monitor the launched process, presumably to detect process termination. This thread should disappear shortly after the corresponding NSTask instance is released. Since the launched NSTask is auto-released you need to do one of the followi

Re: How Can I Notify DrawRect Method?

2008-12-10 Thread I. Savant
On Dec 9, 2008, at 10:32 PM, Michael Ash wrote: This is a common response whenever I talk about not optimizing where it's not useful. But the thing is, trying to optimize every little thing makes your app *slower*. ... Of course you'll have gone through only a miniscule fraction of the bolts

RE: Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-10 Thread Karan, Cem (Civ, ARL/CISD)
> > To lay the groundwork for this question, I'm going to state that I'm > > getting my definitions for MVC, MVP, and Passive View from the > > following: > > > > http://en.wikipedia.org/wiki/Model-view-controller > > http://en.wikipedia.org/wiki/Model_View_Presenter > > http://www.martinfowler.co

Re: CoreData -- addPersistentStoreWithType crashing

2008-12-10 Thread John Pannell
Hi Ben- If you are using a custom class to represent an entity in your model, you must make sure that it is a subclass of NSManagedObject in your code (and not NSObject). This might not be your issue, but I have had this bite me before - it issues the same error with no exception thrown,

Problems with multiple selection and NSArrayController

2008-12-10 Thread David Niemeijer
Hi, I have a master table that displays that gets it's contents NSArrayController with items. Each of those items has a categories key which contain an NSMutableIndexSet. When the user selects a row in the master table my app displays in a detailed view a detail table with categories. The

Searchable persistent file reference

2008-12-10 Thread Ben
Hi list, I am trying to store a reference to a file in a database, such that if the file moves, I can still search for it in my database. I have read up on the Carbon Alias Manager and the third party BSAlias/ NDAlias classes but none of these quite seem to fit the bill as it looks like I am

Re: Problems with multiple selection and NSArrayController

2008-12-10 Thread David Niemeijer
Volker, On Dec 10, 2008, at 11:42 AM, Volker in Lists wrote: does the detail arraycontroller show all categories and selects the ones contained in the set of your selected master rows? yes. Can't you just display only the detail categories that are within the set of the selected master? Th

Static and Dynamic libraries for iPhone apps ?

2008-12-10 Thread Ruslan Zasukhin
Hi All, 1) Can we build e.g. XCODE menu File => Project New => Static Library Cocoa And later use it for iPhone application to be linked with it? 2) the same question for DYLIB Cocoa, and then to be used with iPhone app e.g. If we put it inside of app bundle Just sometimes it is

Re: Searchable persistent file reference

2008-12-10 Thread Mike Abdullah
FSRef is the data type for referencing a particular file by record, however it's not the pleasant to work with. Have you considered using NDAlias etc. but setting them to resolve references by file ref, then path. (By default, the alias manager looks up aliases by path first, then file ref)

Re: Problem drawing outside of drawRect: in a custom table cell

2008-12-10 Thread Erik Buck
You don't have to draw outside of -drawRect:. Instead of invalidating the table, just call -setNeedsDisplayInRect: or -displayInRect: and pass only the rect of the row that needs to be redrawn. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: Searchable persistent file reference

2008-12-10 Thread matt . gough
On 10 Dec 2008, at 14:59, Ben wrote: I am trying to store a reference to a file in a database, such that if the file moves, I can still search for it in my database. I have read up on the Carbon Alias Manager and the third party BSAlias/NDAlias classes but none of these quite seem to fit the

Re: Problem drawing outside of drawRect: in a custom table cell

2008-12-10 Thread Graham Cox
On 11 Dec 2008, at 1:23 am, Erik Buck wrote: You don't have to draw outside of -drawRect:. Instead of invalidating the table, just call -setNeedsDisplayInRect: or - displayInRect: and pass only the rect of the row that needs to be redrawn. Thanks - I'm well aware of how that works. The

Very odd issue when try to implement the drag and drop functions for NSOutlineview

2008-12-10 Thread Alex . Wang
Hi, everyone. Currently I am working on a project which uses the NSOutlineview heavily. I thought the drag and drop functions are very important, so I am trying to implement that. However, after refer to some tutorials, I still can't make it work... My steps are : 1. create a controller to manage t

how to pass arguments by reference

2008-12-10 Thread Nick Rogers
Hi, I have the following in my .m file: - (UInt32)traverseTreeStraightReturnedDirection:(int&)treeDirection returnedTreeDepth:(int&)treeDepth returnedKey:(HPlusCatalogKey&)catKey lookForKey:(HPlusCatalogKe

Re: Very odd issue when try to implement the drag and drop functions for NSOutlineview

2008-12-10 Thread chaitanya pandit
Hi, This was a reply that i posted recently for a similar question, i think you are missing step 2 To re-order the items in the tableView, you will have to implement a custom drag type. Say for example you name your custom drag type as @"myDragType" then 1] Register your table view to accep

Re: how to pass arguments by reference

2008-12-10 Thread Dave DeLong
Put the & before the variable type: - (UInt32) traverseTreeStraightReturnedDirection:(&int)treeDirection... HTH, Dave On Dec 10, 2008, at 8:43 AM, Nick Rogers wrote: Hi, I have the following in my .m file: - (UInt32)traverseTreeStraightReturnedDirection:(int&)treeDirection

Re: how to pass arguments by reference

2008-12-10 Thread Nick Rogers
Hi, thanks for the reply. Now I have: - (UInt32)traverseTreeStraightReturnedDirection:(&int)treeDirection returnedTreeDepth:(&int)treeDepth returnedKey:(&HPlusCatalogKey)catKey lookForKey:(HPlusCatalogKey)l

Re: how to pass arguments by reference

2008-12-10 Thread Ken Thomases
On Dec 10, 2008, at 9:45 AM, Dave DeLong wrote: Put the & before the variable type: - (UInt32) traverseTreeStraightReturnedDirection: (&int)treeDirection... I haven't tried that, but it doesn't look right. It doesn't correspond to any C or C++ syntax I've ever seen. On Dec 10, 2008, a

Re: how to pass arguments by reference

2008-12-10 Thread Dave DeLong
Spoke too soon... whoops. Put an asterisk before the type, indicating that the type is going to come in as a pointer to the data and not the actual data. Then when you call the method, you use the ampersand to pass a pointer to your data, like so: (in some class definition somewhere. A

Re: Custom NSTableView cells

2008-12-10 Thread René v Amerongen
On 10 dec 2008, at 02:40, Graham Cox wrote: I could use a little guidance, please, on customizing cells for display in an NSTableView. My table has but one column, but each cell in that column is made up of 2 or more views. I think I have what I need as far as the cells go, but it's fee

IB Scroll View position problem

2008-12-10 Thread Randy Bradley
I have two scroll views in my application, each with a table view, in addition to a bunch of other items. Everything is locked to the upper left corner of the window view. When the window is resized, I would like the scroll views to expand and shrink along with the window. The smaller scrol

Re: how to pass arguments by reference

2008-12-10 Thread Dave DeLong
This is what I get for typing in an email window and not a code editor... - (void) foo:(int*)bar { (*bar)++; } Dave On Dec 10, 2008, at 8:54 AM, Dave DeLong wrote: - (void) foo:(*int)bar { (*bar)++; } ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: how to pass arguments by reference

2008-12-10 Thread jmunson
is this: (*int) the same as: (int *) ? I've always seen (int *) as the declaration... Quoting Dave DeLong <[EMAIL PROTECTED]>: Spoke too soon... whoops. Put an asterisk before the type, indicating that the type is going to come in as a pointer to the data and not the actual data. Then wh

Re: how to pass arguments by reference

2008-12-10 Thread James Montgomerie
What you're looking to do is a C++ism, it's not available in Objective- C; there's no explicit support for pass by reference. It's certainly possible to achieve the same ends though. For primitive types, you'll have to pass a pointer. Declare the method as taking, for example 'int *' if yo

Re: Return Control To Next Active App Without Hiding?

2008-12-10 Thread Benjamin Dobson
I haven't tested this, but could you use [NSApp deactivate];? On 10 Dec 2008, at 09:22:18, Chunk 1978 wrote: the closest thing i've come to being able to bring front the most recent app is using this: [NSApp hide:self]; [NSApp unhideWithoutActivation]; but that flashes my app, and kinda look

Depressed, Etched Style For Toolbar?

2008-12-10 Thread Chunk 1978
when validating a toolbar item, how do i call this style? (see image attached) <>___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)li

NSTextField setStringValue not updating properly

2008-12-10 Thread jmunson
Namaste! I've written a simple interface for ICA as part of my application. In that interface I have an NSTextField which holds a default path & filename. Next to that field I have an NSButton for changing that information. It opens an NSSavePanel. I also have a Preview button that grabs t

RE: how to pass arguments by reference

2008-12-10 Thread Stefan Sinclair
While I'm not sure if the GCC objective-C compiler accepts C++ references (I've never tried), one quick & easy thing to double check is that your source file is a ".mm" file as opposed to a ".m" file, so that the C++ compiler will be used as opposed to the C compiler. -Stefan> From: [EMAIL PR

Re: Wake up Reason

2008-12-10 Thread Derek Chesterfield
From my system.log: Dec 1 08:20:49 kernel[0]: USB caused wake event (EHCI) I assume different wake events are also logged. On 10 Dec 2008, at 11:11, sheen mac wrote: Is it possible to know the reason the MacBook wake from sleep? ___ Cocoa-dev ma

Re: Depressed, Etched Style For Toolbar?

2008-12-10 Thread Mike Abdullah
Look at the various NSToolbar methods with "select" in their name. Search around with those for examples. On 10 Dec 2008, at 16:21, Chunk 1978 wrote: when validating a toolbar item, how do i call this style? (see image attached) ___ Cocoa-dev mai

Re: Problem drawing outside of drawRect: in a custom table cell

2008-12-10 Thread Corbin Dunn
On Dec 10, 2008, at 2:44 AM, Graham Cox wrote: I need to draw outside of the usual drawRect: method (no really, I do!) The reason is that I have a custom cell that is used in a table/ outline view that draws a colour swatch. When clicked it pops up a menu of colours so the user can choose

Date Formatter year input without year display

2008-12-10 Thread Paul Bruneau
Hi- I ran into a problem with my production scheduling application as the new year approached. In IB I am using a 10.0 date formatter bound to NSDate properties of a model object. I used: %1m/%1d, %1I:%M%p which gave me something like: 12/23, 12:30PM This was used mostly for display, bu

NSView subviews mutability - follow up to NSDictionary mutability test thread

2008-12-10 Thread jonat...@mugginsoft.com
A follow up of sorts to Cocoabuilder - ([EMAIL PROTECTED]) NSDictionary mutability test from Cocoabuilder - (Bill Bumgarner) Re: NSDictionary mutability test Performance An NSMutableDictionary instance can be returned from a method declared as returning (NSDictionary*) without risk that the

NSOutlineView problem with Text cells.

2008-12-10 Thread Arun
Hi I have an App in which i use NSOutlineView in the left hand side for Navigational controls. The Root and child's have text cells. I am have changed the font size for the texts in the text cells. After this the text in the cells are not aligned. The leave a lot of space in the bottom and looks a

Re: How Can I Notify DrawRect Method?

2008-12-10 Thread Michael Ash
On Wed, Dec 10, 2008 at 7:05 AM, I. Savant <[EMAIL PROTECTED]> wrote: > On Dec 9, 2008, at 10:32 PM, Michael Ash wrote: > >> This is a common response whenever I talk about not optimizing where >> it's not useful. But the thing is, trying to optimize every little >> thing makes your app *slower*. >

Re: NSOutlineView problem with Text cells.

2008-12-10 Thread Corbin Dunn
On Dec 10, 2008, at 9:09 AM, Arun wrote: Hi I have an App in which i use NSOutlineView in the left hand side for Navigational controls. The Root and child's have text cells. I am have changed the font size for the texts in the text cells. After this the text in the cells are not aligned. Th

Re: How Can I Notify DrawRect Method?

2008-12-10 Thread jmunson
You both have valid points. However, I think you are missing something. That something being the overall "goal" of the application as predicated by that never-ever-returns: Time. That goal can be multi-faceted. For example, one item in the overall list is "target platform." By decidi

Detecting the Enter Key

2008-12-10 Thread Eric Gorr
One way to check to see if the enter key has been pressed is to: [theEvent keyCode] == 0x04C where 0x04C is the keyCode corresponding to the enter key. (Is there an Apple defined constant for this key code?) Another way, found at: http://developer.apple.com/samplecode/TrackBall/listing9.html

Re: Detecting the Enter Key

2008-12-10 Thread Ken Thomases
On Dec 10, 2008, at 11:43 AM, Eric Gorr wrote: One way to check to see if the enter key has been pressed is to: [theEvent keyCode] == 0x04C where 0x04C is the keyCode corresponding to the enter key. (Is there an Apple defined constant for this key code?) kVK_ANSI_KeypadEnter but it's only d

Re: Detecting the Enter Key

2008-12-10 Thread Benjamin Dobson
I would go for the second one. I would guess that the second one would pick up all the various Enter keys, whereas the first would only pick up a single key. The second also looks much more elegant to me. I do not have any experience with this; I am merely saying what looks best from my poi

Re: Searchable persistent file reference

2008-12-10 Thread Gary L. Wade
An alias stores quite a bit of information in it to allow you to find a file object (files, folder, disks) if it moves or is renamed or if any of the elements of its path is renamed, and can usually work with varied file systems. I am not familiar with BSAlias or NDAlias, but if they provide a goo

Re: Multithreading and Mach ports

2008-12-10 Thread John Love
Reference: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/chapter_6_section_5.html#/ /apple_ref/doc/uid/1057i-CH16-SW7 While I'm trying to piece your replies together, I have a quick question .. reference Listing 5-15 and, in particular, the

Distributing apps

2008-12-10 Thread Richard S. French
I have found a lot of Cocoa books and tutorials about writing applications. I haven¹t found any instructions as to how to put that application into an icon that can be run when clicked on your desktop or downloaded by others. Please let me know if I¹ve missed it. Thanks, Richard. __

Re: Distributing apps

2008-12-10 Thread Benjamin Dobson
On 10 Dec 2008, at 18:15:51, Richard S. French wrote: I have found a lot of Cocoa books and tutorials about writing applications. I haven’t found any instructions as to how to put that application into an icon that can be run when clicked on your desktop or downloaded by others. Please le

Re: Distributing apps

2008-12-10 Thread Volker in Lists
Hi, when you build your app in Xcode with the Release target setting, you will get your app with the standard app icon in the build folder. This folder usually resides within your project directory. Via the targets Get Info panel you can set app icon - which you have to supply yourself, t

Re: how to pass arguments by reference

2008-12-10 Thread Clark S. Cox III
C, and by extension Objective-C, do not have references in the C++ sense. You'll have to pass a pointer to the thing that you want your method to be able to modify. Sent from my iPhone On Dec 10, 2008, at 7:43, Nick Rogers <[EMAIL PROTECTED]> wrote: Hi, I have the following in my .m file:

Re: Detecting the Enter Key

2008-12-10 Thread Michael Ash
On Wed, Dec 10, 2008 at 12:43 PM, Eric Gorr <[EMAIL PROTECTED]> wrote: > One way to check to see if the enter key has been pressed is to: > > [theEvent keyCode] == 0x04C > > where 0x04C is the keyCode corresponding to the enter key. > (Is there an Apple defined constant for this key code?) > > > >

Re: Detecting the Enter Key

2008-12-10 Thread Eric Gorr
On Dec 10, 2008, at 2:28 PM, Michael Ash wrote: On Wed, Dec 10, 2008 at 12:43 PM, Eric Gorr <[EMAIL PROTECTED]> wrote: One way to check to see if the enter key has been pressed is to: [theEvent keyCode] == 0x04C where 0x04C is the keyCode corresponding to the enter key. (Is there an Apple d

Table view containing cells with both an image and text

2008-12-10 Thread Eric Gorr
I need a column in my NSTableView with cells that contain both an image and some text. My first inclination is to subclass NSCell and have my subclass manage both a NSImageCell and a NSTextFieldCell. Basically, I would imagine would override: - (void)drawWithFrame:(NSRect)cellFrame inView

Re: Detecting the Enter Key

2008-12-10 Thread jmunson
I'm certain he means: Physical key: actual key on keyboard that was pressed (may be independent of the letter/word/symbol on the key face) Logical key: this would map to the letter/word/symbol on the key face, regardless of physical placement on the board HTH, Peace, Love, and Light,

Re: Detecting the Enter Key

2008-12-10 Thread Alex Heinz
On Dec 10, 2008, at 2:39 PM, Eric Gorr wrote: On Dec 10, 2008, at 2:28 PM, Michael Ash wrote: On Wed, Dec 10, 2008 at 12:43 PM, Eric Gorr <[EMAIL PROTECTED]> wrote: One way to check to see if the enter key has been pressed is to: [theEvent keyCode] == 0x04C where 0x04C is the keyCode cor

Re: Table view containing cells with both an image and text

2008-12-10 Thread Corbin Dunn
On Dec 10, 2008, at 11:54 AM, Eric Gorr wrote: I need a column in my NSTableView with cells that contain both an image and some text. My first inclination is to subclass NSCell and have my subclass manage both a NSImageCell and a NSTextFieldCell. Basically, I would imagine would override

Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread aaron smith
Hey All, this could be a newbie question, or a somewhat mid-level question. Basically, I don't understand how I can create "views" that aren't associated with an NSWindow, or NSPanel. Here's a breakdown of what I'm trying to accomplish.. -I have a MainMenu nib. -in that it has the usual 1 window.

Re: Date Formatter year input without year display

2008-12-10 Thread Ashley Clark
On Dec 10, 2008, at 10:48 AM, Paul Bruneau wrote: Hi- I ran into a problem with my production scheduling application as the new year approached. In IB I am using a 10.0 date formatter bound to NSDate properties of a model object. I used: %1m/%1d, %1I:%M%p which gave me something like:

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread Nick Zitzmann
On Dec 10, 2008, at 1:50 PM, aaron smith wrote: How do I go about create views separately, and attaching them to the NSWindow, based on the toolbar buttons. Create them programmatically using -initWithFrame:, do any setup work you have to do, then add them as either the content view of a w

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread Ken Thomases
On Dec 10, 2008, at 2:50 PM, aaron smith wrote: Hey All, this could be a newbie question, or a somewhat mid-level question. Basically, I don't understand how I can create "views" that aren't associated with an NSWindow, or NSPanel. Here's a breakdown of what I'm trying to accomplish.. -I have a

Re: Table view containing cells with both an image and text

2008-12-10 Thread Eric Gorr
On Dec 10, 2008, at 3:41 PM, Corbin Dunn wrote: On Dec 10, 2008, at 11:54 AM, Eric Gorr wrote: I need a column in my NSTableView with cells that contain both an image and some text. My first inclination is to subclass NSCell and have my subclass manage both a NSImageCell and a NSTextFie

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread Brandon Walkin
Hi, I've released a free plugin for Interface Builder 3 that contains an easy to use tabbed toolbar that should suit your needs. You can grab it here: http://www.brandonwalkin.com/blog/2008/11/13/introducing-bwtoolkit/ Cheers, Brandon On 10-Dec-08, at 3:50 PM, aaron smith wrote: Hey All,

Re: Table view containing cells with both an image and text

2008-12-10 Thread Randall Meadows
On Dec 10, 2008, at 1:41 PM, Corbin Dunn wrote: On Dec 10, 2008, at 11:54 AM, Eric Gorr wrote: I need a column in my NSTableView with cells that contain both an image and some text. My first inclination is to subclass NSCell and have my subclass manage both a NSImageCell and a NSTextField

Re: Table view containing cells with both an image and text

2008-12-10 Thread Corbin Dunn
Yeah, you are right, that is the case. However, I'd recommend subclassing NSTextFieldCell and having it draw an image. It'll make other stuff work for you automatically (cell expansion tooltips, type selection). See: Interesting. So,

Re: Table view containing cells with both an image and text

2008-12-10 Thread Corbin Dunn
On Dec 10, 2008, at 1:14 PM, Randall Meadows wrote: On Dec 10, 2008, at 1:41 PM, Corbin Dunn wrote: On Dec 10, 2008, at 11:54 AM, Eric Gorr wrote: I need a column in my NSTableView with cells that contain both an image and some text. My first inclination is to subclass NSCell and have my

Setting A Background Image On A Window

2008-12-10 Thread Neil
I've googled around and poked at the documentation in Xcode, but I can't seem to find any references to this. I'm trying to do something like setBackgroundColor, but instead of picking a color, I want to pick an image. The end goal is to program an emulator for a small medical device like

Starting Cocoa apps from the command line

2008-12-10 Thread Shayne Wissler
Hello, I have a Cocoa application that I am compiling in the traditional UNIX manner using Makefiles and I want to be able to invoke it with command-line arguments and without creating/installing it like traditional OSX apps, as in "x.app/Contents/MacOS/x". When I tried the usual thing that works

Re: CoreData -- addPersistentStoreWithType crashing

2008-12-10 Thread Melissa J. Turner
Hi Ben - What's the backtrace you get when you crash your application in the debugger? +Melissa On Dec 10, 2008, at 02:58, Ben Lachman wrote: Hi all: I've been making some changes to one of my apps which include a change to the data model. Now whenever I start up the app it crashes (

Re: Setting A Background Image On A Window

2008-12-10 Thread Brandon Walkin
Try making an NSColor from your image using +colorWithPatternImage:, and set that color object on the window using -setBackgroundColor:. On 10-Dec-08, at 4:47 PM, Neil wrote: I've googled around and poked at the documentation in Xcode, but I can't seem to find any references to this. I'm tr

Re: Starting Cocoa apps from the command line

2008-12-10 Thread Mani Ghasemlou
Unless I misunderstood your situation, I believe using the "open" command should work. Example: open x.app Cheers, Mani On Wed, Dec 10, 2008 at 4:47 PM, Shayne Wissler <[EMAIL PROTECTED]> wrote: > Hello, > > I have a Cocoa application that I am compiling in the traditional UNIX > mann

Re: Starting Cocoa apps from the command line

2008-12-10 Thread Steven W Riggins
If you are building a cocoa application, make it a normal cocoa application and use the open command to launch it. On Dec 10, 2008, at 1:47 PM, Shayne Wissler wrote: Is there a way to do this without making some kind of wrapper caller that generates the directory and a script or some such? Or

Re: Table view containing cells with both an image and text

2008-12-10 Thread Randall Meadows
On Dec 10, 2008, at 2:41 PM, Corbin Dunn wrote: On Dec 10, 2008, at 1:14 PM, Randall Meadows wrote: - the cellFrame passed into -drawInteriorWithFrame:inView: is not really the interior of the frame; I've had to do No; it really is! You're this >< close to convincing me! :) cellFrame.orig

Re: Starting Cocoa apps from the command line

2008-12-10 Thread Sean McBride
On 2008-Dec-10, at 16:47, Shayne Wissler wrote: Is there a way to do this without making some kind of wrapper caller that generates the directory and a script or some such? Or is it wholly frowned upon to do what I'm wanting, and if so, why does it half-work rather than fail with a decent error

Core Data triggering an objc_assign_strongCast crash?!

2008-12-10 Thread Nick Zitzmann
I've suddenly been experiencing a problem where calling - [NSManagedObject validateForDelete:] causes the method to call objc_assign_strongCast, which then mysteriously crashes. The application does not use GC, but the object is properly retained, so it's not that. Has anyone ever seen this

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread aaron smith
Hey Ken and Nick, thanks for the feedback. I have continuing questions if you wouldn't mind. "archive them in a nib, load the nib, and then attach them to the window or window's content view." -So I would use a separate nib that contains NSPanels, with the views layed out in that, load the nib, th

Re: Table view containing cells with both an image and text

2008-12-10 Thread Corbin Dunn
On Dec 10, 2008, at 2:15 PM, Randall Meadows wrote: On Dec 10, 2008, at 2:41 PM, Corbin Dunn wrote: On Dec 10, 2008, at 1:14 PM, Randall Meadows wrote: - the cellFrame passed into -drawInteriorWithFrame:inView: is not really the interior of the frame; I've had to do No; it really is! Yo

Re: Starting Cocoa apps from the command line

2008-12-10 Thread Andrew Farmer
On 10 Dec 08, at 13:47, Shayne Wissler wrote: I have a Cocoa application that I am compiling in the traditional UNIX manner using Makefiles and I want to be able to invoke it with command-line arguments and without creating/installing it like traditional OSX apps, as in "x.app/Contents/MacOS/x".

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread Nick Zitzmann
On Dec 10, 2008, at 3:30 PM, aaron smith wrote: -So I would use a separate nib that contains NSPanels, with the views layed out in that, load the nib, then attach it's content to the main windows content? You don't even need panels; custom views can be placed at the top of a nib. -I did

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread aaron smith
Sweet. Thanks Nick! On Wed, Dec 10, 2008 at 2:38 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > On Dec 10, 2008, at 3:30 PM, aaron smith wrote: > >> -So I would use a separate nib that contains NSPanels, with the views >> layed out in that, load the nib, then attach it's content to the main >> w

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread Brandon Walkin
The NSPanels are unnecessary middle men in your case. Rather than using an NSPanel in order to access its contentView, instead create a new standalone view object in IB by dragging in a custom view from the library to the document window (not the canvas). Then double click the view's icon i

Re: Newbie. Creating SubViews that aren't associated with NSWindow, or NSPanel?

2008-12-10 Thread Ken Thomases
On Dec 10, 2008, at 4:30 PM, aaron smith wrote: "Views don't need to be contained in a window in the nib. You can drag a view from the library directly into the nib. You can then set up outlets from, for example, File's Owner to these views to reference them later in the code." -So, by doing thi

Re: How to launch window of the application on clicking of dock icon?

2008-12-10 Thread Ömer Kardaş
You can also use -windowShouldClose event and simply hide your application instead of closing the window. Clicking on the dockicon will simply show it. - (BOOL)windowShouldClose:(id)window { [[NSApplication sharedApplication] hide:self]; return NO; } On Dec 10, 2008, at 7:49

Re: Problem drawing outside of drawRect: in a custom table cell

2008-12-10 Thread Graham Cox
On 11 Dec 2008, at 3:46 am, Corbin Dunn wrote: There are various reasons why this happens; for one, the focus ring may bleed into the rect that was invalidated. But, as you have noticed, you should not rely on invalidating just a small portion and hoping only that portion should redraw.

large texts in NSTextView on 10.4

2008-12-10 Thread Giuseppe Cantavenera
I have to deal with very large texts in a textView , on OS X 10.4. Does anybody now how to implement a subclass of NSLayoutManager that acts like "nonContigousLayout" on 10.5, so to achieve acceptable performance also on 10.4 ? Which methods should I override? Thanks. ___

Re: Starting Cocoa apps from the command line

2008-12-10 Thread Jason Stephenson
Andrew Farmer wrote: I'm not sure, but I can tell you that mplayer does what you're talking about and works fine. You may want to take a look at how they do it. OpenOffice.org, too. It builds an app bundle, etc., using command line tools. It may not be a good place to start, though. It is ab

Countdown With NSTimer - Hours, Minutes, Seconds Remaining?

2008-12-10 Thread Chunk 1978
i believe i painted myself into a corner here... i have a NSPopUpButton with 3 items. 1 Hour, 2 Hours, 3 Hours. each item has respected tag numbers 1, 2 and 3. i'm attempting to print out time remaining but i can only get as far as displaying seconds remaining with this: NSLog(@"%.2d Seconds Re

Re: Countdown With NSTimer - Hours, Minutes, Seconds Remaining?

2008-12-10 Thread Graham Cox
On 11 Dec 2008, at 11:03 am, Chunk 1978 wrote: i believe i painted myself into a corner here... i have a NSPopUpButton with 3 items. 1 Hour, 2 Hours, 3 Hours. each item has respected tag numbers 1, 2 and 3. i'm attempting to print out time remaining but i can only get as far as displaying se

Re: Countdown With NSTimer - Hours, Minutes, Seconds Remaining?

2008-12-10 Thread Nathan Day
You need something like NSLog(@"%.2d Hours, %.2d Minutes and %2d Seconds Remaining", hoursSelected-seconds/3600, (hoursSelected*60-seconds/60)%60, (hoursSelected*3600-seconds)%60 ); On 11/12/2008, at 11:03 , Chunk 1978 wrote: i believe i painted myself into a corner here... i have a NSPop

Re: Countdown With NSTimer - Hours, Minutes, Seconds Remaining?

2008-12-10 Thread Ashley Clark
If you save off a starting time object you could use NSDateComponents. NSDate *startDate = /* set at beginning */ NSCalendar *cal = [NSCalendar currentCalendar]; NSCalendarUnit units = NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; NSDateComponents *comps = [cal components

Problem setting a Core Data Document Icon

2008-12-10 Thread vince
I can't seem to set a default icon for my supported docs in a Core Data project. The .icns file is in my Bundle and placed in the Resources bin. I manually inserted the file name in the Target's Supported Document field. I rebooted my system a few times since and still no changes to the newly save

Re: Countdown With NSTimer - Hours, Minutes, Seconds Remaining?

2008-12-10 Thread Chunk 1978
i read in the docs that the use of NSCalandarDate is discouraged because it's going to be depreciated for OS X 10.6... i'm not really sure if depreciated means that any code with NSCalandarDate will no longer function with the new OS or if it will just be considered out dated... On Wed, Dec 10, 20

  1   2   >