Re: Is this normal behavior ?

2008-08-10 Thread Negm-Awad Amin
probably you did somthing wrong. :-) Am Fr,08.08.2008 um 21:48 schrieb Filip vdm: ___ 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

How increase the default http request timeout?

2008-08-10 Thread Yogesh Potdar
Hi All, In my cocoa app, I'm using API CFReadStream for http connection. The server is taking too long to respond as the response size is more than 4 MB and also the connection speed is slow. If the response size is small (less than 1 MB) no timeout occurs. I have tried with different buffer sizes

Re: Core Data versioning woes

2008-08-10 Thread Quincey Morris
On Aug 10, 2008, at 22:08, Graham Perks wrote: Well that was too easy. I even started off on the right track yesterday before getting derailed. This'll work: - (id)initWithContentsOfURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError { // Migrate? Optional,

Re: Why use NSObjectController?

2008-08-10 Thread Seth Willits
On Aug 10, 2008, at 10:14 PM, mmalc crawford wrote: Any time you want to ensure that pending edits in the view layer are committed to your underlying model objects -- for example, if the user has entered a new value in a text field then saves a document before "exiting" the field (and causi

Re: Get specified window from nib

2008-08-10 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 10:01 PM, Fosse <[EMAIL PROTECTED]> wrote: > I have one nib containing more than ten dialogs and want to get the > specified window after nib is loading.. Typically you'll have one window per nib. Putting ten windows in a single nib is a bit awkward. > If I use FileOwner

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-10 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 8:04 PM, Matt Neuburg <[EMAIL PROTECTED]> wrote: > That's perhaps perfectly true. But "later" could be a LOT later - and in the > meantime quite a lot of memory could pile up. For example, it is the nature > of the Cocoa event loop that the autorelease pool gets cleaned out

Re: Why use NSObjectController?

2008-08-10 Thread mmalc crawford
On Aug 10, 2008, at 10:08 PM, Seth Willits wrote: On Aug 10, 2008, at 9:54 PM, mmalc crawford wrote: What is it that NSObjectController offers me? An implementation of the NSEditor and NSEditorRegistration protocols. Ah. Now I'll just have to figure out when I'd want to use those... Any t

Re: Why use NSObjectController?

2008-08-10 Thread Seth Willits
On Aug 10, 2008, at 9:54 PM, mmalc crawford wrote: What is it that NSObjectController offers me? An implementation of the NSEditor and NSEditorRegistration protocols. Ah. Now I'll just have to figure out when I'd want to use those... -- Seth Willits

Re: Core Data versioning woes

2008-08-10 Thread Graham Perks
Well that was too easy. I even started off on the right track yesterday before getting derailed. This'll work: - (id)initWithContentsOfURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError { // Migrate? Optional, but it'd be good to check here if this upgrade

Re: Why use NSObjectController?

2008-08-10 Thread mmalc crawford
On Aug 10, 2008, at 8:23 PM, Seth Willits wrote: What is it that NSObjectController offers me? An implementation of the NSEditor and NSEditorRegistration protocols. mmalc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Why use NSObjectController?

2008-08-10 Thread Seth Willits
On Aug 10, 2008, at 9:39 PM, Gordon Apple wrote: I don't use CoreData. Frankly, the main use I have made of NSObjectController is to decrease my typing in IB bindings. For example, my inspectors have a large number of controls that are bound through a fairly long chain of references to th

Re: Why use NSObjectController?

2008-08-10 Thread Gordon Apple
I don't use CoreData. Frankly, the main use I have made of NSObjectController is to decrease my typing in IB bindings. For example, my inspectors have a large number of controls that are bound through a fairly long chain of references to their controllers. By using an NSObjectController to handl

NSPopupButton, Null Placeholder, image

2008-08-10 Thread Chris Idou
I've figured out how to have a little cog action menu using NSPopupButton. Now I want to have one where the items of the menu are dynamically changed using a binding. That works, but it destroys the little cog image. So then I notice the Null Placeholder option, which seems good because it trea

Re: Why use NSObjectController?

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 10:23 PM, Seth Willits wrote: What is it that NSObjectController offers me? Great question. You are on the long steep ascent to Bindings understanding. For me the top is still way up there shrouded in clouds. I'll take a stab at answering your question: 1) NSObjectContr

Re: Core Data question

2008-08-10 Thread Chris Hanson
On Aug 10, 2008, at 8:37 PM, Graham Perks wrote: On Aug 10, 2008, at 10:30 PM, Chris Hanson wrote: you should not need to do a thing to ensure that the other is set after doing the first. That's what marking relationships as inverses means; Core Data will set them for you automatically. T

Re: Core Data question

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 10:30 PM, Chris Hanson wrote: you should not need to do a thing to ensure that the other is set after doing the first. That's what marking relationships as inverses means; Core Data will set them for you automatically. Thanks for that Chris, I did not know that. Still, i

Re: Core Data question

2008-08-10 Thread Chris Hanson
On Aug 10, 2008, at 6:51 PM, Graham Perks wrote: I do this, where I have an EventImage that refers back to a main Event, "self" is the managed object for the Event, which is your Account: // create new EventImage, this would be akin to your Acco

Why use NSObjectController?

2008-08-10 Thread Seth Willits
This is something I still don't quite understand: Why should I bind to an NSObjectController bound to an object, instead of just binding to the object itself? Say for instance that I bind the values of a bunch of controls to [File's Owner].value1, [File's Owner].value2, [File's Owner].va

Re: Core Data versioning woes

2008-08-10 Thread Quincey Morris
On Aug 10, 2008, at 19:28, Graham Perks wrote: On Aug 10, 2008, at 2:06 PM, Graham Perks wrote: The document that's open post-migration is the "foo~" version Is this a "feature" of migration? I tried the most basic migration app I could build. And when I try to save, it says "This document

handling errors from NSNumberFormatter - how to determine exact nature of the error?

2008-08-10 Thread Rua Haszard Morris
I'm using a NSNumberFormatters in a modal dialog to validate text fields. I want to give the user a specific and appropriate error message if they try to OK the dialog with an invalid number in a field. For example I want different error messages for "no string entered", "non numeric string

Re: Core Data question

2008-08-10 Thread Sandro Noel
Graham. Wow, that worked ... Thank you so Much ! Sandro. On 10-Aug-08, at 9:51 PM, Graham Perks wrote: On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use when inserting a detail object to properly set the relationship to Account. some exam

Re: When the getter returns a BOOL, is "is" the preferred prefix?

2008-08-10 Thread mm w
is or should On Fri, Aug 8, 2008 at 9:15 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > On Aug 8, 2008, at 10:53 PM, Sumner Trammell wrote: > >> We know that Cocoa strongly suggests using setFoo and foo for setters >> and getters. >> >> Sometimes I see setters and getters using the idiom setFoo and

Re: Core Data question

2008-08-10 Thread Sandro Noel
Graham. Thank you for the code. so what I should do if I understand your code, is fetch my account's managed object, before i insert any details. Sandro. On 10-Aug-08, at 9:51 PM, Graham Perks wrote: On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what sho

Re: Core Data versioning woes

2008-08-10 Thread Steve Steinitz
Hello Mr Crawford, Oops, didn't want to hijack Graham's nice clean thread. However... On 10/8/08, mmalc crawford wrote: ps. one special problem I have is that I don't want the migration to happen automatically because four users share the same database.

Re: Core Data versioning woes

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 2:06 PM, Graham Perks wrote: The document that's open post-migration is the "foo~" version Is this a "feature" of migration? I tried the most basic migration app I could build. And when I try to save, it says "This document has been renamed to "test2~". While that's diff

Bindings created reference objects

2008-08-10 Thread Dustin Robert Kick
I have a program I'm developing where there will be one list, shown in an NSTableView that has source objects, and a second list that contains counted reference objects from the first list, also shown in an NSTableView, and you add objects by selecting in the first list, and clicking a butt

Re: Core Data versioning woes

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 8:12 PM, Steve Steinitz wrote: Perhaps you feel like you are talking to yourself but I assure you myself and others are watching your progress. Thanks, Steve. For posterity's sake, if, I should say WHEN, this error pops up: Can't merge models with two different entities

Re: Get specified window from nib

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 9:01 PM, Fosse wrote: I have one nib containing more than ten dialogs and want to get the specified window after nib is loading.. Perhaps NSNib's instantiateNibWithOwner:(id)owner topLevelObjects: (NSArray **)topLevelObjects ? You'll get an array of top level objects, wh

Get specified window from nib

2008-08-10 Thread Fosse
I have one nib containing more than ten dialogs and want to get the specified window after nib is loading.. If I use FileOwner and binding, I need to add a lot of Outlets in the fileOwner class and create the binding in the IB.. Is there a more convenient way to get the specified window by pass

Re: Core Data question

2008-08-10 Thread Graham Perks
One more thing, since you are getting traps on insert. If you have derived your own NSManagedObject subclass and are overriding awakeFromInsert:, check you are calling [super awakeFromInsert]... On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use

Re: Core Data question

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use when inserting a detail object to properly set the relationship to Account. some example on how I should approach the problem would be nice, or a step-by-step :D I do this, where I have an Eve

Re: Core Data versioning woes

2008-08-10 Thread mmalc crawford
On Aug 10, 2008, at 6:12 PM, Steve Steinitz wrote: ps. one special problem I have is that I don't want the migration to happen automatically because four users share the same database.

Re: Core Data question

2008-08-10 Thread mmalc crawford
On Aug 10, 2008, at 6:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use when inserting a detail object to properly set the relationship to Account. some example on how I should approach the problem would be nice, or a step-by-step

Re: Core Data question

2008-08-10 Thread Sandro Noel
Greetings. I've read the documentation on core data over again, and I'm still confused about how to manipulate relationships. every time I try an insert/add and there is a relationship involved, the insert crashes. (programatically that is, bindings work just fine) maybe, the way I think it

Re: Core Data versioning woes

2008-08-10 Thread Steve Steinitz
Hi Graham, On 10/8/08, Graham Perks wrote: >>Now when I save my document I get a sheet saying, "This >>document's file has been changed by another application since >>you opened or saved it", and asking if I want to save or not. >>Eh? What's that all about? > >The document that's open post-

Re: Cocoa-dev Digest, Vol 5, Issue 1427

2008-08-10 Thread Steve Steinitz
Hi Graham, On 10/8/08, Graham Perks wrote: Now when I save my document I get a sheet saying, "This document's file has been changed by another application since you opened or saved it", and asking if I want to save or not. Eh? What's that all about? The document that's open post-migratio

Re: Challenge 18 in Hillegass Book

2008-08-10 Thread Erik Buck
But the question I think is still valid and one I'm I'm trying to figure out myself. How, for instance, would you have the view request data from the document (or any other object for that matter). I understand that it may not always be the best design choices but how is it done? Posting notificat

Re: Challenge 18 in Hillegass Book

2008-08-10 Thread Dave Carrigan
On Aug 10, 2008, at 5:22 PM, Ashley Perrien wrote: But the question I think is still valid and one I'm I'm trying to figure out myself. How, for instance, would you have the view request data from the document (or any other object for that matter). id doc = [[[self window] windowController

Re: Challenge 18 in Hillegass Book

2008-08-10 Thread Ashley Perrien
On Sat, Aug 9, 2008 at 8:54 PM, James Gorham <[EMAIL PROTECTED]> wrote: I think that's where I'm unclear. Making the Document class aware of the view is easy enough with an IBOutlet. But how to properly make the view aware of the document I'm unsure of. You're missing the point. You don't

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-10 Thread Matt Neuburg
On or about 8/10/08 4:37 PM, thus spake "Kyle Sluder" <[EMAIL PROTECTED]>: > On Fri, Aug 8, 2008 at 9:02 AM, Matt Neuburg <[EMAIL PROTECTED]> wrote: >> Wrap each call to setApplicationIconImage in an autorelease pool creation >> and release, like this: >> >>NSAutoreleasePool *pool = [[NSA

Re: including a cocoa bundle in a carbon app

2008-08-10 Thread Uli Kusterer
On 10.08.2008, at 19:38, Bob Sabiston wrote: I got my Cocoa bundle to compile on the Intel machine. It still doesn't load within my app, though. Is there something special I need to do to include it in my project? I just dragged it in on the left, amongst all the other types of files, and

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-10 Thread Kyle Sluder
On Fri, Aug 8, 2008 at 9:02 AM, Matt Neuburg <[EMAIL PROTECTED]> wrote: > Wrap each call to setApplicationIconImage in an autorelease pool creation > and release, like this: > >NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >[NSApp setApplicationIconImage: whatever]; >

Re: Hiding the disclosure triangle of a specific group item in a bound NSOutlineView

2008-08-10 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 7:29 PM, Markus Spoettl <[EMAIL PROTECTED]> wrote: > Thanks a lot, works perfectly! No problem, but please do file an enhancement request (http://bugreport.apple.com) so that this becomes part of the standard NSOutlineView API. It's one of the few (if not the only) things

Re: How to switch off NSCollectionView fade animations

2008-08-10 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 3:22 PM, Markus Spoettl <[EMAIL PROTECTED]> wrote: > So I'd really really like to completely switch animation off for the > collection view if that is possible. Is it? Dunno if it's possible. If you want to try to hack around it, see if NSCollectionView posts any notificat

Re: Hiding the disclosure triangle of a specific group item in a bound NSOutlineView

2008-08-10 Thread Markus Spoettl
On Aug 10, 2008, at 4:27 PM, Kyle Sluder wrote: From the documentation: "You can override this method in a subclass to return a custom frame for the outline button cell. If your override returns an empty rect, no outline cell is drawn for that row. You might do that, for example, so that the dis

Re: Hiding the disclosure triangle of a specific group item in a bound NSOutlineView

2008-08-10 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 7:13 PM, Markus Spoettl <[EMAIL PROTECTED]> wrote: > I have an NSOutlineView based source list bound to a tree controller and I > can't figure out how to create a group item that does not have a disclosure > triangle - as an example, the MAILBOXES folder group in Mail.app d

Hiding the disclosure triangle of a specific group item in a bound NSOutlineView

2008-08-10 Thread Markus Spoettl
Hi List, I have an NSOutlineView based source list bound to a tree controller and I can't figure out how to create a group item that does not have a disclosure triangle - as an example, the MAILBOXES folder group in Mail.app does that. I thought it might be possible by returning NO for

Re: including a cocoa bundle in a carbon app

2008-08-10 Thread Nick Zitzmann
On Aug 10, 2008, at 4:29 PM, Bob Sabiston wrote: Now I am all in Xcode, compiling the app, the bundle, everything in Xcode and everything on an Intel Imac. And it isn't working, that's why the question. And you're using exactly the same compiler, the same compiler version, the same SD

Re: including a cocoa bundle in a carbon app

2008-08-10 Thread Bob Sabiston
On Aug 10, 2008, at 2:40 PM, Bob Sabiston wrote: 2) the bundle right now is compiling for i386, the native architecture of this machine. does it need to be compiled for all 4? it should at least run on this machine if everything, app and bundle, is being compiled for this architecture, r

CGPDF - Setting /Rotation

2008-08-10 Thread Pedro Cuenca
Hello, I have some code that generates PDF data, and I would need to set the /Rotation entry of some of the pages. The following code correctly sets the /MediaBox entry to the rectangle specified in the page dictionary: CGRect mediaBox = CGRectMake( 0.0, 0.0, 1024.0, 768.0 ); NSDictionary * p

Re: including a cocoa bundle in a carbon app

2008-08-10 Thread Nick Zitzmann
On Aug 10, 2008, at 2:40 PM, Bob Sabiston wrote: 2) the bundle right now is compiling for i386, the native architecture of this machine. does it need to be compiled for all 4? it should at least run on this machine if everything, app and bundle, is being compiled for this architecture,

Re: including a cocoa bundle in a carbon app

2008-08-10 Thread Bob Sabiston
On Aug 10, 2008, at 12:48 PM, Kyle Sluder wrote: On Sun, Aug 10, 2008 at 1:38 PM, Bob Sabiston <[EMAIL PROTECTED]> wrote: This bundle works when compiled in Xcode 2.4.1 on a G5 and then included in a Codewarrior project. But I haven't gotten it to work with the same project on Intel in Xco

Re: Problem with friend function and gcc 4.2 with

2008-08-10 Thread Roni Music
You can read a discussion regarding this problem here: http://bytes.com/forum/thread828536.html it seems gcc 4.0 had a bug which is corrected in gcc 4.2 Message: 12 Date: Sat, 9 Aug 2008 09:36:17 -0600 From: Ken Worley <[EMAIL PROTECTED]> Subject: Re: Problem with friend function and gcc 4.2

Hillegass' chapter #11: Core Data

2008-08-10 Thread Niklas Saers
Hi all, I'm going through Hillegass' book 3rd edition, and I've come to the chapter I'm most excited about: Core Data. I came to the very exciting words "You are done. Build and run the application", but I must have missed something important: my window doesn't show! Would any of you be so

Memory Leaks & Instruments Questions

2008-08-10 Thread Michael Kaye
Hi all, Relative newbie here so please be gentle :-) I've ben running my app with leaks in Instruments and it is reporting a fair number of leaks. On analyzing these leaks, they all appear to be related to apple frameworks methods/code and never as a direct result of any objects I've ins

How to switch off NSCollectionView fade animations

2008-08-10 Thread Markus Spoettl
Hello List, is there a way to switch off the fade-in and fade-out animation that take place when NSCollectionView shows new or hides removed items? Those things can really decrease performance when it displays a lot of collection items that have complex drawing routines. On top of it I

Re: Core Data versioning woes

2008-08-10 Thread Graham Perks
Now when I save my document I get a sheet saying, "This document's file has been changed by another application since you opened or saved it", and asking if I want to save or not. Eh? What's that all about? The document that's open post-migration is the "foo~" version - the backup of the

Re: Core Data versioning woes

2008-08-10 Thread Graham Perks
So after some too-late coding and placing my NSLogs in the wrong place, I now find the normal Multiple Validation Errors. After dumping the extra messages in NSDetailedErrorsKey I see the offenders are items that are marked as transient but non-optional. They're set in my entity's awakeFro

Re: Lazy Loading of images

2008-08-10 Thread Kyle Sluder
On Fri, Aug 8, 2008 at 9:52 AM, Johannes Fahrenkrug <[EMAIL PROTECTED]> wrote: > I'd like to display placeholder images until the table cell gets > displayed and then load the actual thumbnail, replacing the > placeholder image with the real thumbnail once it has loaded. > What would be the best wa

Re: Web links with PyObjC

2008-08-10 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 12:26 AM, Aaron <[EMAIL PROTECTED]> wrote: > I hope I've posted in the right list. I'm a student developer (first-time > for the Mac), and I've been toying around with PyObjC, and I would like to > know how to make an NSimage (arrow) open a link in the default browser. The

Re: including a cocoa bundle in a carbon app

2008-08-10 Thread Kyle Sluder
On Sun, Aug 10, 2008 at 1:38 PM, Bob Sabiston <[EMAIL PROTECTED]> wrote: > This bundle works when compiled in Xcode 2.4.1 on a G5 and then included in > a Codewarrior project. But I haven't gotten it to work with the same > project on Intel in Xcode yet. It is probably something simple that I'm >

including a cocoa bundle in a carbon app

2008-08-10 Thread Bob Sabiston
Hi, I got my Cocoa bundle to compile on the Intel machine. It still doesn't load within my app, though. Is there something special I need to do to include it in my project? I just dragged it in on the left, amongst all the other types of files, and it gave me a menu of targets from wh

Re: Bindings array count to a label ( was Re: KVC beginners question )

2008-08-10 Thread Keary Suska
8/10/08 10:52 AM, also sprach [EMAIL PROTECTED]: > I did see the array operators ... and in IB ... i have the label set > up to BIND ValueWithPattern ... bound to the controller, keypath > "[EMAIL PROTECTED]". > > I'm sure i'm just missing something VERY obvious/simple. sigh. We need more info t

Re: Challenge 18 in Hillegass Book

2008-08-10 Thread Kyle Sluder
On Sat, Aug 9, 2008 at 8:54 PM, James Gorham <[EMAIL PROTECTED]> wrote: > I think that's where I'm unclear. Making the Document class aware of the > view is easy enough with an IBOutlet. But how to properly make the view > aware of the document I'm unsure of. You're missing the point. You don't c

Bindings array count to a label ( was Re: KVC beginners question )

2008-08-10 Thread Jack Carbaugh
I did see the array operators ... and in IB ... i have the label set up to BIND ValueWithPattern ... bound to the controller, keypath "[EMAIL PROTECTED]". I'm sure i'm just missing something VERY obvious/simple. sigh. Thanks !!! Jack On Aug 10, 2008, at Sun-08 /10 /08-12:37 PM, Keary Suska

Re: KVC beginners question

2008-08-10 Thread Keary Suska
8/10/08 10:09 AM, also sprach [EMAIL PROTECTED]: > I am attempting to understand KVC and am having a bit of trouble > understanding some of the examples, as well as the documentation. > > What i'd like to be able to do is have a label in a window > automagically updated with the current count of

Insert token at selection of NSTokenField?

2008-08-10 Thread Vincent E.
Hi, I'm wondering if there is any secret technique for inserting a token into an NSTokenField at the current cursor position. I have already tried to code it myself and aborted as my code turned out to be way too unreliable. So before I spend another day trying to get it done myself I thought

Re: Core Data versioning woes

2008-08-10 Thread Graham Perks
Astonishing: The migration happens for sure: I end up with a "foo.new" file adjacent to my original file. If I delete the original and open the .new file, it is the migrated version complete will all data, including the new attribute (with its default value) that I added in the new data mod

Re: Core Data versioning woes

2008-08-10 Thread Graham Perks
I've got a little further. I made both model versions identical. Then reset the file back to the old version. Doc opened OK. Add one attribute to the file, reset the file, and I now get: Error Domain=NSCocoaErrorDomain Code=256 "The file could not be opened." from initWithContentsOfUrl:...

CGImage failed to write Exif Auxiliary metadata to image

2008-08-10 Thread Rawitat Pulam
Hi, I'm having problems trying to write photo metadata. Actually, I want to copy all metadata I could get via the CGImageSourceCopyPropertiesAtIndex function to the destination image (CGImageDestinationRef). Reading the metadata isn't a problem. I could get all that are available. Simpl

KVC beginners question

2008-08-10 Thread Jack Carbaugh
I am attempting to understand KVC and am having a bit of trouble understanding some of the examples, as well as the documentation. What i'd like to be able to do is have a label in a window automagically updated with the current count of an array. I've tried several things in IB and in code

Re: Accessing member variables from another thread crashes

2008-08-10 Thread Steve Christensen
On Aug 9, 2008, at 5:24 PM, Dennis Harms wrote: I've created a class with some member variables of type NSString*. In the init function of the class, I write something into those strings. Now I call a function of the initialized class instance as a new thread and try to read from those memb

Re: Accessing member variables from another thread crashes

2008-08-10 Thread Dave Fernandes
This isn't really a multithreading issue, it is a memory management issue. the string you have created is autoreleased, you must retain it if you want it to remain in memory. See: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/ MemoryMgmt.html On Aug 9, 2008, at 8:24

Re: Accessing member variables from another thread crashes

2008-08-10 Thread Keary Suska
8/9/08 6:24 PM, also sprach [EMAIL PROTECTED]: > baseURL = [NSString stringWithString: _url]; Are you aware that the string in this case is autoreleased, and what that implies? If not, search for "memory management" and you are sure to find the memory management guidelines/rules for Cocoa. B

Re: Controlling line-breaking in a text view

2008-08-10 Thread John Joyce
You might consider subclassing, but you might also want to read a lot more stuff first. Cocoa (and Carbon) text facilities are pretty deep. There is nothing about a bug in the text system. It is just that the text handling in Cocoa is very sophisticated and is designed to handle things depe

Re: CGImage masking via CGCreateImageWithMask getting odd results

2008-08-10 Thread Jean-Daniel Dupas
Le 10 août 08 à 06:08, Nick Veys a écrit : I'm getting some interesting results with an image mask I'm trying to apply. I'm trying to vignette away the edges of some small images and instead of getting transparency behind them, I'm getting the black (presumably from the mask). I'm simply call

Re: Core Data, dynamic accessors and compiler warnings

2008-08-10 Thread Jim Correia
On Aug 10, 2008, at 10:02 AM, Chris Idou wrote: The Core data doco suggests that if you have a 1:M accessor for FooBar that you define in a header: - (void)addFooBarObject:(FooBar *)value; In order to suppress compiler warnings for using this dynamically generated method. However this crea

Core Data, dynamic accessors and compiler warnings

2008-08-10 Thread Chris Idou
The Core data doco suggests that if you have a 1:M accessor for FooBar that you define in a header: - (void)addFooBarObject:(FooBar *)value; In order to suppress compiler warnings for using this dynamically generated method. However this creates its own "incomplete implementation" compiler war

Core Data versioning woes

2008-08-10 Thread Graham Perks
Wow, versioning looks SO much better in 10.5. I had my own code for 10.4, I am glad to delete it. I got a quick demo versioning app going, thanks to some excellent advice at http://www.timisted.net/blog/archive/core-data-migration/. The docs should really include that NSDocument override f

Web links with PyObjC

2008-08-10 Thread Aaron
Hello! I hope I've posted in the right list. I'm a student developer (first- time for the Mac), and I've been toying around with PyObjC, and I would like to know how to make an NSimage (arrow) open a link in the default browser. The code is all in Python. Thanks, Aaron T.

Accessing member variables from another thread crashes

2008-08-10 Thread Dennis Harms
I'm new to Cocoa and objective C development and I've got a big problem with multithreading: I've created a class with some member variables of type NSString*. In the init function of the class, I write something into those strings. Now I call a function of the initialized class instance as a new

CGImage masking via CGCreateImageWithMask getting odd results

2008-08-10 Thread Nick Veys
I'm getting some interesting results with an image mask I'm trying to apply. I'm trying to vignette away the edges of some small images and instead of getting transparency behind them, I'm getting the black (presumably from the mask). I'm simply calling CGImageCreateWithMask(image, mask) with two

Re: Controlling line-breaking in a text view

2008-08-10 Thread Matt Neuburg
I wonder if this is a larger bug in the text system? I was going to suggest just inserting the Unicode character "zero-width no-break space" (U+FEFF) after the slash, but when I tried it (in TextEdit) I got the very phenomenon you describe - the break occurs before "delete", not after. I was able

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-10 Thread Matt Neuburg
On Sat, 9 Aug 2008 15:19:08 -0700, "Shawn Erickson" <[EMAIL PROTECTED]> said: >On Sat, Aug 9, 2008 at 2:46 PM, Mark Allan <[EMAIL PROTECTED]> wrote: > >> I fail to see how [NSApp setApplicationIconImage:theNewImage]; is any >> different to [NSApp setApplicationIconImage:[theNewImage objectAtIndex:1

Re: I don't understand why this is leaking...

2008-08-10 Thread Jean-Daniel Dupas
Le 10 août 08 à 00:48, Cate Tony a écrit : This code is leaking: - (void)saveItemExtensions:(id)sender { NSMutableString* itemExtensionsFilePath = [NSMutableString stringWithString:@"~/Library/Preferences/MyApp/extensions.abc"]; NSDictionary* extensions = [NSDictionary dictionaryWithDi

Re: Custom URL Handling

2008-08-10 Thread Ken Thomases
On Aug 9, 2008, at 7:12 PM, Uli Kusterer wrote: On 10.08.2008, at 01:50, Jacob Bandes-Storch wrote: It doesn't seem to make sense to use the script suite stuff to receive the URL event.. shouldn't it be used for scripting only? Or am I mistaken? Apple Events are simply a means for applica

Re: Copying id

2008-08-10 Thread Ken Thomases
On Aug 10, 2008, at 2:05 AM, Mike wrote: How does one go about copying an object specified by id when one doesn't know the object type and the object does not implement NSCopying protocol? The short answer is: you don't. If an object's class doesn't implement NSCopying, then there are no

Copying id

2008-08-10 Thread Mike
How does one go about copying an object specified by id when one doesn't know the object type and the object does not implement NSCopying protocol? Thanks, Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests