Re: More on Undo and Redo

2009-02-19 Thread Randall Meadows
On Feb 19, 2009, at 9:28 PM, Graham Cox wrote: Undo isn't *required* to be symmetrical. It just happens to be when setting a single property like your -setColor: example. ... Seems to me this is the sort of design you want. Yes, yes it is... On Feb 19, 2009, at 8:29 PM, Michael Ash wrote:

Re: More on Undo and Redo

2009-02-19 Thread Jerry Krinock
Yes, that changing colors back and forth thing in Apple's sample code is a degenerate case which makes undo/redo look much simpler than it really is in many cases. The real story is explained in this "classic post" by Bill Cheeseman. http://www.cocoabuilder.com/archive/message/cocoa/2002/7

sdp generating empty header

2009-02-19 Thread Mark Munz
I'm not getting any useful results when I try to generate Scripting Bridge headers. The .h file is: #import #import and the .m file is #import "AppName.h" I don't get any error message, warnings or anything to tell me why it won't build the code for the commands. It clearly is looking for s

Re: More on Undo and Redo

2009-02-19 Thread Graham Cox
On 20/02/2009, at 6:34 AM, Randall Meadows wrote: when changing a yellow object blue, you pass the Undo manager the object, the -setColor: method, and the current color, so that upon invoking Undo the color is changed back to what it was. Nice and symmetrical. However, I have a case wh

Can't create windows with framework window nib

2009-02-19 Thread Tron Thomas
I am trying to write a framework that contains a window nib which can be used to create a window on demand by the application linking into the framework. The framework originally contained a singleton object was defined similar to this: @interface FrameworkObject : NSWindowController {

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-19 Thread Michael Ash
On Thu, Feb 19, 2009 at 1:29 PM, Leo Singer wrote: > I would rather not dynamically allocate that particular array because > the Cocoa application I am developing is simply a wrapper for a cross > platform C++ project. This particular project has to manage a number > of different resources, inclu

Re: performance of UIControls

2009-02-19 Thread Michael Ash
On Thu, Feb 19, 2009 at 4:25 PM, Memo Akten wrote: > but I was wondering if I could just directly use the controls in my update > loop? I would only use them once per update loop (for loops etc. I would > cache the value first if need be). E.g. if (mySwitch.on) or velocity = > velSlider.value? Or

Re: More on Undo and Redo

2009-02-19 Thread Michael Ash
On Thu, Feb 19, 2009 at 2:34 PM, Randall Meadows wrote: > The problem is Redo. This is not a symmetric operation, like changing the > color of an object on screen. All I need to do to Redo is call the method > that deletes the card. It seems I need to tell the Undo manager to invoke a > differe

Re: Need recommendations for best way to build a custom view

2009-02-19 Thread Andreas Mayer
Am 19.02.2009 um 22:17 Uhr schrieb Ken Tozier: I tried writing my own table class from scratch that allows for not just cells but entire views to act in the role of cells in traditional NSTables. This worked to an extent, but one requirement, that projects can each have a different number

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread mmalc Crawford
On Feb 19, 2009, at 12:34 PM, mmalc Crawford wrote: See also updated: Just to try to forestall what will probably otherwise be a flood of feedback; yes, there's a typo: [super release]; shou

Re: How to re-create Finders File Copy

2009-02-19 Thread Andreas Mayer
Am 20.02.2009 um 00:43 Uhr schrieb Corbin Dunn: I suspect it has a view in a separate NIB, as a sort of template. It creates a window and loads that view into it. When another copy operation starts, it grows the window, keeping the first view in its screen position (which means changing

Re: Need recommendations for best way to build a custom view

2009-02-19 Thread Kyle Sluder
Why did you put the test at the end? I'd do a short-circuit at the top of the method before even asking for the identifier. And have you set a breakpoint to see if your code is taking that path for all columns? --Kyle Sluder ___ Cocoa-dev mailing list

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-19 Thread Clark Cox
On Thu, Feb 19, 2009 at 10:29 AM, Leo Singer wrote: > A std::vector would be unsuitable also because in my actual > application (not the cooked example I sent out) I need to be able to > manipulate that memory directly. Not true; std::vector's memory is guaranteed to be contiguous; you can treat

Re: Need recommendations for best way to build a custom view

2009-02-19 Thread Ken Tozier
Hmmm. When I add a "nil" column test, the resulting table has the correct number of rows and group rows appear, but it wipes out all the data the cells are supposed to display. By that I mean the table cells are all empty and uneditable. Data only appears in the cells if I remove or commen

Reading from online Byte Array to UITableview best method?

2009-02-19 Thread Harry G
I wish to dynamically load (from URL) byte array data, convert to cocoa datatypes, and use in an UITableview. So many ways to skin a cat, so before I proceed I was wondering what methods you would recommend for the job? ___ Cocoa-dev mailing list

Re: Running a timer on a separate thread

2009-02-19 Thread Kyle Sluder
On Thu, Feb 19, 2009 at 7:42 PM, Ken Thomases wrote: >> but we can't figure out how to keep the thread alive and open so that the >> timer can fire. At first, the thread would die right after scheduling the >> timer on the thread's runloop. > > Right. A run loop exits if it has no proper run loo

Attributed string to HTML: invalid image URLs

2009-02-19 Thread David Sinclair
Hi, I just wrote some code to export an attributed string to a HTML file wrapper, with images within a folder. It works fine, except the image URLs in the HTML are invalid; they are just "file:///" and the image name. Omitting that prefix would make them valid relative URLs. How can I

Re: Memory Leak, part I

2009-02-19 Thread Corbin Dunn
Use Instruments instead; it will be much easier to find your memory leaks. corbin On Feb 18, 2009, at 3:09 PM, John Love wrote: [this is part I of a two-part plea for help] I I have read Apple's "ManagingMemory.pdf" and am still having difficulty understanding the use of MallocDebug which

Re: Running a timer on a separate thread

2009-02-19 Thread Ken Thomases
On Feb 19, 2009, at 6:26 PM, Dave DeLong wrote: We've got an app that splits off two threads: one to play some background music, and the other to count the beats that have passed so far. We're doing beat counting with a timer (we know the bpm of the music), but we've got a problem: We s

Re: Running a timer on a separate thread

2009-02-19 Thread Shawn Erickson
On Thu, Feb 19, 2009 at 4:26 PM, Dave DeLong wrote: > Hi everyone, > > I'm sure the answer to this is out there, but I having difficulty finding > it. > > We've got an app that splits off two threads: one to play some background > music, and the other to count the beats that have passed so far.

Running a timer on a separate thread

2009-02-19 Thread Dave DeLong
Hi everyone, I'm sure the answer to this is out there, but I having difficulty finding it. We've got an app that splits off two threads: one to play some background music, and the other to count the beats that have passed so far. We're doing beat counting with a timer (we know the bpm o

Re: Need recommendations for best way to build a custom view

2009-02-19 Thread Kyle Sluder
According to the documentation, group rows are treated in delegate methods as belonging to a nil column. You seem only to be testing for actual columns. Not entirely sure about the editing problem; you're making the cell not editable, which is appropriate, but perhaps because you're mistakenly re

Re: How to re-create Finders File Copy

2009-02-19 Thread Nick Zitzmann
On Feb 19, 2009, at 4:22 PM, Ken Thomases wrote: I could swear there was an example of how this was done in one of the guides, or a sample code example, but my google-fu is failing me. The guy who wrote The Unarchiver already solved this problem, if the OP is writing something under the G

Re: How to re-create Finders File Copy

2009-02-19 Thread Corbin Dunn
On Feb 19, 2009, at 3:22 PM, Ken Thomases wrote: On Feb 19, 2009, at 4:21 PM, Jason Cox wrote: I want to re-create finders copy when you are copying multiple files. I suspect it has a view in a separate NIB, as a sort of template. It creates a window and loads that view into it. When an

Re: How to re-create Finders File Copy

2009-02-19 Thread Ken Thomases
On Feb 19, 2009, at 4:21 PM, Jason Cox wrote: I want to re-create finders copy when you are copying multiple files. I suspect it has a view in a separate NIB, as a sort of template. It creates a window and loads that view into it. When another copy operation starts, it grows the window,

Re: Need recommendations for best way to build a custom view

2009-02-19 Thread Ken Tozier
Thanks Kyle -tableView:isGroupRow: gets me about 80 percent of the way there, but I'm still having a few issues. - My "tableView:dataCellForTableColumn:row:" method is set up to return data cells correctly (I think) but the project name is editable and I don't want it to be. - The project

How to re-create Finders File Copy

2009-02-19 Thread Jason Cox
Hello, I want to re-create finders copy when you are copying multiple files. Does it use an NSTableView? If so, how are they putting all that information into the NSCell? (meaning the filename, progress bar and the copy information) into one column. If its not using an NSTableview, then w

Re: Why does NSTextView move down?

2009-02-19 Thread Eric Gorr
On Feb 19, 2009, at 5:12 PM, Carlos Eduardo Mello wrote: On Feb 19, 2009, at 5:08 PM, Eric Gorr wrote: If you edit the label of the item and enter enough characters so that it starts a third line, the NSTextView mysteriously shifts down a couple of pixels. It is unclear to me why this is

Re: Why does NSTextView move down?

2009-02-19 Thread Carlos Eduardo Mello
On Feb 19, 2009, at 5:08 PM, Eric Gorr wrote: If you edit the label of the item and enter enough characters so that it starts a third line, the NSTextView mysteriously shifts down a couple of pixels. It is unclear to me why this is happening and what I can do to prevent it. Any thoughts

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread mmalc Crawford
On Feb 19, 2009, at 2:01 PM, mmalc Crawford wrote: On Feb 19, 2009, at 1:57 PM, James Montgomerie wrote: I feel like I may have opened a can of worms here. I think Ricky just closed it -- thanks. And your post afforded a good opportunity to point to the updated documentation, so thanks for

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread Ricky Sharp
On Feb 19, 2009, at 3:57 PM, James Montgomerie wrote: I feel like I may have opened a can of worms here. Nope; my fault. All this time I had misread the whole point of the threads. My app has never received low-memory warnings. So my observations in turn have nothing to do with it. I

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread mmalc Crawford
On Feb 19, 2009, at 1:57 PM, James Montgomerie wrote: I feel like I may have opened a can of worms here. I think Ricky just closed it -- thanks. mmalc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mo

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread Ricky Sharp
On Feb 19, 2009, at 3:52 PM, mmalc Crawford wrote: On Feb 19, 2009, at 1:41 PM, Ricky Sharp wrote: Perhaps this is just how I've coded things, but I've seen views get unloaded and reloaded perfectly without any leaks. This isn't the issue. The issue is how much memory can you free up in

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread James Montgomerie
On 19 Feb 2009, at 21:41, Ricky Sharp wrote: On Feb 19, 2009, at 2:18 PM, James Montgomerie wrote: Returning to this months-old thread... Apologies for the length of the mail, I thought it best to summarise what went before. I now have shipping iPhone OS apps and during all my tests and

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread mmalc Crawford
On Feb 19, 2009, at 1:41 PM, Ricky Sharp wrote: Perhaps this is just how I've coded things, but I've seen views get unloaded and reloaded perfectly without any leaks. This isn't the issue. The issue is how much memory can you free up in response to a memory warning. If you don't follow t

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread Ricky Sharp
On Feb 19, 2009, at 2:18 PM, James Montgomerie wrote: Returning to this months-old thread... Apologies for the length of the mail, I thought it best to summarise what went before. I now have shipping iPhone OS apps and during all my tests and analyzing things in Instruments (connected to

Re: Need recommendations for best way to build a custom view

2009-02-19 Thread Kyle Sluder
On Thu, Feb 19, 2009 at 4:17 PM, Ken Tozier wrote: > Seems simple enough but I can't use tables because columns are a single > width and project names are much longer than page numbers. What I end up > with are ridiculously long page number fields to display short numbers like > 1, 2, 3, etc. I ha

Resizing NSCollectionViewItem's view to fit NSTextField

2009-02-19 Thread Vladimir Pouzanov
Hi all, is there any way to make a NSTextField autoresize to fit all its content (and automatically resize NSView of collection item)? I have an application that loads a series of messages for network (message text is stored as short preview and fits pre-defined NSTextField size). Later I

performance of UIControls

2009-02-19 Thread Memo Akten
Hi All, I have a UI with a lot of UISliders and UISwitches. For every single one I have an IBAction which updates an internal variable, I also have a pointer to every control in my controller so if a variable is updated programmatically it's updated in the UI. In my game's update loop I che

Need recommendations for best way to build a custom view

2009-02-19 Thread Ken Tozier
Hi I'm trying to display documents in a specific way but am having a very hard time trying to figure out how to do it with any of Apple's built- in gui widgets. I've tried probably a half dozen different approaches over the last several months, but there doesn't seem to be any Apple widget

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-19 Thread Ken Thomases
On Feb 19, 2009, at 12:29 PM, Leo Singer wrote: A std::vector would be unsuitable also because in my actual application (not the cooked example I sent out) I need to be able to manipulate that memory directly. std::vector guarantees that you're allowed to do that. Cheers, Ken ___

Re: Cocoa, Finder Preferences & Blank Media (CD-R etc) ...

2009-02-19 Thread Ken Thomases
On Feb 19, 2009, at 3:47 AM, Mic Pringle wrote: When I pop a blank cd/dvd Finder prompts a window asking what to do with it ie which application to use to open it. I also know that you can also set these preferences using the CD/DVD preference pane in System Preferences. However, what I'd like

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread mmalc Crawford
On Feb 19, 2009, at 12:18 PM, James Montgomerie wrote: Is the reason that the setView: approach is preferred that, despite what the docs and comments in the files say, the superclass' didReceiveMemoryWarning might /not/ actually release the view, even if it doesn't have a superview It's

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread James Montgomerie
Returning to this months-old thread... Apologies for the length of the mail, I thought it best to summarise what went before. I suggested that an appropriate implementation for didReceiveMemoryWarning in a UIViewController subclass would be On 22 Nov 2008, at 15:58, James Montgomerie wrot

Why does NSTextView move down?

2009-02-19 Thread Eric Gorr
I have place a sample application which demonstrates the problem at: http://ericgorr.net/cocoadev/outlinetable/ItemDev.zip If you edit the label of the item and enter enough characters so that it starts a third line, the NSTextView mysteriously shifts down a couple of pixels. It is unclear t

Trouble with NSToolbar

2009-02-19 Thread Luca Pazzerello
Hi there, I'm having a trouble with NSToolbar. Lazily, i have built my toolbar itself and its items directly in IB. Everything worked fine, since the items were controls, like pop up buttons, buttons etc. Then i tried to add a my custom NSView, and its content is currently not drawn. The t

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-19 Thread Greg Parker
On Feb 19, 2009, at 10:29 AM, Leo Singer wrote: I would rather not dynamically allocate that particular array because the Cocoa application I am developing is simply a wrapper for a cross platform C++ project. This particular project has to manage a number of different resources, including an SQ

Spotlight-Like Menu-Item - How To?

2009-02-19 Thread Heiko
Hello! I searched the archives but did not find what I'm looking for. I would like to implement a Spotlight-like Menuitem, using NSStatusBar and NSMenu, one of the NSMenuItems being a NSSearchField. Is this possible? And if "yes" how can it be done? Maybe someone can point me into the righ

More on Undo and Redo

2009-02-19 Thread Randall Meadows
I think I must be missing something fundamental, or have a misunderstanding to begin with. Or maybe I'm just doing something wrong to begin with... I'm working on an app, implementing Undo features. Undo basics are simple: you supply the Undo manager an object, a method, and some argume

RE: what to do with MAC address...

2009-02-19 Thread Jon C. Munson II
Beautiful!! Sweet!! Thanks, that's exactly what I needed. Peace, Love, and Light, Jon C. Munson II From: Volker in Lists [mailto:volker_li...@ecoobs.de] Sent: Thursday, February 19, 2009 1:43 PM To: jmun...@his.com Cc: cocoa-dev@lists.apple.com Subject: Re: what to do with MAC a

Archiving objects on seperate thread

2009-02-19 Thread livinginlosangeles
I have an NSDocument that has several NSArrayControllers worth of data as well as a bunch of iVars. I can succesfully archive my Document's iVars and my ArrayContollers' contents, and I can succesfully implement NSDocument's autosave feature. However, and this is a design limitation on my p

Re: what to do with MAC address...

2009-02-19 Thread Volker in Lists
Hi there, as a quick pointer - from one of my apps licensing code. Assuming that MACAddress is the beasty UInt8 struct, the following should work: NSString *addressString = [[NSString alloc] initWithFormat:@"%02x: %02x:%02x:%02x:%02x:%02x",MACAddress[0], MACAddress[1], MACAddress[2], MAC

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-19 Thread Mike Abdullah
On 19 Feb 2009, at 18:29, Leo Singer wrote: Sorry, I meant to send this to the list. Leo -- Forwarded message -- From: Leo Singer Date: Thu, Feb 19, 2009 at 1:28 PM Subject: Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation To: Greg Parker

what to do with MAC address...

2009-02-19 Thread Jon C. Munson II
Namaste! Per Apple's GetPrimaryMACAddress sample (found in Technical Note TN1103), I can obtain a MAC address for a given Mac. However, when I try to output that address to the screen, I get nothing. So, my issue is, what do I do with the return value found inside that sample so that it is outpu

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-19 Thread Leo Singer
Sorry, I meant to send this to the list. Leo -- Forwarded message -- From: Leo Singer Date: Thu, Feb 19, 2009 at 1:28 PM Subject: Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation To: Greg Parker Thanks for all of the input on this. I decide

How to make a token field that only accepts numbers: NSTokenField with NSNumberFormatter?

2009-02-19 Thread Leo Singer
Hi, I want to create an NSTokenField that only accepts tokens that are numbers. In fact, I only want integers between 0 and, say, 170 inclusive. I tried dropping an NSNumberFormatter onto my NSTokenField, but it had no perceivable effect. Help! Leo _

Bumpy NSViewAnimation

2009-02-19 Thread Raivis Lancetovs
I have an NSViewAnimation, which moves and fades two views on top of each other. The animation is very smooth and works well, however, it lags if mouse pointer is over these views. What might be causing this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: Open window from nib in foreground

2009-02-19 Thread Alexander Spohr
Read the Docs on NSWindow then try makeKeyAndOrderFront: atze Am 19.02.2009 um 18:54 schrieb doc.aron...@gmail.com: Hello, I am programmatically launching a window that is defined in a XIB file using the following statement: [NSBundle loadNibNamed:@"MyNibFile" owner:anObject];

Open window from nib in foreground

2009-02-19 Thread doc . aronnax
Hello, I am programmatically launching a window that is defined in a XIB file using the following statement: [NSBundle loadNibNamed:@"MyNibFile" owner:anObject]; where MyNibFile is the name of the XIB file and anObject is the object that gets designated as the "File's owner". However, the

Re: Question about the Foundation Framework

2009-02-19 Thread Graham Lee
On 19/02/2009 15:36, "Michael Ash" wrote: > If you're looking for more information, note that NSTemporaryDirectory > is essentially equivalent to /tmp on a normal UNIX system, although > it's actually in a different location. Hi Mike, that's not quite true, NSTemporaryDirectory() should be some

Re: Converting .wav files to MP3

2009-02-19 Thread John Murphy
I do a lot of audio conversion for my website. For .wav to .mp3 conversion it is necessary to perform a compression operation, so not all software supports it. Note that most all programs can open a .wav file, so you are looking for an "MP3 exporter" not a specific "WAV to MP3 converter". On th

Re: Adding Multiple NSWindow or NSPanel into another NSWindow

2009-02-19 Thread Shawn Erickson
On Wed, Feb 18, 2009 at 8:27 PM, Ankur Singhal wrote: > > Actually I want to allow the user to fit a view at any place in the window > he wants by dragging the view. Also allowing him to hide it if required or > close it. This is all possible and relatively easy to do... you just have to do it yo

Re: DeleteKey problem

2009-02-19 Thread Ross Carter
On Feb 18, 2009, at 12:24 PM, Arun wrote: I am attaching a small App code with this mail. This app when run will display a Text cell and a button. Upon hitting the button, text cell is populated with text "DeleteKey Pressed". Also for a button i have added a keyboard equivalent as "Delete" key.

How to make nspopupbuttoncell only show litems when click arrow?

2009-02-19 Thread Yang Mu
Hi developers, I want to get a way make popupbutton only popup items when click arrow area, instead of whole cellframe is it possible? _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.

How to make nspopupbuttoncell only show litems when click arrow?

2009-02-19 Thread Yang Mu
Hi developers, I want to get a way make popupbutton only popup items when click arrow area, instead of whole cellframe is it possible? _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's eas

Re: Question about the Foundation Framework

2009-02-19 Thread Andreas Monitzer
On Feb 19, 2009, at 16:36, Michael Ash wrote: Nothing to do with OOP, it's just good practice on the system. Temporary files go in the temporary directory. There are several reasons why this is a good idea: - The temporary directory gets cleaned out regularly by the system. If you forget to del

Re: Question about the Foundation Framework

2009-02-19 Thread Michael
On Feb 19, 2009, at 8:11 AM, Mike Abdullah wrote: Also don't forget that it enables Apple to automatically move your app to use a completely different location in a future release of OS X. e.g. it could be some kind of encrypted directory accessible only to your app. Thanks Mike...did n

Re: Question about the Foundation Framework

2009-02-19 Thread Michael
thank You. On Feb 19, 2009, at 7:45 AM, Sherm Pendley wrote: And, of course, there's a very good meta-reason - you gain all of the above benefits without having to write, debug, or maintain the relevant code yourself. Apple already wrote it, so why reinvent that wheel? sherm--

Re: Question about the Foundation Framework

2009-02-19 Thread Michael
Thank you Mike, that's what I was looking for. Michael. On Feb 19, 2009, at 7:36 AM, Michael Ash wrote: On Thu, Feb 19, 2009 at 9:15 AM, Michael wrote: My question, having seen that the author creates and then stores these unique names in the NSTemporaryDirectory, is **why** one would choos

Re: Question about the Foundation Framework

2009-02-19 Thread Mike Abdullah
On 19 Feb 2009, at 15:36, Michael Ash wrote: On Thu, Feb 19, 2009 at 9:15 AM, Michael wrote: My question, having seen that the author creates and then stores these unique names in the NSTemporaryDirectory, is **why** one would choose that directory over, say, some locally created directory

Re: Question about the Foundation Framework

2009-02-19 Thread Sherm Pendley
On Thu, Feb 19, 2009 at 10:36 AM, Michael Ash wrote: > On Thu, Feb 19, 2009 at 9:15 AM, Michael wrote: > > My question, having seen that the author creates and then stores these > > unique names in the NSTemporaryDirectory, is **why** one would choose > that > > directory over, say, some locally

Re: Question about the Foundation Framework

2009-02-19 Thread Michael Ash
On Thu, Feb 19, 2009 at 9:15 AM, Michael wrote: > My question, having seen that the author creates and then stores these > unique names in the NSTemporaryDirectory, is **why** one would choose that > directory over, say, some locally created directory..is there a good OOP > reason for choosing tha

Question about the Foundation Framework

2009-02-19 Thread Michael
Hi all I am going through Kochan's new book to learn Obj-C and cocoa..trying to start with the basics...so hope you don't mind if I post some very basic questions Going through the exercises, I am currently stuck on this one as follows. "Given the NSPathUtilities.h function NSTempor

Cocoa, Finder Preferences & Blank Media (CD-R etc) ...

2009-02-19 Thread Mic Pringle
Hi, When I pop a blank cd/dvd Finder prompts a window asking what to do with it ie which application to use to open it. I also know that you can also set these preferences using the CD/DVD preference pane in System Preferences. However, what I'd like to know is if you can set these via Cocoa, and

NSArrayController empty after changing entityName

2009-02-19 Thread Alexander Reichstadt
Hi, I want to dynamically change the entity an arraycontroller is using depending on a selection in the UI. When I do I either end up with undefinedkeys because the remaining items from previous entity hang around, or if I explicitly say setContent:nil it only works once, after that it st

Re: Memory Leak, part I

2009-02-19 Thread James Montgomerie
On 19 Feb 2009, at 09:41, James Montgomerie wrote: If you don't, objects created within it and autoreleased will not get the change to be fully released until the loop finishes, Not quite sure how I came up with sentence construction like that. What I meant was, "If you don't, objects autor

Re: Memory Leak, part I

2009-02-19 Thread James Montgomerie
Presuming th rest of your code is following the rules, I can't see anything obviously wrong with this code leak-wise. Do these leaks build up every time you run the code you pasted, or is there just one in the app's lifetime? Can you post a full backtrace for the leak? (It may be easier t