Swap subviews of NSSplitView? (SOLVED)

2008-12-15 Thread Matt
I swear it never fails, I post here and then 10 minutes later figure out the answer. I had forgotten that the NSTableView was inside of a NSScrollView, which was the view I needed to move in and out. replaceSubview works fine now. Sorry for the noise. -Matt ___

re:Core Data binary data optimization(s)

2008-12-15 Thread Ben Trumbull
This was a bit slow, as Core Data seemed to fault each point object individually, resulting in a lot of query overhead. The performance chapter in the Core Data Programming Guide does address this specifically. but Core Data faults my objects so often that now I spend even more time unarch

Swap subviews of NSSplitView?

2008-12-15 Thread Matt
I have an NSSplitView, divided vertically, with two table views. In a certain instance I need to have a custom view class appear in place of the right-hand NSTableView, retaining its auto-resizing and spilt-view-resizing functionality. I need to be able to swap the NSTableView (inside of the split

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Andy Lee
On Dec 15, 2008, at 6:27 PM, John Michael Zorko wrote: I'm not concerned about the contents per se -- i'm concerned about releasing something I declared as static, just to create it again later. Creating and re-creating objects is in itself nothing to be afraid of. It happens all the time

Re: Main Thread autorelease pool, memory usage question?

2008-12-15 Thread Michael Ash
On Mon, Dec 15, 2008 at 9:53 PM, Chad Podoski wrote: > I have a process that is uploading images. My issue is as following, when > uploading a large number of images and my application does not have focus, > memory usage continues to climb until it is maxed out, causing the app to > hang/crash.

Re: Main Thread autorelease pool, memory usage question?

2008-12-15 Thread Ken Ferry
No, you're on target. The thing to understand is that the implementation of the main event loop is basically this: while (1) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSEvent *event = [self nextEventMatchingMask…]; [self sendEvent:event]; [pool drain]; } The k

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Michael Ash
On Mon, Dec 15, 2008 at 5:54 PM, John Michael Zorko wrote: > > Hello, all ... > > Imagine this: > > static NSMutableDictionary *lookup = [NSMutableDictionary new]; > > ... now imagine a situation where I need to clear that dictionary. If I > call > > [lookup release]; > lookup = [NSMutableDiction

Main Thread autorelease pool, memory usage question?

2008-12-15 Thread Chad Podoski
I have a process that is uploading images. My issue is as following, when uploading a large number of images and my application does not have focus, memory usage continues to climb until it is maxed out, causing the app to hang/crash. On the other hand, if the app has focus and the user c

NSOutlineView assertion failure on collapse

2008-12-15 Thread Roland Rabien
I'm having an NSOutlineView Assertion Failure on collapse if the selected item is a child (or child of child, etc) of the item that is being collapsed. Has anyone else had this problem? I've searched the list all the related posts seem to indicate threading is the cause, but my application isn't us

Re: Where is the Computer Image ?

2008-12-15 Thread Klaus Backert
On 15.12.2008, at 18:00, Gerriet M. Denkmann wrote: If the documentation for [NSImage imageNamed:] would have mentioned that image names are to be found in the Constants section, this would have helped a lot. But it only says that it will: "Search the Application Kit framework for a shared

Re: Where is the Computer Image ?

2008-12-15 Thread Rob Keniger
On 16/12/2008, at 4:00 AM, Gerriet M. Denkmann wrote: Well, I looked at Finders Search For -> All Images (some 18000 images) but did not see a computer. If the documentation for [NSImage imageNamed:] would have mentioned that image names are to be found in the Constants section, this wou

Core Data binary data optimization(s)

2008-12-15 Thread Nathan Vander Wilt
Thanks to some patient help from this list, I now have a working Core Data model. One object in the model is basically a glorified vector polygon — an array of "point" structures that contain a about a dozen doubles each. I insert a lot of these polygon objects, and often need to draw all o

Re: Where is the Computer Image ?

2008-12-15 Thread Brandon Walkin
The image is in /System/Library/CoreServices/CoreTypes.bundle/Contents/ Resources On 15-Dec-08, at 12:00 PM, Gerriet M. Denkmann wrote: On 15 Dec 2008, at 19:24, John C. Randolph wrote: On Dec 14, 2008, at 8:53 PM, Gerriet M. Denkmann wrote: Finder.app can show in its Sidebar an image of

Re: Where is the Computer Image ?

2008-12-15 Thread Gerriet M. Denkmann
On 15 Dec 2008, at 19:24, John C. Randolph wrote: On Dec 14, 2008, at 8:53 PM, Gerriet M. Denkmann wrote: Finder.app can show in its Sidebar an image of a computer. I want to create a button with this same (or similar) image. I can use [ sharedWorkspace iconForFile: fullPath ] to get an ima

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Ken Thomases
On Dec 15, 2008, at 5:33 PM, Andrew Farmer wrote: On 15 Dec 08, at 14:54, John Michael Zorko wrote: Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. If I call [lookup release]; lookup = [NSMut

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Graham Cox
On 16 Dec 2008, at 10:27 am, John Michael Zorko wrote: I'm not concerned about the contents per se -- i'm concerned about releasing something I declared as static, just to create it again later. Part of me is saying "just release the dictionary's contents, not the dictionary itself". C

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Andrew Farmer
On 15 Dec 08, at 14:54, John Michael Zorko wrote: Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. If I call [lookup release]; lookup = [NSMutableDictionary new]; ... it will obviously be faste

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread John Michael Zorko
Ashley, Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. If I call [lookup release]; lookup = [NSMutableDictionary new]; ... it will obviously be faster than coding a for loop and removing

Re: controlTextDidChange for UITextField?

2008-12-15 Thread Ricky Sharp
On Dec 14, 2008, at 5:15 PM, Debajit Adhikary wrote: Is there any way to call a method each time the text of a UITextField changes? controlTextDidChange does not seem to exist for UITextField's You'd be better served by using the appropriate forums for UIKit- related questions. But for thi

Re: CoreData mystery: configuration used to open the store is incompatible...

2008-12-15 Thread Melissa J. Turner
There was a change between Tiger and Leopard in the way NSPersistentDocument loaded its model. If you have a document created on Tiger, the model is created using [NSManagedObjectModel mergedModelFromBundles: [NSBundle allBundles]], and on Leopard, with [NSManagedObjectModel mergedModelFrom

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Charles Steinman
- Original Message > From: John Michael Zorko > To: cocoa-dev@lists.apple.com > Sent: Monday, December 15, 2008 2:54:46 PM > Subject: proper way to release a static NSMutableDictionary? > > > Hello, all ... > > Imagine this: > > static NSMutableDictionary *lookup = [NSMutableDictionar

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Ashley Clark
On Dec 15, 2008, at 4:54 PM, John Michael Zorko wrote: Hello, all ... Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. If I call [lookup release]; lookup = [NSMutableDictionary new]; ... it w

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Randall Meadows
On Dec 15, 2008, at 3:54 PM, John Michael Zorko wrote: Hello, all ... Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. [lookup removeAllObjects]; is probably your best choice. If I call [lo

RE: NSFilenamesPboardType for copy/paste and not just drag drop

2008-12-15 Thread Ling Li
I have exactly same issue :) With my testing code, I am pretty sure that Finder supports promised Drag/drop, but does not support promised file copy/paste. With NSFilenamePboardType, Finder should be able to do copy/paste. Did you call [pboard setPropertyList:forType:] after put data into paste

proper way to release a static NSMutableDictionary?

2008-12-15 Thread John Michael Zorko
Hello, all ... Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. If I call [lookup release]; lookup = [NSMutableDictionary new]; ... it will obviously be faster than coding a for loop and remov

CoreData mystery: configuration used to open the store is incompatible...

2008-12-15 Thread Houdah - ML Pierre Bernard
Hi! I am puzzled! I have run into this weirdest problem. It only happens if I target Tiger. I am working on an update to HoudahGeo and suddenly, my current build refuses to open documents. This includes both existing documents and documents created by the running application. The error is

Re: Double KVO notification

2008-12-15 Thread Ken Thomases
On Dec 15, 2008, at 3:48 PM, Randall Meadows wrote: I'm trying to track down (in a project I inherited, not wrote) why a KVO notification is being sent twice. The reason I care is because, the table contains a variety of types of data, and for one particular type of data I need to do somet

Re: Docs on Open GL ES

2008-12-15 Thread Toporek, Chuck
If you're looking for a book on OpenGL ES, there's always this: - OpenGL ES 2.0 Programming Guide http://tinyurl.com/63nlax (link to Amazon.com) It isn't specific to iPhone development, but should give you a good handle on what's there. Chuck On 12/15/08 6:27 AM, "ramesh kakula" wrote:

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-15 Thread David Duncan
On Dec 15, 2008, at 12:47 PM, Thomas Clement wrote: The work around is to draw the part of the image you want to work with. You can do this with either AppKit or Core Graphics using NSBitmapImageRep or a bitmap context (created via CGBitmapContextCreate). Alright but how am I suppose to d

Double KVO notification

2008-12-15 Thread Randall Meadows
I'm trying to track down (in a project I inherited, not wrote) why a KVO notification is being sent twice. The reason I care is because, the table contains a variety of types of data, and for one particular type of data I need to do something special when it is selected, and then revert th

NSURLConnection & NSInputStream issue

2008-12-15 Thread David LeBer
Hello all, I have a requirement where I need to send a chunked file (about 2MB at a time) to a server. Each chunk is embedded as a base64 encoded string in the body of an HTML POST request. I'm working on a proof of concept dev spike and I've got this code which fails: - (void) callUplo

Re: What is the default type for an integer literal (as relates to its use in NSLog)?

2008-12-15 Thread Nick Zitzmann
On Dec 15, 2008, at 2:06 PM, Stuart Malin wrote: Yes, but then I lose the compile-time enforcement that only defined values are supplied (as is achieved with typedef enum). So, as you suggest, I see no reason not to leave as 32-bit. Yet Apple doesn't... is there an advantage to their appr

Re: What is the default type for an integer literal (as relates to its use in NSLog)?

2008-12-15 Thread Stuart Malin
On Dec 15, 2008, at 10:50 AM, Nick Zitzmann wrote: On Dec 15, 2008, at 1:39 PM, Stuart Malin wrote: and define a method that takes the option as a parameter - (void) someMethodWithOption:(MyOptionValue)optionVlaue; Question: Should I force MyOptionValue to be an NSUInteger? If so, how wou

Re: What is the default type for an integer literal (as relates to its use in NSLog)?

2008-12-15 Thread Nick Zitzmann
On Dec 15, 2008, at 1:39 PM, Stuart Malin wrote: and define a method that takes the option as a parameter - (void) someMethodWithOption:(MyOptionValue)optionVlaue; Question: Should I force MyOptionValue to be an NSUInteger? If so, how would I achieve that? (Sorry, my C is weak). It depen

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-15 Thread Thomas Clement
On Dec 15, 2008, at 6:39 PM, David Duncan wrote: On Dec 13, 2008, at 6:08 AM, Thomas Clement wrote: Looks like this is what I need. Now I also need to read pixel values from images on disk. For the same reason I'd like to avoid loading the entire image into memory. Is it possible to access

Re: What is the default type for an integer literal (as relates to its use in NSLog)?

2008-12-15 Thread Stuart Malin
On Dec 15, 2008, at 10:00 AM, Nick Zitzmann wrote: On Dec 15, 2008, at 12:35 PM, Stuart Malin wrote: I am trying to be 32/64 bit "clean" in some new code that I am writing. When I declare some integer values, say for named option values as shown here, what is the type that the compiler a

Re: What is the default type for an integer literal (as relates to its use in NSLog)?

2008-12-15 Thread Nick Zitzmann
On Dec 15, 2008, at 12:35 PM, Stuart Malin wrote: I am trying to be 32/64 bit "clean" in some new code that I am writing. When I declare some integer values, say for named option values as shown here, what is the type that the compiler assigns to these values? enum { SomeOptionVa

Re: What is the default type for an integer literal (as relates to its use in NSLog)?

2008-12-15 Thread Michael Ash
On Mon, Dec 15, 2008 at 2:35 PM, Stuart Malin wrote: > I am trying to be 32/64 bit "clean" in some new code that I am writing. When > I declare some integer values, say for named option values as shown here, > what is the type that the compiler assigns to these values? > > enum { >SomeOpti

Re: Where is the Computer Image ?

2008-12-15 Thread Michael Ash
On Mon, Dec 15, 2008 at 1:35 PM, Clark Cox wrote: > On Mon, Dec 15, 2008 at 7:52 AM, Benjamin Dobson > wrote: >> The image is already in Cocoa, named NSComputer. > > Don't use that name directly in your code, it's best to use the named > constant: NSImageNameComputer. Note that in this case, the

Re: View Swapping

2008-12-15 Thread douglas welton
Hi Carmen, your questions is kinda non-specific... a non-specific answer might be that NSViewController might be of some help to you. A more specific answer might be forthcoming if you could elaborate on what you mean by view swapping. Are you talking about swapping views between window

What is the default type for an integer literal (as relates to its use in NSLog)?

2008-12-15 Thread Stuart Malin
I am trying to be 32/64 bit "clean" in some new code that I am writing. When I declare some integer values, say for named option values as shown here, what is the type that the compiler assigns to these values? enum { SomeOptionValue = 1, AnotherOptionValue = 2, }; The

Re: NSOutline : NSTableViewSelectionHighlightStyleSourceList

2008-12-15 Thread Corbin Dunn
On Dec 15, 2008, at 10:10 AM, Arun wrote: Hi, I noticed that NSTableViewSelectionHighlightStyleSourceList will only work in Leopard onwards. What is the equivalent in tiger? There is none; you would have to implement it by hand. corbin ___ C

Re: NSOutline resizing of rows

2008-12-15 Thread Corbin Dunn
Your datasource would have to return that; it is up to your model to do this. Or, return a large row height for the last item in your group, and override -frameOfCellAtColumn:row: and return a smaller row for the cell to draw in. -corbin On Dec 15, 2008, at 10:05 AM, Arun wrote: Hi, Tha

Re: Where is the Computer Image ?

2008-12-15 Thread Clark Cox
On Mon, Dec 15, 2008 at 7:52 AM, Benjamin Dobson wrote: > The image is already in Cocoa, named NSComputer. Don't use that name directly in your code, it's best to use the named constant: NSImageNameComputer. -- Clark S. Cox III clarkc...@gmail.com ___

Manual Core Data schema migration in -[NSPersistentDocument configurePersistentStoreCoordinatorForURL:ofType:...] without "document changed" error?

2008-12-15 Thread Barry Wark
The data model for my Core Data document-based app (10.5 only) is in a framework, so automatic schema upgrades using a Core Data mapping model don't appear to work. It appears that the Core Data machinery doesn't find the appropriate data models or mapping model when they are not in the app's main

Re: More - Safari Download Security Alerts

2008-12-15 Thread Dave
On 15 Dec 2008, at 18:04, Bill Bumgarner wrote: On Dec 15, 2008, at 8:53 AM, Dave wrote: Why doesn't drag and drop work? AFAIK it does work, but my boss wants to be able to display a "T&C" page etc. and he wants an installer. Also it isn't a straight forward .app file, it's an App file t

Re: More - Safari Download Security Alerts

2008-12-15 Thread Dave
On 15 Dec 2008, at 17:59, Mike Abdullah wrote: On 15 Dec 2008, at 16:53, Dave wrote: On 15 Dec 2008, at 16:31, Bill Bumgarner wrote: On Dec 15, 2008, at 7:29 AM, Dave wrote: I've being experimenting since I wrote the above. My installation consists of a folder that contains an applicati

Re: More - Safari Download Security Alerts

2008-12-15 Thread Jean-Daniel Dupas
Le 15 déc. 08 à 19:04, Bill Bumgarner a écrit : On Dec 15, 2008, at 8:53 AM, Dave wrote: Why doesn't drag and drop work? AFAIK it does work, but my boss wants to be able to display a "T&C" page etc. and he wants an installer. Also it isn't a straight forward .app file, it's an App file t

Re: View Swapping

2008-12-15 Thread Jean-Daniel Dupas
Le 15 déc. 08 à 18:49, Carmen Cerino Jr. a écrit : Howdy, Are there any guides regarding when it is appropriate to use this technique? Thanks, Carmen Generaly people prefere to use tabless tabview. ___ Cocoa-dev mailing list (Cocoa-dev@lists

NSOutline : NSTableViewSelectionHighlightStyleSourceList

2008-12-15 Thread Arun
Hi, I noticed that NSTableViewSelectionHighlightStyleSourceList will only work in Leopard onwards. What is the equivalent in tiger? -Arun ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: NSOutline resizing of rows

2008-12-15 Thread Arun
Hi, Thanks for the sugussion..it worked for me. Is there any way in which we can add an empty row at the end of each group? -Arun On Mon, Dec 15, 2008 at 11:10 PM, Corbin Dunn wrote: > - (CGFloat)outlineView:(NSOutlineView *)outlineView > heightOfRowByItem:(id)item AVAILABLE_MAC_OS_X_VERSION_1

Re: More - Safari Download Security Alerts

2008-12-15 Thread Bill Bumgarner
On Dec 15, 2008, at 8:53 AM, Dave wrote: Why doesn't drag and drop work? AFAIK it does work, but my boss wants to be able to display a "T&C" page etc. and he wants an installer. Also it isn't a straight forward .app file, it's an App file that is in a folder that also also contains other

Re: More - Safari Download Security Alerts

2008-12-15 Thread Mike Abdullah
On 15 Dec 2008, at 16:53, Dave wrote: On 15 Dec 2008, at 16:31, Bill Bumgarner wrote: On Dec 15, 2008, at 7:29 AM, Dave wrote: I've being experimenting since I wrote the above. My installation consists of a folder that contains an application. I want the folder to be created in "/Applica

Re: More - Safari Download Security Alerts

2008-12-15 Thread Philippe Devallois
On 15 déc. 08, at 18:41, Dave wrote: Hi, I looked at the Man page below, I can't see anything that says "udifrez". Is this meant for me? I'm not sure what I am supposed to do with it. All the Best Dave http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man1/hdiutil.1.htm

Re: Key-bindings Dictionary Location

2008-12-15 Thread Aki Inoue
The documentation is describing the location of key binding dictionary the AppKit framework is using. It's totally legal for an app to have its own key binding system (just like Xcode does) and store the default dictionary somewhere else. Aki On 2008/12/12, at 23:12, Dong Feng wrote: See

Re: Docs on Open GL ES

2008-12-15 Thread David Duncan
On Dec 15, 2008, at 3:27 AM, ramesh kakula wrote: I am looking for the good documentation on the Open GL ES for iPhone, if any one have a link or doc please share. Depending on what your really asking for might have information useful to you. -- David Du

View Swapping

2008-12-15 Thread Carmen Cerino Jr.
Howdy, Are there any guides regarding when it is appropriate to use this technique? Thanks, Carmen ___ 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 co

Re: CALayer and Memory Management

2008-12-15 Thread David Duncan
On Dec 14, 2008, at 5:08 PM, Dimitri Bouniol wrote: I'm at a loss when it comes to releasing CALayers. Read and follow the memory management guidelines, CALayers follow them perfectly.

Re: More - Safari Download Security Alerts

2008-12-15 Thread Dave
Hi, I looked at the Man page below, I can't see anything that says "udifrez". Is this meant for me? I'm not sure what I am supposed to do with it. All the Best Dave On 15 Dec 2008, at 17:14, Graham Lee wrote: On 15/12/2008 17:06, "Devon Ferns" wrote: This is OT for the Cocoa list now,

Re: NSOutline resizing of rows

2008-12-15 Thread Corbin Dunn
- (CGFloat)outlineView:(NSOutlineView *)outlineView heightOfRowByItem: (id)item AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; --corbin On Dec 15, 2008, at 9:32 AM, Arun wrote: Hi How can we resize the row height for Items in the NSOuline view so that the we can make a clear distincton betwe

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-15 Thread David Duncan
On Dec 13, 2008, at 6:08 AM, Thomas Clement wrote: Looks like this is what I need. Now I also need to read pixel values from images on disk. For the same reason I'd like to avoid loading the entire image into memory. Is it possible to access pixel values piece by piece? I can't find how to

Re: Distributed Objects with Garbage Collection (on PPC)

2008-12-15 Thread Tony Parker
Hi John, The bug you're referring to (a problem with NSSocketPort and GC) should be fixed in 10.5.5. Thanks, - Tony Parker Cocoa Frameworks On Dec 13, 2008, at 12:46 PM, John Pannell wrote: Hi Bridger- I had precisely the same issue some months ago, and wrote to this list. I did get a

NSOutline resizing of rows

2008-12-15 Thread Arun
Hi How can we resize the row height for Items in the NSOuline view so that the we can make a clear distincton between the groups? -Arun ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to t

Re: Drawing NSTextFieldCell subclass in table view

2008-12-15 Thread Corbin Dunn
On Dec 13, 2008, at 4:03 PM, Iceberg-Dev wrote: NSTextFieldCell is flipped. This has an impact on the y value. It might be the cause of the issue in your case. This is actually not quite right; the cell doesn't have a flipped property. The view does, and NSTableView isFlipped==YES. It wo

Re: NSTableView Selection

2008-12-15 Thread Corbin Dunn
On Dec 12, 2008, at 10:44 PM, David Blanton wrote: Allowing empty selection did not clear the first row being selected. Also, calling deselectRow:0 at various time during table load does not clear the first row being selected. Note that Apple has said this is somewhat of a bug and asked th

Re: More - Safari Download Security Alerts

2008-12-15 Thread Graham Lee
On 15/12/2008 17:06, "Devon Ferns" wrote: > This is OT for the Cocoa list now, but you can set an EULA to be > displayed when mounting a dmg. I don't know how since I've never cared > to check but many apps do it so it's possible. > x-man-page://1/hdiutil Particularly the 'udifrez' command. C

Re: More - Safari Download Security Alerts

2008-12-15 Thread Devon Ferns
This is OT for the Cocoa list now, but you can set an EULA to be displayed when mounting a dmg. I don't know how since I've never cared to check but many apps do it so it's possible. You could just have the user drag the whole folder to the installation directory with an EULA being displayed

Re: More - Safari Download Security Alerts

2008-12-15 Thread Dave
On 15 Dec 2008, at 16:31, Bill Bumgarner wrote: On Dec 15, 2008, at 7:29 AM, Dave wrote: I've being experimenting since I wrote the above. My installation consists of a folder that contains an application. I want the folder to be created in "/Applications", however, it doesn't seem to let

Docs on Open GL ES

2008-12-15 Thread ramesh kakula
Hi, I am looking for the good documentation on the Open GL ES for iPhone, if any one have a link or doc please share. Thanks Ramesh. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: Programatically creating windows

2008-12-15 Thread Keary Suska
On Dec 13, 2008, at 9:40 PM, Development wrote: [mainWindow makeKeyAndOrderFront:self]; [mainWindow setInitialFirstResponder:docView]; Of particular note, -setInitialFirstResponder: should be called before the window is placed onscreen, so you should call it before - makeKe

Re: More - Safari Download Security Alerts

2008-12-15 Thread Bill Bumgarner
On Dec 15, 2008, at 7:29 AM, Dave wrote: I've being experimenting since I wrote the above. My installation consists of a folder that contains an application. I want the folder to be created in "/Applications", however, it doesn't seem to let me do this. I end up with just the .app file in "/

Re: Feasibility : setObjectValue: + bindings + Table Column with NSImageCell ??

2008-12-15 Thread Ken Thomases
On Dec 15, 2008, at 5:11 AM, rajesh wrote: I have a table column(With ImageCell) to be filled with images , I have a NSTreeController Is this a column in an outline view or a table? NSTreeController is intended for an outline view or browser. which has dictionary for this image ( diction

Re: Where is the Computer Image ?

2008-12-15 Thread Benjamin Dobson
The image is already in Cocoa, named NSComputer. On 15 Dec 2008, at 04:53:12, Gerriet M. Denkmann wrote: Finder.app can show in its Sidebar an image of a computer. I want to create a button with this same (or similar) image. I can use [ sharedWorkspace iconForFile: fullPath ] to get an image

Re: How to get notifications when unexpected network disconnection is occurred?

2008-12-15 Thread Ken Thomases
On Dec 15, 2008, at 5:49 AM, norio wrote: I'm sorry to ask you this again. I don't know if I could have told you my problem correctly, please let me tell you again. 1. My app gets NSWorkspaceDidUnmountNotification. 2. Under 10.5, users can handle some actions before the notification comes

Re: More - Safari Download Security Alerts

2008-12-15 Thread Dave
Hi, I've been trying to use PackageMaker to build an installer without much luck, it seems very flakey. I following the instructions in the manual and actually created one usable installer. When it worked it created a .mpkg file. I then made some changes and built it again, this time it

Re: Write to file.

2008-12-15 Thread Filip van der Meeren
You are writing to a folder that is under admin rights. Instead write to the user directory: ~/Library/Preferences/myFile.plist Or make use of the NSUserDefaults class. Filip van der Meeren fi...@code2develop.com http://www.sourceforge.net/projects/perlmanager http://www.sourceforge.net/projects/

Re: encoding/decoding selectors?

2008-12-15 Thread Andy Lee
On Dec 15, 2008, at 8:47 AM, Karan, Cem (Civ, ARL/CISD) wrote: - (void) encodeWithCoder:(NSCoder *) aCoder { [aCoder encodeObject:NSStringFromSelector(self.selector) forKey:@"selector"]; } - (id) initWithCoder:(NSCoder *)aDecoder { self.selector = NSSelectorFromString([aDecoder decodeObje

Re: encoding/decoding selectors?

2008-12-15 Thread Jean-Daniel Dupas
Le 15 déc. 08 à 14:47, Karan, Cem (Civ, ARL/CISD) a écrit : I need to encode/decode an object which has a selector as one of its instance variables. I know that NSCoder doesn't directly support this, so my current way of doing things is the following: - (void) encodeWithCoder:(NSCoder *)

encoding/decoding selectors?

2008-12-15 Thread Karan, Cem (Civ, ARL/CISD)
I need to encode/decode an object which has a selector as one of its instance variables. I know that NSCoder doesn't directly support this, so my current way of doing things is the following: - (void) encodeWithCoder:(NSCoder *) aCoder { [aCoder encodeObject:NSStringFromSelector(self.se

Katoeri-Hiragana input underline drawing

2008-12-15 Thread Rimas
Hello, I am wondering if it is possible to draw this underline manually? I am talking about underline which is visible when entering text in Katoeri-Hiragana and characters are in undermined state. I have tried to use "- (void)drawGlyphsForGlyphRange:(NSRange)glyphsToShow atPoint:(NSPoint)origin"

Re: Feasibility : setObjectValue: + bindings + Table Column with NSImageCell ??

2008-12-15 Thread rajesh
On Dec 15, 2008, at 1:09 PM, Alexander Spohr wrote: An NSImageCell needs an image. Why would you bind an NSDictionary to it? I have a column with image + text as well , so I took advantage of setting object value as Dictionary and in the drawWithFrame:(NSRect)cellFrame inView:(NSView *)co

Re: Where is the Computer Image ?

2008-12-15 Thread John C. Randolph
On Dec 14, 2008, at 8:53 PM, Gerriet M. Denkmann wrote: Finder.app can show in its Sidebar an image of a computer. I want to create a button with this same (or similar) image. I can use [ sharedWorkspace iconForFile: fullPath ] to get an image of a home folder, or of a disk partition. But

Re: Text layout responsibility

2008-12-15 Thread Rimas
I have tried to modify my text container in mentioned method (- (void)layoutManager:(NSLayoutManager *)layoutManager didCompleteLayoutForTextContainer:(NSTextContainer *)textContainer atEnd:(BOOL)layoutFinishedFlag). At a first glance looks like this works. But I decided to stay on the earlier way

Re: Text layout responsibility

2008-12-15 Thread Rimas
Hello Gordon, Have you installed 10.6 to run test? Regards, Rimas >NSTextContainer has been broken for some time now and I can't even get > an acknowledgement from DTS of the bug in spite of the fact that I've had > others verify it on independent machines using Apple, Inc's own sample code.

scheme High Level Class and representations

2008-12-15 Thread René v Amerongen
Hi, What are your idea's to solve this the right way. I have a class ( high level ) that receives data. The type of data is unknown and is only recognisable by an included header inside the data. This header could be 16 bytes or 32 bytes long. Depending on this header I will call a worker.

How to get notifications when unexpected network disconnection is occurred?

2008-12-15 Thread norio
I'm sorry to ask you this again. I don't know if I could have told you my problem correctly, please let me tell you again. 1. My app gets NSWorkspaceDidUnmountNotification. 2. Under 10.5, users can handle some actions before the notification comes to my app. I'd like my app to get noticed

Feasibility : setObjectValue: + bindings + Table Column with NSImageCell ??

2008-12-15 Thread rajesh
Hi all, w.r.t one of my earlier post ( subject : Design for showing ridiculously huge number of images in Table View ) I have a table column(With ImageCell) to be filled with images , I have a NSTreeController which has dictionary for this image ( dictionary has few details , using which

Write to file.

2008-12-15 Thread Macarov Anatoli
I have got my own bundle that I insert into login window. When login window is started up  the bundle  writes necessary parametr into file which is situated  in /Library/Preferences/. I try to write in the following way: NSString *Value;        NSDictionary *theDict = [NSDictionary dictionaryWit

Re: Now contents of the layer not being rotated [was Re: Rotating a CALayer more than once is not working ]

2008-12-15 Thread Gustavo Pizano
Why would it change? The content of the layer is what it displays, the rotation is part of the overall transform which is how it displays. The latter won't influence the former. Think of it like a photo on your desk. (A real physical paper one, mind.) Now turn it sideways. Did the photo change in

Re: Core Data: following a relationship to set a transient attribute during awakeFromFetch

2008-12-15 Thread Quincey Morris
On Dec 14, 2008, at 18:25, Steve Mykytyn wrote: I am using transient attributes as a nice and efficient way to display formatted data (with line breaks) in an NSTableView, and am running into trouble in my awakeFromFetch: method for a subclass of NSManagedObject. This works fine in the aw