Re: simple string to NSData question

2008-08-07 Thread Chris Suter
On Fri, Aug 8, 2008 at 3:49 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > On Aug 7, 2008, at 2:15 PM, phil swenson wrote: > > I'm trying to parse an xml file, so to get started I put the xml in a >> String: >> >> NSString *xml = @"> >> encoding=\"UTF-8\"?>LarryFurg"; >> >> >> Now I need to move t

Re: simple string to NSData question

2008-08-07 Thread Ken Thomases
On Aug 7, 2008, at 2:15 PM, phil swenson wrote: I'm trying to parse an xml file, so to get started I put the xml in a String: NSString *xml = @"encoding=\"UTF-8\"?>LarryFurgperson>"; Now I need to move this to a NSXMLDocument, which takes an NSData. Looking at NSData, I see there is a metho

Re: How to get array of characters from NSString

2008-08-07 Thread Nick Zitzmann
On Aug 7, 2008, at 10:27 PM, SridharRao M wrote: Hi,I want to retrieve characters from NSString Can any one guide me how to do it. What do you mean by that? If you want to translate an NSString into a C char array, then use -UTF8String. If you want to get a range of 2- byte characters f

Re: Cocoa Dev Style: Using Class versus Object Methods

2008-08-07 Thread Graham Cox
On 8 Aug 2008, at 3:08 am, Lee, Frederick wrote: Greetings: I just came across a NSObject subclass written by someone, that contains a couple of date/Time-processing methods (stringToDate, visa-versa). The methods were all class-level methods (+) vs (-); and hence, didn't require the famil

Basic Obj-C Question on Memory and Strings

2008-08-07 Thread Matt Keyes
Hello again, I have two basic Obj-C string question, please see the code below: //.h file @interface SomeClass : NSObject { @private NSMutableString *_someString; } @property (nonatomic, retain) NSMutableString *someString; -(void)DoTheStringThing:(NSString *)aString; @end //.m file:

Re: Cocoa Dev Style: Using Class versus Object Methods

2008-08-07 Thread Nick Zitzmann
On Aug 7, 2008, at 11:08 AM, Lee, Frederick wrote: 1) why use instantiated objects versus classes (via class methods)? Because class methods other than +new return autoreleased objects, which makes non-GC memory management a little bit easier. 2) Are classes stored in the stac

Re: How to tell whether an executable supports GC?

2008-08-07 Thread Chris Suter
On Fri, Aug 8, 2008 at 2:48 PM, André Pang <[EMAIL PROTECTED]> wrote: > Hi all, is there a reasonably easy way to programmatically determine > whether a particular executable on-disk supports garbage collection? Cocoa > methods aren't necessary; all C functions are welcome. Poking around in an >

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-07 Thread Jonathan Hess
Hey Cyril - How are you adding the formatter to the text field? After you add the formatter, does it appear as a child of the text field in the document outline view? If not, that's your problem. Interface Builder maintains a tree of all of the objects in the document. If you do something l

Need pointers on web service communication from the iPhone

2008-08-07 Thread Matt Keyes
Hello, this is my first post. I am a C/C++ developer that has only recently begun to explore Obj-C and its nuances. The need at hand is to develop an application on the iPhone that will be able to communicate to a SOAP XML web service on a Microsoft .NET server. In .NET, the SOAP communicatio

Re: How to get array of characters from NSString

2008-08-07 Thread Andrew Merenbach
Not to reply to myself, but -- erm -- that second one should be - [NSString getCharacters:range:] -- with a second colon (this one after "range"). Also, sorry for top-posting, but I had to since I neglected to bottom post in my original reply. Cheers, Andrew On Aug 7, 2008, at 9:53

Re: How to get array of characters from NSString

2008-08-07 Thread Andrew Merenbach
Hi! Would -[NSString getCharacters:] or -[NSString getCharacters:range] (both of which return a unichar array), or better yet -[NSString getCString:maxLength:encoding:] work for your purposes? Even better still, perhaps one of - [NSString cStringUsingEncoding:] - [N

How to tell whether an executable supports GC?

2008-08-07 Thread André Pang
Hi all, is there a reasonably easy way to programmatically determine whether a particular executable on-disk supports garbage collection? Cocoa methods aren't necessary; all C functions are welcome. Poking around in an executable's Mach-O headers is fine too, but I'm not sure what to look

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 8 Aug 2008, at 09:04, Sean McBride wrote: Gerriet M. Denkmann ([EMAIL PROTECTED]) on 2008-8-8 9:49 PM said: some_type a; NSValue *data = [ NSValue value: &a withObjCType: @encode (some_type) ]; followed by: some_type b; [ data getValue: &b ]; is unsafe, da

How to get array of characters from NSString

2008-08-07 Thread SridharRao M
Hi,I want to retrieve characters from NSString Can any one guide me how to do it. Ex: NSString *ob=@"TEST Object"; Now how to retrieve the "Test Object " value into my Char Array. Regards, Sri. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

[Moderator] Moderation times should be back to normal

2008-08-07 Thread Scott Anguish
The moderation delays over the past three days should no longer be an issue. Thanks again for you patience. sctot [moderator] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

shouldShowHelp in cocoa pde does not work in Tiger

2008-08-07 Thread Ronaly Agdeppa
hi, I'm creating a cocoa pde. You can see in the print dialog, a question mark button which opens the help viewer when clicked. We can display our custom help there using shouldShowHelp method, provided that we have succesfully registered the help. That method works fine in Leopard but not in Tige

NSMultipleTextSelectionPboardType not working

2008-08-07 Thread André Pang
Hi, I'm trying to read some NSMultipleTextSelectionPboardType data off the pasteboard: NSData* data = [pboard dataForType:NSMultipleTextSelectionPboardType]; I've verified that the pasteboard is holding the data using - [NSPasteboard availableTypeFromArray:], but I'm encountering two oddi

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Mark Allan
Which "options" argument are you talking about? I just do the following and it works as advertised. [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:parentDirOfFile destination:@"" files:[NSArray arrayWithObject:@"fileName"] tag:nil] The only slightly

simple string to NSData question

2008-08-07 Thread phil swenson
I'm a newbie (haven't done C in years, been using Java, Ruby mostly), so sorry if this is a dumb question. I'm trying to parse an xml file, so to get started I put the xml in a String: NSString *xml = @"LarryFurg"; Now I need to move this to a NSXMLDocument, which takes an NSData. Looking at N

Does [NSApp setApplicationIconImage] leak memory?

2008-08-07 Thread Mark Allan
Hi all, Before I file a bug report against this, I just thought I'd check I'm not being monumentally stupid first! I'm trying to animate my app's Dock icon, which works fine and looks great, but unfortunately, it appears to leak memory like crazy. Every time I call [NSApp setApplicationIconI

RE: how to create the special modal dialog

2008-08-07 Thread pan xuan
Thanks for your link. It helped. Pan> CC: cocoa-dev@lists.apple.com> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> Subject: Re: how to create the special modal dialog> Date: Wed, 6 Aug 2008 20:33:33 -0400> > Pan,> > I think you're referring to are "sheets".> > See:> http://developer.appl

Re: Command Line Argument - Choosing a Style

2008-08-07 Thread hac
On Wed, Aug 6, 2008 at 9:00 PM, Jonathan deWerd <[EMAIL PROTECTED]>wrote: > I would make plugins of a different type: standard cocoa bundles (there are > a handful of tutorials on google). This way, people could install and > uninstall using the finder (a little known but helpful feature of the in

Re: How to use a button to update an application with a text field value

2008-08-07 Thread Tron Thomas
I attempted to try out what you were suggesting to see how well I understood it. I got a compiler warning that said my controller class may not respond to -selection. Also, in the case where a controller might have selector that take multiple arguments, I'm not sure how I could provide the ar

Re: NSOperationQueue Memory Leak

2008-08-07 Thread Brock Batsell
Inside your for loop you are allocating 10,000 NSInvocationOperation objects without adding them to your autorelease pool. Adding [processor autorelease]; as the last line of the for loop killed memory leakage for me. Without it my real memory would jump 10 MB each time queueOperations: ran, with

Application control

2008-08-07 Thread falcon
Hello, I am trying to repeat my question in other words. :) I have application written using Qt library. I have a network of about 40 mac minis. Now I have to connect to each of these macs using ARD and change one parameter on main window of the application. I have tried to use UI scripti

Cocoa Dev Style: Using Class versus Object Methods

2008-08-07 Thread Lee, Frederick
Greetings: I just came across a NSObject subclass written by someone, that contains a couple of date/Time-processing methods (stringToDate, visa-versa). The methods were all class-level methods (+) vs (-); and hence, didn't require the familiar alloc & init instantiation methods. I've bee

Re: Bindings to display an NSArray of NSStrings as a single NSString?

2008-08-07 Thread Hamish Allan
On Wed, Aug 6, 2008 at 3:27 AM, Erik Buck <[EMAIL PROTECTED]> wrote: > Um, why not just bind to "values.description" the -description method of > NSArray will return a string containing comma separated descriptions of the > contained objects. It will even work if the contained objects aren't all

Re: How to debug a corrupted stack

2008-08-07 Thread Brian Stern
On Aug 7, 2008, at 9:49 PM, Gerriet M. Denkmann wrote: Or does anyone have a better idea? Define your own struct or Objective-C class that has the same members as UTCDateTime. Copy the values from a UTCDateTime to your struct or class. Encode/Decode your struct or class from NSValue. W

Re: how to have a pop up menu from an ordinary button?

2008-08-07 Thread Rua Haszard Morris
On Aug 7, 2008, at 2:53 PM, Rua Haszard Morris wrote: I am trying to implement a mini-size, square bevel button that pops up a menu, i.e. a popup button with a square appearance and mini size, but have not found a way to achieve this. NSPopupButton does not support square button appearance,

Problem with friend function and gcc 4.2 with objective-c++

2008-08-07 Thread Ken Worley
Hi all, I'm using Xcode 3.1 and just switched to gcc 4.2 from 4.0, but I've run into a problem with friend functions when compiling in objective-c+ +. I contrived an example that illustrates the problem: 1. Created new Cocoa project 2. Forced compilation of all files to use objective-c++ 3.

Re: Does NSTextField conform to NSEditor (commitEditing specifically)?

2008-08-07 Thread Sean McBride
Joel Norvell ([EMAIL PROTECTED]) on 2008-8-7 7:07 PM said: >I'm no expert on the "NSEditor informal protocol," but there was a >recent thread in which Ken Thomases reply (which I've quoted below) >might be of help to you. > >http://www.cocoabuilder.com/archive/message/cocoa/2008/7/25/214002 Joel,

Re: autorelease CGImageRef?

2008-08-07 Thread Peter N Lewis
At 8:24 AM -0700 7/8/08, Chris Hanson wrote: If you build with the Mac OS X 10.5 SDK, you should be able to use NSMakeCollectable since it's declared as an inline function. The earliest release of Mac OS X you're targeting is a function of the Mac OS X Deployment Target build setting, not the

Re: How to debug a corrupted stack

2008-08-07 Thread Sean McBride
Gerriet M. Denkmann ([EMAIL PROTECTED]) on 2008-8-8 9:49 PM said: > some_type a; > NSValue *data = [ NSValue value: &a withObjCType: @encode >(some_type) ]; >followed by: > some_type b; > [ data getValue: &b ]; >is unsafe, dangerous and strictly to be avoided - especially

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 8 Aug 2008, at 01:59, Johannes Fortmann <[EMAIL PROTECTED]> wrote: The problem here is that UTCDateTime is defined with #pragma pack 2 in effect. That means the compiler packs with an alignment of 2, so the whole structure has 8 bytes. The proper alignment (4) results in 12 bytes. Since th

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-07 Thread Nicolas Zinovieff
Well, I can't speak for James, but I have forced the thumbnail creation to have at most 10 files opened at the same time, and it doesn't make a difference... I could understand a memory allocation issue, if the app didn't take roughly 100 megs of RAM. And besides, I can see there's a differen

Parse an HTTP Query String into a Dictionary

2008-08-07 Thread Jerry Krinock
Before I write the implementation for this NSString category method, I'd like to know if it's already already available somewhere: @interface NSString (URIQuery) /*! @method queryDictionary @abstract Assuming that the receiver is a query string of key=value pairs, of the form "ke

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Peter Ammon
On Aug 7, 2008, at 1:19 PM, Randall Meadows wrote: On Aug 7, 2008, at 2:12 PM, Nate Weaver wrote: I'd say just try the default options and see what happens. You might also look at -[NSWorkspace performFileOperation:source:destination:files:tag:] with NSWorkspaceRecycleOperation as the fi

Re: how to have a pop up menu from an ordinary button?

2008-08-07 Thread Peter Ammon
On Aug 7, 2008, at 2:53 PM, Rua Haszard Morris wrote: I am trying to implement a mini-size, square bevel button that pops up a menu, i.e. a popup button with a square appearance and mini size, but have not found a way to achieve this. NSPopupButton does not support square button appearance

Re: Modules in Objective-C like e.g. OSGi-Bundles in Java

2008-08-07 Thread Jonathan deWerd
On Aug 7, 2008, at 5:31 PM, Lars Sonchocky-Helldorf wrote: Am 07.08.2008 um 21:45 schrieb Matthias Luebken: Hi I'm new to Cocoa and Objective-C. Please point me to a different group / forum if this mailing-list isn't appropriate. I have a fairly basic language question: Is there a module

Framework and NSApplication

2008-08-07 Thread Kiel Gillard
@synthesize greeting; I'm writing a Cocoa framework that links with an old Carbon application. The Carbon application indirectly interacts with it through a wrapper framework. Within the Cocoa framework, I want to observe the NSApplicationWillTerminateNotification notification, posted by the NSApp

Re: Does NSTextField conform to NSEditor (commitEditing specifically)?

2008-08-07 Thread Joel Norvell
Hello Sean, I'm no expert on the "NSEditor informal protocol," but there was a recent thread in which Ken Thomases reply (which I've quoted below) might be of help to you. http://www.cocoabuilder.com/archive/message/cocoa/2008/7/25/214002 Sincerely, Joel On Jul 25 06:13 AM, Ken Thomases wrot

Re: Preventing deselection of NSOutlineView item

2008-08-07 Thread Markus Spoettl
On Aug 7, 2008, at 2:34 PM, Markus Spoettl wrote: Basically I'd like the outline view only to change selection to other items, but not completely deselect all items. Is there a way to do this? Sometimes things are really simple but I still fail to see them: [outlineView setAllowsEmptySel

Does NSTextField conform to NSEditor (commitEditing specifically)?

2008-08-07 Thread Sean McBride
Hi all, Maybe it's just time to go home, but... The NSEditor docs say: "The NSEditor informal protocol is implemented by controllers and user interface elements. [...] These methods are typically invoked on user interface elements [...] NSController provides an implementation of this protocol, as

Re: locale of embedded frameworks

2008-08-07 Thread Torsten Curdt
On Aug 7, 2008, at 23:59, Douglas Davidson wrote: On Aug 7, 2008, at 2:55 PM, Torsten Curdt wrote: More details about the problem. For example, what the code looks like in your framework at the point at which the localized strings are being retrieved, Just NSLocalizedString(@"text", ni

Re: locale of embedded frameworks

2008-08-07 Thread Douglas Davidson
On Aug 7, 2008, at 2:55 PM, Torsten Curdt wrote: More details about the problem. For example, what the code looks like in your framework at the point at which the localized strings are being retrieved, Just NSLocalizedString(@"text", nil) There's your problem. That obtains localized st

Re: locale of embedded frameworks

2008-08-07 Thread Torsten Curdt
On Aug 7, 2008, at 23:01, Douglas Davidson wrote: On Aug 7, 2008, at 1:54 PM, Torsten Curdt wrote: Hm ...so my application is localized and uses the correct nib depending on the locale. Now the application also includes a framework. That framework also is localized. All files (in this case

how to have a pop up menu from an ordinary button?

2008-08-07 Thread Rua Haszard Morris
I am trying to implement a mini-size, square bevel button that pops up a menu, i.e. a popup button with a square appearance and mini size, but have not found a way to achieve this. NSPopupButton does not support square button appearance, and doesn't support setControlSize: (though it can of

Key Binding action methods not declared in public headers

2008-08-07 Thread Ross Carter
The StandardKeyBinding plist binds named action methods to numerous key combinations. Many of those action methods are declared in NSResponder.h. Many others are not found in AppKit. For example, moveToEndOfDocument: (command-down) is an NSResponder method, but moveToEndOfDocumentAndModifyS

Re: Strange flipping bug in Core Animation?

2008-08-07 Thread Matt Long
When you call addSubLayer, you are in essence telling the layer to animate so any properties you changed in the layer will animate after adding the layer. You are doing this in your awakeFromNib which is likely why you don't see the animation when it runs--not sure though. You might want to

NSTypesetter setLineFragmentRect:

2008-08-07 Thread chaitanya pandit
In my application i have TextView with inLine images/attachments, if i try to move the line to a different location using NSTypesetter's setLineFragmentRect: forGlyphRange: usedRect: baselineOffset: the inline attachments don't move with the text, even the drawRect for the NSTextAttachmentCel

Preventing deselection of NSOutlineView item

2008-08-07 Thread Markus Spoettl
Hi List, I have an app with a bound NSOutlineView (source list style) and I'm wondering if there's a way to prevent deselection of a selection by the user. The delegate method - (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem: (id)item; is not called when no new item is

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-07 Thread Cyril Kardassevitch
OK thanks for the tip. But it didn't work. However the corrected code is : - (id)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (self) [self setFormatter: [decoder decodeObjectForKey:@"floatFormatter"]]; return self; } - (void)encodeWithCoder:(NSCoder

Re: locale of embedded frameworks

2008-08-07 Thread Douglas Davidson
On Aug 7, 2008, at 1:54 PM, Torsten Curdt wrote: Hm ...so my application is localized and uses the correct nib depending on the locale. Now the application also includes a framework. That framework also is localized. All files (in this case only string files - no nib) are in the Resource

locale of embedded frameworks

2008-08-07 Thread Torsten Curdt
Hm ...so my application is localized and uses the correct nib depending on the locale. Now the application also includes a framework. That framework also is localized. All files (in this case only string files - no nib) are in the Resources folder (*.framework/Resources/*.lproj) But someh

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Randall Meadows
On Aug 7, 2008, at 2:36 PM, Nate Weaver wrote: From the docs: "NSWorkspaceRecycleOperation Move file to trash. The file is moved to the trash folder on the volume containing the file[...]" So it's definitely a bug in NSWorkspace if it doesn't work this way. On Aug 7, 2008, at 2:37 PM, Mar

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Ken Ferry
Part of the confusion may be the 'destination' parameter that -[NSWorkspace performFileOperation:source:destination:files:tag:] takes? The recycle operation doesn't use the destination parameter. It calculates the correct trash directory for you. The docs note that not all operations use the des

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Nate Weaver
From the docs: "NSWorkspaceRecycleOperation Move file to trash. The file is moved to the trash folder on the volume containing the file[...]" So it's definitely a bug in NSWorkspace if it doesn't work this way. On Aug 7, 2008, at 3:23 PM, Ken Ferry wrote: On Thu, Aug 7, 2008 at 1:19 PM, Ran

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Randall Meadows
[Sending again since I neglected to include the list in the first reply. Tell me again why this list isn't configured with reply-to-all by default?] On Aug 7, 2008, at 2:23 PM, Ken Ferry wrote: On Thu, Aug 7, 2008 at 1:19 PM, Randall Meadows <[EMAIL PROTECTED] pc.com> wrote: On Aug 7, 200

Re: Modules in Objective-C like e.g. OSGi-Bundles in Java

2008-08-07 Thread Jonathan deWerd
On Aug 7, 2008, at 1:45 PM, Matthias Luebken wrote: Hi I'm new to Cocoa and Objective-C. Please point me to a different group / forum if this mailing-list isn't appropriate. I have a fairly basic language question: Is there a module concept in Objective-C / Cocoa? I'm thinking in terms of OSGi

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Ken Ferry
On Thu, Aug 7, 2008 at 1:19 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > On Aug 7, 2008, at 2:12 PM, Nate Weaver wrote: > >> I'd say just try the default options and see what happens. You might also >> look at -[NSWorkspace performFileOperation:source:destination:files:tag:] >> with NSWorkspace

Re: How do I get those 1 pixel black lines into my app window?

2008-08-07 Thread Ken Ferry
Hi Sumner, Check out the discussion of -[NSWindow setContentBorderThickness:forEdge:] in the AppKit release notes. Here's some of it, but it's probably better to read it in context. "The behavior of -setContentBorderThickness:forEdge:NSMinYEdge and -setAutorecalculatesContentBorderThickness:NO fo

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Randall Meadows
On Aug 7, 2008, at 2:12 PM, Nate Weaver wrote: I'd say just try the default options and see what happens. You might also look at -[NSWorkspace performFileOperation:source:destination:files:tag:] with NSWorkspaceRecycleOperation as the first argument. Yes, that's actually what I started wi

Re: How do I get those 1 pixel black lines into my app window?

2008-08-07 Thread Brandon Walkin
Use a non-textured window instead of a textured one. You'll get a black line beneath the titlebar (or toolbar). To get a bottom bar with a divider line, call this method on your window: - (void)setContentBorderThickness:(CGFloat)borderThickness forEdge: (NSRectEdge)edge Set the thickness t

Re: Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Nate Weaver
I'd say just try the default options and see what happens. You might also look at -[NSWorkspace performFileOperation:source:destination:files:tag:] with NSWorkspaceRecycleOperation as the first argument. On Aug 7, 2008, at 2:03 PM, Randall Meadows wrote: The description for FSMoveObjectToT

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-07 Thread Michael Ash
On Thu, Aug 7, 2008 at 2:54 PM, Cyril Kardassevitch <[EMAIL PROTECTED]> wrote: > hi list, > > I've investigated further and try to reproduce the problem with a simpler > configuration. So, instead of using my custom objects, I've tried to pack > directly NSTextField and NSNumberFormatter into one o

Re: NSOperationQueue Memory Leak

2008-08-07 Thread Michael Ash
On Wed, Aug 6, 2008 at 9:38 AM, Mike Simmons <[EMAIL PROTECTED]> wrote: > I have an audio application that processes numerous audio streams into > ten-second clips, compresses the clips, and saves them to disk. Naturally, I > wanted to move from single-threaded processing to multithreaded processin

Re: -[NSBrowser scrollToVisible] not making all of the column

2008-08-07 Thread Martin Redington
Hmmm. Looks like no joy on this one then. A bit of a shame, as it looks like this should be quite easy to do (although presumably it's actually not, or else it would have been fixed). Still, at least it's not *too* bad. I'll file a bug as well. If anyone has any pointers to the multiple cells red

(no subject)

2008-08-07 Thread Zphofar Ægir Spender G
Zphofar Ægir Spender Gulu___ 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 Help/Unsubscribe/Update your Subscript

Confusion over FSMoveObjectToTrashSync docs

2008-08-07 Thread Randall Meadows
The description for FSMoveObjectToTrashSync says: "This function moves a file or directory to the Trash, adjusting the object’s name if necessary." (Meaning, I suppose, it appends a number to the filename to make it unique in the Trash directory.) Lovely, *exactly* what I need to do. Happ

Re: Core Data question

2008-08-07 Thread Sandro Noel
Quincey & Marco, Thank you guy's, Very helpful information! :) Sandro On 6-Aug-08, at 3:31 PM, Sandro Noel wrote: Greetings! :) I'm experimenting with core data, bindings work just fine, I love them and it's great and all. :) but I want to import a massive file into the database. so I'm

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-07 Thread Cyril Kardassevitch
hi list, I've investigated further and try to reproduce the problem with a simpler configuration. So, instead of using my custom objects, I've tried to pack directly NSTextField and NSNumberFormatter into one object inherited from NSTextField. An NSNumberFormatter is generated and become

Re: Saving Outline View Column Widths

2008-08-07 Thread Gerriet M. Denkmann
On 8 Aug 2008, at 01:21, Corbin Dunn wrote: On Aug 7, 2008, at 10:06 AM, Gerriet M. Denkmann wrote: I have an OutlineView, which has an Autosave Name set in IB. Works fine. I change a column width, close the document, open another document: the columns are just as they should be. Let's sa

Re: Properties, read only and bindings

2008-08-07 Thread Steven W Riggins
Excellent, even cleaner! Thanks so much, Steve On Aug 6, 2008, at 11:00 PM, Negm-Awad Amin wrote: Am Do,07.08.2008 um 07:32 schrieb Roland King: If your isCloning is a property itself, can you use the dependent key registration logic instead? [ self setKeys:[ NSArray arrayWithObjects:@"

Xcode and Cocoa docs and the Preview sidebar TOC

2008-08-07 Thread P Teeson
I recently installed Leopard 10.5.4 and Xcode 3.1.1. Reading the docs launches Preview by default. To see the TOC one opens the sidebar. However I can't get it to open on the lhs of the doc - only the rhs. Yes I tried moving the window to the rhs of the screen and then opening it. Which is

Re: Saving Outline View Column Widths

2008-08-07 Thread Corbin Dunn
On Aug 7, 2008, at 10:06 AM, Gerriet M. Denkmann wrote: I have an OutlineView, which has an Autosave Name set in IB. Works fine. I change a column width, close the document, open another document: the columns are just as they should be. Let's say, I want the first column to be 2 cm wide. No

How do I get those 1 pixel black lines into my app window?

2008-08-07 Thread Sumner Trammell
Hi, I've notced that in most apps, at the top and bottom, there is a 1 pixel black line separating the gray window from the (usually) white content. This looks better than stock, which of course is why everybody and Apple seems to be doing it. What is the canonical way to do this? Are people usin

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-07 Thread JongAm Park
Hello. I implemented it to reduce # of disk I/O and used valloc and realloc. Because it should accumulate data between each callback from the FCP, I tried realloc them. And the result was... it is much faster than the original code. I even remove intermediate codes for threading! Thank you v

Saving Outline View Column Widths

2008-08-07 Thread Gerriet M. Denkmann
I have an OutlineView, which has an Autosave Name set in IB. Works fine. I change a column width, close the document, open another document: the columns are just as they should be. Let's say, I want the first column to be 2 cm wide. Now I click on some disclosure triangle, new rows come up and

Re: How to debug a corrupted stack

2008-08-07 Thread Johannes Fortmann
The problem here is that UTCDateTime is defined with #pragma pack 2 in effect. That means the compiler packs with an alignment of 2, so the whole structure has 8 bytes. The proper alignment (4) results in 12 bytes. Since there's nothing in the @encode'd information specifying the non-standa

NSBrowser redraw issues with multiple selection

2008-08-07 Thread Martin Redington
Here's another NSBrowser issue (this is on Leopard, BTW) I'm allowing multiple selection in my NSBrowser. When my NSBrowser loses focus, the multiple selected cells correctly change to have a grey background, but when it regains focus, only the last selected cell gets updated correctly to the act

Re: -[NSBrowser scrollToVisible] not making all of the column visible

2008-08-07 Thread Bill Cheeseman
on 2008-08-07 12:06 PM, Martin Redington at [EMAIL PROTECTED] wrote: > [apologies if this is a repost - I sent it a while ago, but didn't see > it appear on the list or in the archives] I guess you didn't see my reply either. I reported this as a bug about 4 years ago, but I'm not aware that any

Re: -[NSBrowser scrollToVisible] not making all of the column visible

2008-08-07 Thread Negm-Awad Amin
Am Do,07.08.2008 um 18:06 schrieb Martin Redington: [apologies if this is a repost - I sent it a while ago, but didn't see it appear on the list or in the archives] I've got an app with a NSOutlineView and NSBrowser view of the same data (the file system). I preserve the user's selection betw

Good luck

2008-08-07 Thread Fritz Anderson
Hey just click on the below link and register ... it will take only not more than 2 mins of your time.. take a chance...Really true.. Hey Guys, Check for free gift!! It’s true… Click on this url: http://mac.incentive-network.co.uk/?referral=21256 Regards, Sachin Kumar T. _

-[NSBrowser scrollToVisible] not making all of the column visible

2008-08-07 Thread Martin Redington
[apologies if this is a repost - I sent it a while ago, but didn't see it appear on the list or in the archives] I've got an app with a NSOutlineView and NSBrowser view of the same data (the file system). I preserve the user's selection between when switching between views. A lot of the time, th

Re: How to debug a corrupted stack

2008-08-07 Thread Kyle Sluder
On Thu, Aug 7, 2008 at 11:28 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: > Maybe someone would want to check this on Leopard. File a bug (http://bugreport.apple.com). That's the quickest way to make sure that 1) if it's a problem, it gets fixed or 2) if it's not a problem someone from Appl

Apology

2008-08-07 Thread Fritz Anderson
In the course of redirecting a spam email to a junkmail-training address, I accidentally redirected it to the scores of original recipients. I apologize, and will not repeat the error. — F ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 6 Aug 2008, at 21:56, Shawn Erickson wrote: On Tue, Aug 5, 2008 at 7:51 PM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: I have a document based app which works perfectly with -O0 or -O1 but crashes with -O2 or higher. When the crash occurs the debugger comes up and says: "Previous frame

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 7 Aug 2008, at 01:16, Sean McBride wrote: On 8/6/08 9:51 AM, Gerriet M. Denkmann said: So it is kind of difficult to see where and why the stack gets corrupted. Have you tried 'stack canaries'? I have not. Seems this

Re: autorelease CGImageRef?

2008-08-07 Thread Chris Hanson
On Aug 6, 2008, at 7:44 PM, Peter N Lewis wrote: This email sent to [EMAIL PROTECTED] 2:26 PM +0200 6/8/08, Jean-Daniel Dupas wrote: If I'm not wrong, it should be something like this: [NSMakeCollectable(aCGImageRef) autorelease]; This appears correct, except for the fact that, for reasons

Re: autorelease CGImageRef?

2008-08-07 Thread Sean McBride
On 8/7/08 10:44 AM, Peter N Lewis said: >>[NSMakeCollectable(aCGImageRef) autorelease]; > >This appears correct, except for the fact that, for reasons known >only to Apple, although CFMakeCollectable is available in 10.4, the >trivial NSMakeCollectable macro is available only in 10.5. Yes, quite

Re: IKSlideshow Question

2008-08-07 Thread j o a r
On Aug 5, 2008, at 5:37 PM, Robert McCullough wrote: The IKSlideshowDataSource protocol for IKSlideshow includes several optional methods, one of which is "nameOfSlideshowItemAtIndex". However, this method NEVER seems to be called. Anyone know why? I think that it's simply a bug - most li

Re: Application's Help menu ignores first click

2008-08-07 Thread Mattias Arrelid
On Thu, Aug 7, 2008 at 11:53 AM, Mattias Arrelid <[EMAIL PROTECTED]> wrote: > Hi list, > > I've got a strange problem that I cannot figure out how to solve. When > starting up my application, and choosing Help from the application's > menu, trying to perform _any_ of the items listed doesn't work.

Application's Help menu ignores first click

2008-08-07 Thread Mattias Arrelid
Hi list, I've got a strange problem that I cannot figure out how to solve. When starting up my application, and choosing Help from the application's menu, trying to perform _any_ of the items listed doesn't work. Re-opening the Help a second time, clicking on any item works as expected. Strange!?!

Strange flipping bug in Core Animation?

2008-08-07 Thread Moray Taylor
Dear list, I first posted this to the quartz list, but I'm starting to think I'm the only person on it, some hopefully a Cocoa list reader can help... I think I've stumbled upon a bug/undocumented feature in Core Animation, I've made a quick app to demonstrate the issue. http://s3.amazonaws.co

packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-07 Thread Cyril Kardassevitch
hi, I have designed customs NSTextField and NSFormatter objects that I have tried to pack in an interface builder 3 plugin... This works fine (can drag and drop the field, can access field inspector), except that when I select the formatter, interface builder generates an assertion failur

Re: Core Data question

2008-08-07 Thread Marco Masser
This may not be strictly related to your problem, but maybe it helps: Transactions Atributes: Amount:Double, Date:Date, Memo:String, Payee:String Relationships: TransactionType If these are the attributes of the entity you created in Xcode's editor and you can set the class o