Setting wantsLayer = YES; crashes on view load.

2009-06-01 Thread Kevin Ross
Hi everyone, I have a Core Data document based app that I've been working on for a while and I now want to change some of the view drawing to use CALayers. The trouble I'm having is that when I set a view's wantsLayer = YES, I end up getting EXC_BAD_ACCESS.This happens when I try to

Re: How to draw background image in my app window

2009-06-01 Thread cocoa learner
On Sun, May 31, 2009 at 9:37 PM, Andy Lee ag...@mac.com wrote: On May 31, 2009, at 8:51 AM, Uli Kusterer wrote: Another approach would be to try changing the class of your content view in Interface builder. Simply click the background of the window, that should show the content view in the

Re: Setting wantsLayer = YES; crashes on view load.

2009-06-01 Thread Michael Vannorsdel
Are you registering for any notifications? It looks like it's crashing while trying to notify an object. On Jun 1, 2009, at 12:31 AM, Kevin Ross wrote: Hi everyone, I have a Core Data document based app that I've been working on for a while and I now want to change some of the view

Adding NSMenuItem in IB

2009-06-01 Thread Vijay Kanse
Hello List, I was customizing my Application Main Menu and I deleted Edit menu from Main Menu. Now My Application needs to add Edit Menu in Main Menu. I am not able to drag NSMenu to main menu. and i am not able to do it by coding as well. So, how can i add this Menu Item ? Thanks.

Re: Adding NSMenuItem in IB

2009-06-01 Thread Kyle Sluder
On Mon, Jun 1, 2009 at 12:39 AM, Vijay Kanse vijay.ka...@avinashi.com wrote: I am not able to drag NSMenu to main menu. and i am not able to do it by coding as well. Really? There's an Edit menu in the IB library which you should be able to just drag to the main menu in your MainMenu.nib. If

NSTableView - setting row heights

2009-06-01 Thread Peter Hudson
Here is the setup ... Table view with 3 columns. In tableView:objectValueForTableColumn:row: I return an NSAttributedString, most of which use 2 different fonts. To set the row height I have implemented the delegate method :- -(float)tableView:(NSTableView *)tableView

Re: Adding NSMenuItem in IB

2009-06-01 Thread Vijay Kanse
Sorry for My Question, Actually i was dragging NSMenu from Library and I was trying to Add it as Sub Menu. Thanks For guiding me right way. On Mon, Jun 1, 2009 at 2:49 PM, Kyle Sluder kyle.slu...@gmail.com wrote: On Mon, Jun 1, 2009 at 12:39 AM, Vijay Kanse vijay.ka...@avinashi.com wrote:

Re: Several Questions

2009-06-01 Thread Ammar Ibrahim
On Mon, Jun 1, 2009 at 6:04 AM, Chris Hanson c...@me.com wrote: On May 30, 2009, at 11:18 PM, Ammar Ibrahim wrote: On Sun, May 31, 2009 at 6:16 AM, Chris Hanson c...@me.com wrote: The best way to ensure your daemon or agent is always running is to have it run via launchd. Start by

About [super dealloc];

2009-06-01 Thread Bright
Hi ,all In Cocoa, if there is [super init];, there will be [super dealloc]; correspondently at the end of this class. But I find that sometimes if there is not [super init];, there will be [super dealloc]; correspondently too. I puzzled. When should use the [super dealloc];? Could anyone list

Re: Several Questions

2009-06-01 Thread Jelle De Laender
why should your app stops responding? Do you want to detect time-outs (network-times, IO-timeouts, ...) or will your app be crap and full with bugs? On 01 Jun 2009, at 13:19, Ammar Ibrahim wrote: On Mon, Jun 1, 2009 at 6:04 AM, Chris Hanson c...@me.com wrote: On May 30, 2009, at 11:18

Re: About [super dealloc];

2009-06-01 Thread Graham Cox
On 01/06/2009, at 9:52 PM, Bright wrote: When should use the [super dealloc];? Could anyone list all of case. Whenever you have overridden -dealloc. Simple as that. When do you override dealloc? When there are instance member variables (ivars) that must be released when your object is

Re: About [super dealloc];

2009-06-01 Thread Jelle De Laender
You need to call [super dealloc] when you want to call the dealloc method of the super of your class. (logical, isn't?). Every class has default the next dealloc method: -(void)dealloc { [super dealloc]; } But, when you want to release classes you have initialised in your object,

Re: NSXMLParser - howto resolve entities defined in DTD

2009-06-01 Thread Keary Suska
On May 31, 2009, at 4:31 PM, Dominik Pich wrote: Hi, I use NSXMLParser to parse large XML files-- going good BUT :) I cant get the parser to resolve the external entities from the DTD. I googled and read documentation and older mails... and I did set parser.shouldResolveExternalEntities = YES

orderFrontStandardAboutPanel problem on Tiger - [NSCFDictionary setObject:forKey:]: attempt to insert nil value

2009-06-01 Thread Chris Jones
Hi, This is my first Cocoa App and I'm new to programming in anything other than scripting languages, so please bear with me. Goal: (embarrassingly simple) Show the about menu in a Tiger. Everything works find in Leopard. Problem: I'm developing a NSStatusbar background (LSUIElement = true) app.

Re: Problems choosing an encoding for Word generated html

2009-06-01 Thread Michael Ash
On Sun, May 31, 2009 at 7:08 PM, Ken Tozier kentoz...@comcast.net wrote: Hi I wrote an app that converts Word files into a simpler format by first converting from .doc to html using scripting and Word's Save as Web page command followed by using NSXMLDocument to extract the parts I need. I'm

Re: NSAttributedString -size Crash

2009-06-01 Thread Michael Ash
On Sun, May 31, 2009 at 7:30 PM, Kyle Sluder kyle.slu...@gmail.com wrote: On Sun, May 31, 2009 at 4:08 PM, Seth Willits sli...@araelium.com wrote: Alright, well, either way I know it's not happening because it's not in the console log. You don't know it's not nil unless you check yourself.  

Re: orderFrontStandardAboutPanel problem on Tiger - [NSCFDictionary setObject:forKey:]: attempt to insert nil value

2009-06-01 Thread Jim Correia
On Mon, Jun 1, 2009 at 7:29 AM, Chris Jones littlemaca...@gmail.com wrote: The error is: [NSCFDictionary setObject:forKey:]: attempt to insert nil value. And the StandardAboutPanel does not appear. [...] I don't think it could get more simple, but I can't see where I'm passing a nil value.

Re: NSTableView - setting row heights

2009-06-01 Thread Corbin Dunn
On Jun 1, 2009, at 2:50 AM, Peter Hudson wrote: The problem appears when I try to select a row. Rows are not selectable. When I try to select a row I get the error message NSConcreteMutableAttributedString addAttribute:value:range:: nil value Break on objc_exception_throw and look at the

Re: Several Questions

2009-06-01 Thread Benjamin Dobson
On 1 Jun 2009, at 12:58:17, Jelle De Laender wrote: why should your app stops responding? Do you want to detect time-outs (network-times, IO-timeouts, ...) or will your app be crap and full with bugs? There will always be unforeseen circumstances. Better safe than sorry, right? Just

Re: Several Questions

2009-06-01 Thread Michael Ash
On Mon, Jun 1, 2009 at 7:19 AM, Ammar Ibrahim ammar.ibra...@gmail.com wrote: Great, so I understand from what you're saying that I can launch a GUI app using launchd? I will look into it. Also, what if the application stops responding? Is that something that launchd can detect? As far as I

Re: NSURLConnection sendSynchronousRequest: crashes since, upgrading to 10.5.7

2009-06-01 Thread Dennis Hartigan-O'Connor
Thanks, Andrew, I believe that Colin Gray got to the bottom of this at Stack Overflow: http://stackoverflow.com/questions/916718/nsurlconnection-crashing-under-10-5-7 Dennis Andrew Farmer wrote: On 27 May 2009, at 18:20, Dennis Hartigan-O'Connor wrote: I have a very similar problem: my

QTMovieLayer and movie controls

2009-06-01 Thread Ramakrishna Vavilala
I have layer hosting view which hosts a single layer with several child layers. Some child layers can be QTMovieLayers to display quick time movies. Things work fine. Now my main issue is that I want to add video controls (Play, Pause, time Slider) to control the movie: Is there an already

highlighting menu item in main menu bar

2009-06-01 Thread kvic...@pobox.com
my app has a scripts menu item (in the main menu bar). the items in this menu correspond to applescript files the user has placed in my application support folder. when the user selects one of these menu items, i execute the appropriate script. i execute the script in a (sub) task (NSTask). i

Cancel button in NSSearchField

2009-06-01 Thread kvic...@pobox.com
my app contains an NSSearchField in the toolbar of the various document windows. and i have the various predicates of the search field bound to iVars in my app. additionally, i have my own predicate builder that lets the user build complex search predicates. when the user has built a complex

Re: Several Questions

2009-06-01 Thread Todd Heberlein
why should your app stops responding? Do you want to detect time-outs (network-times, IO-timeouts, ...) or will your app be crap and full with bugs? I wish my code never had infinite loops (Apple's address:) or multithreaded deadlocks or other types of bugs... but sometimes sh*t happens.

Re: QTMovieLayer and movie controls

2009-06-01 Thread David Duncan
On Jun 1, 2009, at 9:29 AM, Ramakrishna Vavilala wrote: Now my main issue is that I want to add video controls (Play, Pause, time Slider) to control the movie: Is there an already available solution for it? Nothing that I'm aware of. I have the following options:- 1. Create a sub-view

Re: NSTableView - setting row heights

2009-06-01 Thread Corbin Dunn
Yup -- that makes it tough to figure out with that bt, since the problem doesn't appear to be in your code. Can you post your objectValueXXX method implementation? Can you also show the string in your array that you are setting as the object value? (ie: print it in the debugger or

Re: NSURLConnection sendSynchronousRequest: crashes since, upgrading to 10.5.7

2009-06-01 Thread Jeff Johnson
I'm not sure that this is the full story. My app Vienna implements connection:willSendRequest: redirectResponse: at AsyncConnection.m: 396 http://vienna-rss.svn.sourceforge.net/viewvc/vienna-rss/trunk/2.3.0/AsyncConnection.m?view=markup However, I'm seeing crash reports from users on 10.5.7,

Re: highlighting menu item in main menu bar

2009-06-01 Thread Peter Ammon
Hi Ken, The menu item unhighlights after the menu item's action is finished. If user input should be blocked while the script is running, then you should register for the NSTaskDidTerminateNotification and then drive the main run loop forwards from within your menu item's action method,

Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety

2009-06-01 Thread Sean McBride
On 5/29/09 2:25 PM, Ben Trumbull said: You can download the debug version of Core Data from ADC and use the multithreading assertions. Not if you're using 10.5.7 you can't. :( The 'Debug and Profile Libraries' for 10.5.7 are still unavailable. --

Re: highlighting menu item in main menu bar

2009-06-01 Thread kvic...@pobox.com
hi peter, thanx for the reply. i believe i understand your reply. i've never driven the run loop forward by hand before, but i think i could figure that out. but before i embark down that path, some quick questions that perhaps you could help me with: 1) if the executing script (from the

Re: QTMovieLayer and movie controls

2009-06-01 Thread Klaus Backert
On 1. Jun 2009, at 18:29, Ramakrishna Vavilala wrote: I have layer hosting view which hosts a single layer with several child layers. Some child layers can be QTMovieLayers to display quick time movies. Things work fine. Now my main issue is that I want to add video controls (Play, Pause,

Fwd: Making an undefined Spotlight NSPredicate?

2009-06-01 Thread Nick Zitzmann
I asked this a while back on the Spotlight mailing list and never received a reply. Maybe someone here knows. Begin forwarded message: From: Nick Zitzmann n...@chronosnet.com Date: May 20, 2009 6:38:36 PM MDT To: spotlight-...@lists.apple.com Subject: Making an undefined Spotlight

NSMapTable C function API equivalent

2009-06-01 Thread George King
I just read in the NSMapTable Class Reference that I can use the class to map to and from pointers to C structs: You can configure an NSMapTable instance to operate on arbitrary pointers and not just objects, although typically you are encouraged to use the C function API for void *

Re: NSMapTable C function API equivalent

2009-06-01 Thread Seth Willits
Can somebody point me to the documentation for the C function API referred to above? I was hoping to find a CFMapTable but I suppose that would be too obvious :) Type NSMapTable into Xcode and command-double click on it to open NSMapTable.h. The functions are all in the header. They're

Re: NSXMLParser - howto resolve entities defined in DTD

2009-06-01 Thread Dominik Pich
:) thanks but . it doesnt work for me. I read all that about NSParser just calling you back. I implemented all the delegates BUT I dont seem to be getting an appropriate callback for the Entities in the DTD, although I did set 'shouldResolveExternalEntities = YES' I get that messages

Re: About [super dealloc];

2009-06-01 Thread Greg Parker
On Jun 1, 2009, at 4:59 AM, Graham Cox wrote: On 01/06/2009, at 9:52 PM, Bright wrote: When should use the [super dealloc];? Could anyone list all of case. Whenever you have overridden -dealloc. Simple as that. Pretty much. If you override +alloc then you may or may not want to call

Re: Adding NSMenuItem in IB

2009-06-01 Thread Jonathan Hess
On Jun 1, 2009, at 2:59 AM, Vijay Kanse wrote: Sorry for My Question, Actually i was dragging NSMenu from Library and I was trying to Add it as Sub Menu. Ah, the problem here is that NSMenu instances contain an array of NSMenuItem instances. NSMenuItem instances can each contain a

Re: Several Questions

2009-06-01 Thread Todd Heberlein
FYI: I was looking through some Darwin mailing lists archives, and I ran across this posting about launchd at WWDC that may be of interest to this thread: Hello all, If you're attending WWDC and are interested in the BSD-level technologies in Mac OS X, I'm giving a talk on launchd this

Re: Setting wantsLayer = YES; crashes on view load.

2009-06-01 Thread Kevin Ross
Thanks Michael, I do have a few notifications registered throughout the app, but nothing that is connected with any of the CALayers or views. This seems to happen no matter which view or nib I use. I'm trying to see if I can isolate the notification that is causing the crash. On Jun

Re: How determine if file is in Trash, given Path or Alias

2009-06-01 Thread Sean McBride
On 5/28/09 3:49 PM, Martin Wierschin said: This is a nice trick, I wasn't aware of that function, thanks. Perhaps a minor improvement (one call instead of two): - (BOOL) isTrashedFileAtPath:(NSString*)path { Boolean inTrash = false; const UInt8* utfPath = (UInt8*)[path UTF8String];

Re: NSXMLParser - howto resolve entities defined in DTD

2009-06-01 Thread Jeffrey Oleander
On Mon, 2009/06/01, Keary Suska cocoa-...@esoteritech.com wrote: From: Keary Suska cocoa-...@esoteritech.com Subject: Re: NSXMLParser - howto resolve entities defined in DTD To: Cocoa-Dev (Apple) Cocoa-dev@lists.apple.com Date: Monday, 2009 June 1, 10:16 On 2009 May 31, at 4:31 PM, Dominik

Re: NSURLConnection sendSynchronousRequest: crashes since, upgrading to 10.5.7

2009-06-01 Thread Dennis Hartigan-O'Connor
Thanks, Jeff, others are also saying that implementing this method doesn't always fix the problem. Which makes sense: presumably Apple's implementation amounts to return request;, so it is hard to see how that method could be at the root of the problem. I hope everybody is filing bug reports

Re: Custom view resizing

2009-06-01 Thread Robert Olivier
Thanks Graham, While I was waiting for my post to get moderated I did implement the data model method of calculating the view bounds and thats working great. rjo On May 29, 2009, at 11:55 PM, Graham Cox wrote: On 29/05/2009, at 10:14 AM, Robert Olivier wrote: I'm a new Cocoa

NSFileManager's copyItemAtPath:toPath:error: syslogging every directory it finds?

2009-06-01 Thread Jim Turner
Hopefully this has a simple answer but it seems now that when I call copyItemAtPath:toPath:error: to copy a folder to another location, I get this in the console: 6/1/09 3:48:28 PM /Users/jimt/Source/MyApp/trunk/build/Debug/MyApp.app/Contents/MacOS/MyApp[29625] reading from

SQL store, GC apps, statement is still active exception, setReturnsObjectsAsFaults:NO

2009-06-01 Thread Sean McBride
Hi all, Now that 10.5.7 (allegedly) fixes the incompatibilities between the SQL store and GC apps, I have been trying to switch from XML to SQL. Most problems I've fixed, but I'm getting an exception: statement is still active See backtrace below. I've search the archives of course, and see

gcc parsing error?

2009-06-01 Thread Dave DeLong
Hey everyone, I'm writing a simple test project to try and isolate some unexpected behavior, and found more unexpected behavior (not what I was looking for). I'm trying to use a simple NSAssert macro, like so: NSAssert(NO, [NSString stringWithFormat:@Caught unexpected exception: %@,

Re: gcc parsing error?

2009-06-01 Thread Stephen J. Butler
On Mon, Jun 1, 2009 at 4:33 PM, Dave DeLong davedel...@me.com wrote: I'm writing a simple test project to try and isolate some unexpected behavior, and found more unexpected behavior (not what I was looking for). I'm trying to use a simple NSAssert macro, like so: NSAssert(NO, [NSString

Re: gcc parsing error?

2009-06-01 Thread Dave DeLong
Oh good call; I didn't think of that. That WILL compile correctly. Dave On Jun 1, 2009, at 3:42 PM, Stephen J. Butler wrote: Ugg. Sounds like a bug. What happens when you do this: NSAssert(NO, ([NSString stringWithFormat:@Caught unexpected exception: %@, e]));

Re: NSXMLParser - howto resolve entities defined in DTD

2009-06-01 Thread Greg Guerin
Dominik Pich wrote: I get that messages asking me to PROVIDE a substitution for an entity But I never get the messages FOR the declaration of the entities, so I dont know WHAT to return as data. When something like this happens, i.e. I've set my delegate, but it's not getting called, it

Re: gcc parsing error?

2009-06-01 Thread Ken Thomases
On Jun 1, 2009, at 4:33 PM, Dave DeLong wrote: I'm writing a simple test project to try and isolate some unexpected behavior, and found more unexpected behavior (not what I was looking for). I'm trying to use a simple NSAssert macro, like so: NSAssert(NO, [NSString

Re: gcc parsing error?

2009-06-01 Thread Nick Zitzmann
On Jun 1, 2009, at 3:33 PM, Dave DeLong wrote: Is this expected/documented behavior? Yes, because the preprocessor relies on the commas and isn't aware of the underlying language. Use NSAssert1/NSAssert2, etc. or wrap the call in parentheses as already suggested. Nick Zitzmann

Re: How determine if file is in Trash, given Path or Alias

2009-06-01 Thread Gwynne Raskind
On Jun 1, 2009, at 4:31 PM, Sean McBride wrote: This is a nice trick, I wasn't aware of that function, thanks. Perhaps a minor improvement (one call instead of two): - (BOOL) isTrashedFileAtPath:(NSString*)path { Boolean inTrash = false; const UInt8* utfPath = (UInt8*)[path

re: SQL store, GC apps, statement is still active exception, setReturnsObjectsAsFaults:NO

2009-06-01 Thread Ben Trumbull
Now that 10.5.7 (allegedly) fixes the incompatibilities between the SQL store and GC apps, I have been trying to switch from XML to SQL. Most problems I've fixed, but I'm getting an exception: Yes, 10.5.7 fixes all the known issues with (GC, NSDocument, NSSQLiteStore). The

Re: NSXMLParser - howto resolve entities defined in DTD

2009-06-01 Thread Keary Suska
On Jun 1, 2009, at 1:43 PM, Dominik Pich wrote: :) thanks but . it doesnt work for me. I read all that about NSParser just calling you back. I implemented all the delegates BUT I dont seem to be getting an appropriate callback for the Entities in the DTD, although I did set

Re: How determine if file is in Trash, given Path or Alias

2009-06-01 Thread Martin Wierschin
const UInt8* utfPath = (UInt8*)[path UTF8String]; OSStatus err = DetermineIfPathIsEnclosedByFolder (kOnAppropriateDisk, kTrashFolderType, utfPath, false, inTrash); For the archives: 2 more problems: a) use fileSystemRepresentation not UTF8String. I initially considered that, but the

Re: SQL store, GC apps, statement is still active exception, setReturnsObjectsAsFaults:NO

2009-06-01 Thread Sean McBride
On 6/1/09 3:01 PM, Ben Trumbull said: Now that 10.5.7 (allegedly) fixes the incompatibilities between the SQL store and GC apps, I have been trying to switch from XML to SQL. Most problems I've fixed, but I'm getting an exception: Yes, 10.5.7 fixes all the known issues with (GC, NSDocument,

Re: How determine if file is in Trash, given Path or Alias

2009-06-01 Thread Sean McBride
On 6/1/09 3:03 PM, Martin Wierschin said: const UInt8* utfPath = (UInt8*)[path UTF8String]; OSStatus err = DetermineIfPathIsEnclosedByFolder (kOnAppropriateDisk, kTrashFolderType, utfPath, false, inTrash); For the archives: 2 more problems: a) use fileSystemRepresentation not UTF8String.

Re: NSXMLParser - howto resolve entities defined in DTD

2009-06-01 Thread Keary Suska
On Jun 1, 2009, at 4:03 PM, Keary Suska wrote: All external entities must be declared in the core XML. If they aren't, your XML is not well-formed. Correction, this would not be the case for declarations in a DTD, which are part of the external subset, so the first delegate message

NSToolbar: notification of change?

2009-06-01 Thread David Reitter
Having subclassed NSToolbar, I am now trying to get a notification of changes done by the user using the customization palette. This works fine for the removal of items (toolbarDidRemoveItem:), but I can't see a way to get notified of added/moved items after the fact. The only notification I

Garbage Collection Crash using NSImage

2009-06-01 Thread Kristof Van Landschoot
This piece of code was split off from a project I am working on. It consistently reproduces a garbage collection error on my Mac OS 10.5.7 and sometimes crashes. I have been looking at it for too long so my question is: does anybody else see why this would give errors when garbage collection is

Re: NSToolbar: notification of change?

2009-06-01 Thread Keary Suska
On Jun 1, 2009, at 4:53 PM, David Reitter wrote: Having subclassed NSToolbar, I am now trying to get a notification of changes done by the user using the customization palette. This works fine for the removal of items (toolbarDidRemoveItem:), but I can't see a way to get notified of

Referring to file by Alias ^or^ path

2009-06-01 Thread Jerry Krinock
My app needs a reference to files that may or may not exist (yet). When the file exists, I prefer to use the Alias because it tracks if the user moves it, etc. But if the file does not exist yet, my + [NSData aliasRecordFromPath:] method (shown below) returns nil. It is implied but not

CF/NSNotifications on the same thread not working.

2009-06-01 Thread Robert Monaghan
Hi Everyone, I am trying to post a notification (a CFNotificationCenterPostNotification) on a thread from a CFNotificationCenterGetLocalCenter, to a NSNotificationCenter defaultCenter. All on the same thread, spun off from my main thread. The observer that I am adding, never gets called.

Re: Referring to file by Alias ^or^ path

2009-06-01 Thread James Walker
Jerry Krinock wrote: My app needs a reference to files that may or may not exist (yet). When the file exists, I prefer to use the Alias because it tracks if the user moves it, etc. But if the file does not exist yet, my +[NSData aliasRecordFromPath:] method (shown below) returns nil. It is

Thin navigation tool bars in landscape

2009-06-01 Thread Mike Manzano
How do you get the thin-style bars in landscape like Mail has? Mine doesn't do that automatically. I haven't been able to find an API or developer doc that mentions it. Mike Manzano Sent while mobile ___ Cocoa-dev mailing list

End Of Method Releasing Order?

2009-06-01 Thread Chunk 1978
does it matter which order objects are released at the end of a method? example: -=-=-=-=- - (void)applicationWillTerminate:(NSNotification *)notification { FourLines *fourLines = [[FourLines alloc] init]; fourLines.field1 = field1.text; fourLines.field2 =

Re: Several Questions

2009-06-01 Thread Todd Heberlein
Great, so I understand from what you're saying that I can launch a GUI app using launchd? Out of curiosity, I just tried this. I created a basic Cocoa app (I made no changes to it, I just built the default skeleton application that Xcode creates for you). The project is in the

Re: End Of Method Releasing Order?

2009-06-01 Thread WT
I don't think so. Releasing objects merely decreases their retain count. It's up to the Obj-C runtime system to figure out in what order to actually free the memory allocated for those objects. In other words, we are not the ones deciding how and when to deallocate memory allocated for

Re: End Of Method Releasing Order?

2009-06-01 Thread Wade Tregaskis
does it matter which order objects are released at the end of a method? example: -=-=-=-=- - (void)applicationWillTerminate:(NSNotification *)notification { FourLines *fourLines = [[FourLines alloc] init]; fourLines.field1 = field1.text; fourLines.field2 =

Re: NSToolbar: notification of change?

2009-06-01 Thread Peter Ammon
On Jun 1, 2009, at 3:53 PM, David Reitter wrote: Having subclassed NSToolbar, I am now trying to get a notification of changes done by the user using the customization palette. This works fine for the removal of items (toolbarDidRemoveItem:), but I can't see a way to get notified of

Re: NSFileManager's copyItemAtPath:toPath:error: syslogging every directory it finds?

2009-06-01 Thread Chris Parker
On 1 Jun 2009, at 1:54 PM, Jim Turner wrote: Hopefully this has a simple answer but it seems now that when I call copyItemAtPath:toPath:error: to copy a folder to another location, I get this in the console: 6/1/09 3:48:28 PM

Re: End Of Method Releasing Order?

2009-06-01 Thread Shawn Erickson
On Mon, Jun 1, 2009 at 6:05 PM, WT jrca...@gmail.com wrote: I don't think so. Releasing objects merely decreases their retain count. It's up to the Obj-C runtime system to figure out in what order to actually free the memory allocated for those objects. In other words, we are not the ones

Re: Dynamically getting the type of ivars

2009-06-01 Thread Dave DeLong
I just remembered that I never made good on my promise to post why I needed this. In a nutshell, I wrote some code that lets me add basic NSCoding compliance to any class at runtime. The only requirement is that the target class has to be KVC-compliant (since I pull values in and out

Re: NSToolbar: notification of change?

2009-06-01 Thread Graham Cox
On 02/06/2009, at 8:53 AM, David Reitter wrote: Having subclassed NSToolbar, I am now trying to get a notification of changes done by the user using the customization palette. This works fine for the removal of items (toolbarDidRemoveItem:), but I can't see a way to get notified of

Re: 64-bit, 10.5/10.4, SDK build settings

2009-06-01 Thread Greg Guerin
Alex Sheh wrote: My requirements are the following: - On a machine running 10.5 or later, I need to run 64-bit code. and: ... I need to run a 64-bit binary (the one that was built against 10.5 SDK) when the user is running Leopard 10.5, ... This doesn't make sense to me. If the user is

Re: Setting wantsLayer = YES; crashes on view load.

2009-06-01 Thread Kevin Ross
I looked at the msgSends dump of everything after setWantsLayer, and at the end it looks like a NSAutoreleasePool is being created right before a CAContext is initialized. It then throws an exception right after NSCFString NSCFString copyWithZone:. + NSAutoreleasePool NSObject alloc +

Re: 64-bit, 10.5/10.4, SDK build settings

2009-06-01 Thread Greg Guerin
Sorry, wrong list. Please ignore prior post. -- GG ___ 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)lists.apple.com

Re: NSToolbar: notification of change?

2009-06-01 Thread David Reitter
On Jun 1, 2009, at 7:40 PM, Keary Suska wrote: You can know when the customization palette is invoked, so all you need to check for is when it is closed and then check for changes. You could take a snapshot at -runCustomizationPalette:, then set a timer that checks

Re: Adding an application to the login items

2009-06-01 Thread Misha Gonodanov
You are not creating URL correctly - basically CFURLRef.alloc().initWithString_() will create it by calling CFURLCreateWithString() while it should be created by CFURLCreateWithFileSystemPath(). I do not know the name of corresponding python method. Misha On Dec 3, 2008, at 4:36 PM,

Keeping track of CGAffineTransform's action

2009-06-01 Thread Pierre Berloquin
I keep moving an UIImageView with CGAffineTransformTranslate through a timer. That doesn't affect the view's frame and bounds. Is there a variable somewhere that I can read to keep track of the transform or must I create my own? Thanks, Pierre ___

Re: NSToolbar: notification of change?

2009-06-01 Thread Graham Cox
On 02/06/2009, at 1:06 PM, David Reitter wrote: updating the toolbar regularly from the internal (Lisp-level) representation OK, but wouldn't -validateUserInterfaceItem: be appropriate for this? Since you're only interested in the items actually in the bar, then you can validate them

NSOutlineView sometimes truncates label

2009-06-01 Thread David
I have an outline view where the first column are file names. There is absolutely no processing of the name going on in my code. It uses a data source delegate. The method outlineView:objectValueForTableColumn:byItem: is returning an NSString * with the proper value. Everything has been working

Re: NSOutlineView sometimes truncates label

2009-06-01 Thread Graham Cox
On 02/06/2009, at 1:24 PM, David wrote: If I take out some xx's it works. Many other random changes will make it work, such as changing the Xs to 0s. Some cases will cause it to truncate at a later period, but it always truncates at a period. This is extremely weird. Any suggestions

Re: NSOutlineView sometimes truncates label

2009-06-01 Thread David Melgar
Great! Thanks! That was it. On Jun 1, 2009, at 11:31 PM, Graham Cox wrote: On 02/06/2009, at 1:24 PM, David wrote: If I take out some xx's it works. Many other random changes will make it work, such as changing the Xs to 0s. Some cases will cause it to truncate at a later period, but it

Re: NSToolbar: notification of change?

2009-06-01 Thread Andy Lee
Dunno if this would work, but... how about doing setAutosavesConfiguration:YES and observing user defaults? --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Accessing Cocoa/Quartz from a dynamic library function

2009-06-01 Thread Mikael Grev
Hello all, I'm new to this Mac development thing, but I'm old when it comes to developing in general. I'm trying to create a dylib with a function that will ultimately notify me of screen refresh rectangles. It is all working when I run it as an application (with a main method) but

several questions about saving a bundle in an NSDocument based application

2009-06-01 Thread Matthew Jeorrett
Hi, I have successfully implemented the NSDocument architecture in my application and have implemented saving and loading documents by overriding the dataOfType:error: and readFromData:ofType:error: methods. I now want to be able to export my document into a folder selected by the user. The

Re: Accessing Cocoa/Quartz from a dynamic library function

2009-06-01 Thread Bill Bumgarner
On Jun 1, 2009, at 1:38 PM, Mikael Grev wrote: CGRegisterScreenRefreshCallback (MyScreenRefreshCallback, NULL); From the docs: The callback function you register is invoked only if your application has an active event loop. The callback is invoked in the same thread of execution that is

Re: How determine if file is in Trash, given Path or Alias

2009-06-01 Thread Quincey Morris
On Jun 1, 2009, at 14:53, Gwynne Raskind wrote: On Jun 1, 2009, at 4:31 PM, Sean McBride wrote: This is a nice trick, I wasn't aware of that function, thanks. Perhaps a minor improvement (one call instead of two): - (BOOL) isTrashedFileAtPath:(NSString*)path { Boolean inTrash = false;

Re: How determine if file is in Trash, given Path or Alias

2009-06-01 Thread Michael Ash
On Mon, Jun 1, 2009 at 6:40 PM, Sean McBride s...@rogue-research.com wrote: But it's not a huge issue: fileSystemRepresentation and UTF8String give the same thing 99% of the time. And more importantly, the 1% of the time where they give you different results, they still give you *equivalent*

Re: several questions about saving a bundle in an NSDocument based application

2009-06-01 Thread Graham Cox
On 02/06/2009, at 11:40 AM, Matthew Jeorrett wrote: I have successfully implemented the NSDocument architecture in my application and have implemented saving and loading documents by overriding the dataOfType:error: and readFromData:ofType:error: methods. I now want to be able to export

Re: several questions about saving a bundle in an NSDocument based application

2009-06-01 Thread Michael Ash
On Tue, Jun 2, 2009 at 12:39 AM, Graham Cox graham@bigpond.com wrote: On 02/06/2009, at 11:40 AM, Matthew Jeorrett wrote: I have successfully implemented the NSDocument architecture in my application and have implemented saving and loading documents by overriding the dataOfType:error: