Re: Integer as key in NSMutableDictionary

2009-05-05 Thread Jonathan Hess
Hey Weydson - NSDictionary equates keys by using -[NSObject isEqual:] and -[NSObject hash], so a number with a different pointer address but the same value as determined by isEqual: is fine. If identity vs value does become an important distinction for you, CFDictionary gives you control

Re: Integer as key in NSMutableDictionary

2009-05-05 Thread Nick Zitzmann
On May 4, 2009, at 11:52 PM, Weydson Lima wrote: when I use the removeObjectForKey, how can I make a reference to a specific key? Let's say I want to remove key that was initialized with [NSNumber numberWithInt:1]. If I call removeObjectForKey:[NSNumber numberWithInt:1], that method won't

Re: how to combine addObject in mutablearray with Object instantiation?

2009-05-05 Thread Weydson Lima
Sorry for jumping in, but I have a question in the following line: For other objects, you'll have to use a convenience method like: [myArray addObject:[NSNumber numberWithInt:7]]; When you add a NSNumber object, how can you quickly reference back to it? Let's say you want to find the

Re: how to combine addObject in mutablearray with Object instantiation?

2009-05-05 Thread Weydson Lima
Oops, wrong list :) On Tue, May 5, 2009 at 1:05 AM, Weydson Lima weys...@gmail.com wrote: Sorry for jumping in, but I have a question in the following line: For other objects, you'll have to use a convenience method like: [myArray addObject:[NSNumber numberWithInt:7]]; When you

Re: Installer has admin permissions but installer plugins don't

2009-05-05 Thread ERG Consultant
I am fully aware of the security issues having already written several helper tools. Stating that a temp text file written to /tmp is a security hole is really stretching it a bit. NSTemporaryDirectory can't be used because there is no way to specify that path in Packagemaker. I did indeed

Re: how to combine addObject in mutablearray with Object instantiation?

2009-05-05 Thread Graham Cox
On 05/05/2009, at 4:05 PM, Weydson Lima wrote: When you add a NSNumber object, how can you quickly reference back to it? Let's say you want to find the index in the array of the object you just created. If you use indexOfObject:[NSNumber numberWithInt:7] that wouldn't work, right? No

Re: how to combine addObject in mutablearray with Object instantiation?

2009-05-05 Thread Graham Cox
On 05/05/2009, at 4:05 PM, Weydson Lima wrote: If you use indexOfObject:[NSNumber numberWithInt:7] that wouldn't work, right? D'oh. Engage brain... Yes, this would work, because objects are compared using -isEqual: I read that as -objectAtIndex:, not -indexOfObject: --Graham

Re: Correct memory management in -awakeAfterUsingCoder: ?

2009-05-05 Thread Graham Cox
On 05/05/2009, at 3:57 PM, Greg Parker wrote: Two answers: 1. Retain it. Conceptually, you're balancing the [self release] that you did to the old-self. The old-self came in with one retain count that was not your responsibility to release. That means the new-self needs to go back out

Exception

2009-05-05 Thread Kiran Kumar S
i am developing a client/server app using Distributed objects, i register my client to server. when server pings the client the following exception occurs. Can any one suggest me why this exception occurs, 2009-05-05 12:12:29.023 Project X[5278:10b] *** NSDistantObject initWithCoder: 0x1

Re: NSManagedObjectContext -insertObject: Cancels Prior Deletion?

2009-05-05 Thread Alexander Spohr
Am 05.05.2009 um 07:44 schrieb Jerry Krinock: I have a tree of managed objects with parent -- child relationships, and Delete Rule set to Cascade children when a parent is deleted. But sometimes, after deleting a parent, I need to restore a deleted child under a new parent. So I set

Re: Integer as key in NSMutableDictionary

2009-05-05 Thread Weydson Lima
Wow, I'm learning a lot from this list. Thanks all for everything, now my code is finally working as I had wanted. :) Weydson ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Core Data: [Fixed] NSPredicate failing when using NSSQLiteStoreType

2009-05-05 Thread Yvan BARTHÉLEMY
Hello, In an entity A, I have a toMany relationship to an entity B named relB. relB has a inverse toOne relationship relA. NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; [request setEntity:[NSEntityDescription entityForName:@A inManagedObjectContext:moc]];

Re: Installer has admin permissions but installer plugins don't

2009-05-05 Thread Kyle Sluder
On Tue, May 5, 2009 at 2:11 AM, ERG Consultant erg_consult...@yahoo.com wrote: I am fully aware of the security issues having already written several helper tools. Stating that a temp text file written to /tmp is a security hole is really stretching it a bit. I didn't say it was a security

Re: Custom log file for NSLog

2009-05-05 Thread Citizen
You may find this series of articles on ASL useful as well: http://boredzo.org/blog/archives/2008-01-20/why-asl Regards, Dave On 5 May 2009, at 01:05, Torsten Curdt wrote: Have a look here:

Re: Crashing resetting or releasing an NSManagedObjectContext

2009-05-05 Thread Daniel Kennett
Thank you again for your helpful replies! On a different note, when you comment out the for (VetVisit code, does it still crash on a VetVisit, or does it crash on a Medication object? It still crashes on a VetVisit object. I don't think I've solved the problem, but I have stopped it

Re: Best way to save a CIImage to disk

2009-05-05 Thread Sandy McGuffog
I also had (have actually) this problem. The issue appears to be that CoreImage seems to do its own caching. If you watch the retain counts on the underlying image data that you pass to CoreImage, it leave retains in place for a long time. Under testing, when I repeatedly passed an image

Printing an NSDocument

2009-05-05 Thread Dave Robertson
Hi, I'm trying to print a customView which is part of an NSDocument. As soon as the print panel appears I get the following slew of errors: -[NSView(NSPrinting) beginPrologueBBox:creationDate:createdBy:fonts:forWhom:pages:title:] was deprecated before Mac OS 10.0 and overrides of it are

Trouble with property (copy) and retain counts

2009-05-05 Thread Malayil George
Hi,I'm a little confused with retain counts and properties. I would appreciate some help in understanding this. I have a class setup as follows @interface Cell : NSObject { NSImage *image; } @property (copy) NSImage *image; @end Now, in my code, I do the following NSImage *img =

WebView loses script context

2009-05-05 Thread Stefan Lange-Hegermann
Hi! I have a WebView in which I call JavaScript functions using [[webView windowScriptObject] callWebScriptMethod:. When I do it for the first time everything works fine and my script runs like it should. When I call it from another (objc) function my JS function can not access the DOM elements

Re: Registering Clients using DO

2009-05-05 Thread Kiran Kumar S
Creating socket as below in the server side gives the exception. Can any one guide why this happens so. int newSocket = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serverAddress; int namelen = sizeof(serverAddress); memset(serverAddress, 0,

Re: NSManagedObjectContext -insertObject: Cancels Prior Deletion?

2009-05-05 Thread Dave Fernandes
Yes... Begin forwarded message: From: Ben Trumbull trumb...@apple.com Date: March 28, 2009 1:47:07 AM EDT (CA) To: Nick Zitzmann n...@chronosnet.com Cc: Cocoa Developers cocoa-dev@lists.apple.com Subject: re: Un-deleting objects in an NSManagedObjectContext? -insertObject: is the reciprocal

Re: Trouble with property (copy) and retain counts

2009-05-05 Thread Jean-Daniel Dupas
If the retain count confuses you, you stop to using it as it's almost never relevant. That said, have a look at the atomic section in the property references: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html Le 5 mai 09 à 06:34, Malayil George

masking events from Image Well

2009-05-05 Thread Henrietta Read
Hi, I'm using an Image Well as a button... such as: - (void)mouseDown:(NSEvent *)theEvent { theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask]; switch([theEvent type]) { case NSLeftMouseUp: DoVariousImportantThingsHere();

A tree data structure?

2009-05-05 Thread Andreas Grosam
NSTreeController and CFTree is not exactly what I'm searching for. I would like to have a *pure*, simple and effective but complete tree data structure which comprises a hierarchy of objects: root |- object1 |- object2 |- object4 |- object5 The container shall be sequential,

Re: A tree data structure?

2009-05-05 Thread Ken Thomases
On May 5, 2009, at 8:10 AM, Andreas Grosam wrote: NSTreeController and CFTree is not exactly what I'm searching for. I would like to have a *pure*, simple and effective but complete tree data structure which comprises a hierarchy of objects: [...] Well, first of all, it's easy enough to

WTF? Is a file corrupted?

2009-05-05 Thread Scott Ribe
Application that's been running a long time, now one user out of dozens gets this crash first thing after logging in (and, obviously, going to select a menu item to get started): Thread 0 Crashed: 0 com.apple.QD 0x91757360 SetOrigin + 136 1 com.apple.HIToolbox

Re: masking events from Image Well

2009-05-05 Thread Henrietta Read
Sorry to bother, got it all fixed with: [[self window] discardEventsMatchingMask:NSLeftMouseDraggedMask beforeEvent:theEvent]; On Tue, May 5, 2009 at 6:09 AM, Henrietta Read readhenrie...@gmail.comwrote: Hi, I'm using an Image Well as a button... such as: -

NSTextView Tabs ...

2009-05-05 Thread Mic Pringle
Hi, I'm working on a project that accepts user input via an NSTextView instance, but I would like to have a user-defined number of spaces inserted when the tab key is pressed. Similar to how TextMate allows. What is the best way to acheive this ? NSLayoutManager or key press events ? Any help

Re: A tree data structure?

2009-05-05 Thread BJ Homer
You may be interested the CHDataStructures framework, hosted by the BYU CocoaHeads group. It has a number of such structures that should work for you. http://cocoaheads.byu.edu/code/CHDataStructures http://cocoaheads.byu.edu/code/CHDataStructures-BJ Homer On Tue, May 5, 2009 at 7:10 AM, Andreas

Re: WTF? Is a file corrupted?

2009-05-05 Thread Bill Bumgarner
On May 5, 2009, at 6:40 AM, Scott Ribe wrote: Application that's been running a long time, now one user out of dozens gets this crash first thing after logging in (and, obviously, going to select a menu item to get started): Thread 0 Crashed: 0 com.apple.QD

Re: Bindings related NSUndoManager problem

2009-05-05 Thread Benjamin Stiglitz
Now I have come to implement Undo. It actually works, but there is a problem (see below). The code to implement Undo is in my view class: - (void)removePath:(PathElement *)oldPath { NSUndoManager *undo = [[self window] undoManager]; [undo registerUndoWithTarget:self

Re: Correct memory management in -awakeAfterUsingCoder: ?

2009-05-05 Thread Michael Ash
On Tue, May 5, 2009 at 12:45 AM, Graham Cox graham@bigpond.com wrote: If I retain the object before returning it in -awakeAfterUsingCoder:, the problem goes away, but this appears to violate normal memory management rules, so it's not clear that this is the correct solution. The

Re: WTF? Is a file corrupted?

2009-05-05 Thread Scott Ribe
Does the app just work for a long while when the same user restarts it? No, sorry about being unclear. What I meant was that the app has been installed working for a while since the last update, that users typically leave it running for days on end. But this is happening immediately after

Re: how to combine addObject in mutablearray with Object instantiation?

2009-05-05 Thread Michael Ash
On Tue, May 5, 2009 at 2:05 AM, Weydson Lima weys...@gmail.com wrote: Sorry for jumping in, but I have a question in the following line: For other objects, you'll have to use a convenience method like:        [myArray addObject:[NSNumber numberWithInt:7]]; When you add a NSNumber object,

Re: A tree data structure?

2009-05-05 Thread Andreas Grosam
On May 5, 2009, at 3:21 PM, Ken Thomases wrote: On May 5, 2009, at 8:10 AM, Andreas Grosam wrote: NSTreeController and CFTree is not exactly what I'm searching for. I would like to have a *pure*, simple and effective but complete tree data structure which comprises a hierarchy of

Re: FTP Client Framework

2009-05-05 Thread Jason Todd Slack-Moehrle
Hi Ammar, I use the connection kit all the time, what are your questions? -Jason On May 3, 2009, at 7:02 AM, Ammar Ibrahim wrote: I'm building a client/server app. The client and server communicate using FTP. I added my own custom commands, since this application will be in a controlled

Re: A tree data structure?

2009-05-05 Thread Graham Cox
On 06/05/2009, at 1:28 AM, Andreas Grosam wrote: Please don't underestimate the effort to just roll your own. Nor overestimate it ;-) Bear in mind that a simple tree can be implemented using multiple instances of just one small object, the node itself. Usually that's all you have to

Re: Core Data: [Fixed] NSPredicate failing when using NSSQLiteStoreType

2009-05-05 Thread Sean McBride
On 5/5/09 9:28 AM, Yvan BARTHÉLEMY said: Changing predicates raises other exceptions, but I couldn't make this work. I need to switch from XML to SQLite because my model needs to scale. Here is the other variants I tried and their associated exceptions : [request setPredicate:[NSPredicate

Re: NSTextView Tabs ...

2009-05-05 Thread Ashley Clark
On May 5, 2009, at 9:42 AM, Mic Pringle wrote: I'm working on a project that accepts user input via an NSTextView instance, but I would like to have a user-defined number of spaces inserted when the tab key is pressed. Similar to how TextMate allows. What is the best way to acheive this ?

[iPhone] tab bar and navigation combined...

2009-05-05 Thread James Lin
Hi list, I have a iPhone program. The main interface is Tab Bar based and consist of 3 Tab Bar views. On two of the tab bar views, I'll have a table view on each of them. Once the table view cell is clicked, I need to do a pushview to show details of the item selected. Basically I am

Re: [iPhone] tab bar and navigation combined...

2009-05-05 Thread Luke the Hiesterman
You should put navigation controllers inside of your tab bar controller. That is, on the tab you want to contain navigation features, set that tab's view controller to be a UINavigationController. Then when you need to push a view, you can simply call pushViewController:animated: on that

Re: A tree data structure?

2009-05-05 Thread WT
On May 5, 2009, at 5:52 PM, Graham Cox wrote: On 06/05/2009, at 1:28 AM, Andreas Grosam wrote: Please don't underestimate the effort to just roll your own. Nor overestimate it ;-) Bear in mind that a simple tree can be implemented using multiple instances of just one small object, the

Re: [iPhone] tab bar and navigation combined...

2009-05-05 Thread Brian Slick
I found this thread: http://www.iphonedevsdk.com/forum/iphone-sdk-development/2447-tab-bar-controller-navigation-controller-tableview.html ...to be very helpful when trying to accomplish the same thing. Brian On May 5, 2009, at 11:38 AM, James Lin wrote: Hi list, I have a iPhone program.

High Scores local to iPhone app

2009-05-05 Thread Eric E. Dolecki
I am looking to save and read name/score pairs and started looking at SQLite to do this. I'm checking the Books sample application and there seems to be tons of code in there to basically provide the solution. Is there a better option than SQLite to do this in Obj-C (iPhone)? Eric

Re: High Scores local to iPhone app

2009-05-05 Thread Bill Bumgarner
On May 5, 2009, at 11:18 AM, Eric E. Dolecki wrote: I am looking to save and read name/score pairs and started looking at SQLite to do this. I'm checking the Books sample application and there seems to be tons of code in there to basically provide the solution. Is there a better option

Re: How to debug GC related EXC_BAD_ACCESS

2009-05-05 Thread Bill Bumgarner
On Nov 24, 2008, at 11:45 AM, Nirias wrote: I have a garbage collected application that runs (apparently) flawlessly with a debug build. But with a release build it promptly fails with an EXC_BAD_ACESS error. My guess is that somehow the GC is not seeing a clear reference to some

How remove a clip path?

2009-05-05 Thread McLaughlin, Michael P.
In a custom NSBezierView, I fill the view with a background color then set a clip path that will eventually be drawn as a map. I do this so that I can color-code the map (in a complicated way) without going outside the lines. If I then draw the map, external boundaries are drawn as half-width

Re: High Scores local to iPhone app

2009-05-05 Thread Eric E. Dolecki
Probably only 10... however I understand that a plist can't store complex data... how would this work for pairs? Normally I'd only be able to store just a list of scores, not paired with names, correct? On Tue, May 5, 2009 at 2:23 PM, Bill Bumgarner b...@mac.com wrote: On May 5, 2009, at 11:18

Re: How remove a clip path?

2009-05-05 Thread Randall Meadows
On May 5, 2009, at 12:47 PM, McLaughlin, Michael P. wrote: In a custom NSBezierView, I fill the view with a background color then set a clip path that will eventually be drawn as a map. I do this so that I can color-code the map (in a complicated way) without going outside the lines. If

Re: High Scores local to iPhone app

2009-05-05 Thread Randall Meadows
On May 5, 2009, at 12:50 PM, Eric E. Dolecki wrote: Probably only 10... however I understand that a plist can't store complex data... how would this work for pairs? Normally I'd only be able to store just a list of scores, not paired with names, correct? Wrong. A plist can contain an

How remove a clip path? SOLVED

2009-05-05 Thread McLaughlin, Michael P.
Naturally, I came up with a solution two minutes after posting my query to this list :-( My solution is [[NSBezierPath bezierPathWithRect:rect] setClip]; where rect is the viewRect. This works for me. It might not be the best solution in all cases. *** Original post *** In a custom

Re: A tree data structure?

2009-05-05 Thread Jeffrey Oleander
On Tue, 2009/05/05, WT jrca...@gmail.com wrote: From: WT jrca...@gmail.com Subject: Re: A tree data structure? To: Cocoa-Dev List cocoa-dev@lists.apple.com Date: Tuesday, 2009 May 5, 12:19 Please let's not forget that a tree data structure is often pretty much useless without some form of

Re: Cocoa-dev Digest, Vol 6, Issue 680

2009-05-05 Thread Jan-Willem Buurlage
Thanks for your reply, there is still so much I need to learn. I thought adding an autorelease pool wasn't necessary when garbage collection was turned on? I suppose making the NSBitmapRep image is taking so long to convert to because I have seven CISourceOverCompositing filters to combine

Re: High Scores local to iPhone app

2009-05-05 Thread J. Roman
You could store it as an array of dictionaries or arrays, for example. On 5-May-09, at 2:50 PM, Eric E. Dolecki wrote: Probably only 10... however I understand that a plist can't store complex data... how would this work for pairs? Normally I'd only be able to store just a list of scores,

Re: High Scores local to iPhone app

2009-05-05 Thread Peter Blazejewicz
hi Eric, On May 5, 2009, at 8:23 PM, Bill Bumgarner wrote: On May 5, 2009, at 11:18 AM, Eric E. Dolecki wrote: I am looking to save and read name/score pairs and started looking at SQLite to do this. I'm checking the Books sample application and there seems to be tons of code in there to

Re: How remove a clip path? SOLVED

2009-05-05 Thread Steve Christensen
On May 5, 2009, at 11:57 AM, McLaughlin, Michael P. wrote: Naturally, I came up with a solution two minutes after posting my query to this list :-( My solution is [[NSBezierPath bezierPathWithRect:rect] setClip]; where rect is the viewRect. This works for me. It might not be the best

Re: High Scores local to iPhone app

2009-05-05 Thread Bill Bumgarner
On May 5, 2009, at 11:50 AM, Eric E. Dolecki wrote: Probably only 10... however I understand that a plist can't store complex data... how would this work for pairs? Normally I'd only be able to store just a list of scores, not paired with names, correct? A property list is composed of a

Re: How to change the case of letters

2009-05-05 Thread Deborah Goldsmith
Note that this will do a non-language-sensitive case conversion. If you care about handling languages like Turkish correctly, use CFStringUppercase. Deborah Goldsmith Apple Inc. golds...@apple.com On May 4, 2009, at 10:13 PM, Graham Cox wrote: On 05/05/2009, at 3:04 PM, rethish wrote:

Re: NSManagedObjectContext -insertObject: Cancels Prior Deletion -- BUT!

2009-05-05 Thread Jerry Krinock
Thanks for the answers, yes and no, but I've found a problem doing so 1. Insert a managed object. 2. Set an attribute in the object. 3. Delete the object from its moc. 4. Execute a fetch request in the moc with no predicate. 5. Get the attribute from the object. Expected Result: The

Re: Trouble with property (copy) and retain counts

2009-05-05 Thread Malayil George
I don't think I have a leak...quite the opposite. I think the sample app I'm playing with is crashing because I might be releasing an object too soon. Which is why I resorted to retainCounts to try and track it down... George On Tue, May 5, 2009 at 7:01 PM, Nick Zitzmann n...@chronosnet.com

Re: Trouble with property (copy) and retain counts

2009-05-05 Thread Nick Zitzmann
On May 5, 2009, at 5:04 PM, Malayil George wrote: I don't think I have a leak...quite the opposite. I think the sample app I'm playing with is crashing because I might be releasing an object too soon. Which is why I resorted to retainCounts to try and track it down... You can track that

Re: Trouble with property (copy) and retain counts

2009-05-05 Thread Stephen J. Butler
Beyond the fact that retain counts are useless for debugging... On Tue, May 5, 2009 at 5:54 PM, Malayil George georg...@gmail.com wrote: NSLog(@Cell image pointer: %x, retain count: %d, [cell image], [[cell image] retainCount]); //retain count 4 NSLog(@Cell image pointer: %x, retain count:

Re: How remove a clip path?

2009-05-05 Thread Graham Cox
On 06/05/2009, at 4:47 AM, McLaughlin, Michael P. wrote: In a custom NSBezierView, I fill the view with a background color then set a clip path that will eventually be drawn as a map. I do this so that I can color-code the map (in a complicated way) without going outside the lines. If

NSWorkspace -setIcon:forFile creates garbled icon under 10.4

2009-05-05 Thread Erg Consultant
I have some code that grabs an app icon from an app bundle's .icns file and then sets it onto another file using -setIcon:forFile. Under 10.5 it works fine. Under 10.4 the icon gets set but is garbled. I tried all the options but still get the same result. Does anyone know why this happens on

Custom tableView cell by subclassing NSCell

2009-05-05 Thread Malayil George
Hi, I'm trying to expand on Styling an NSTableView at katidev.com in a test app of mine. The modification that I have made is that in my subclass of NSCell, I have included a new NSImage data element @interface CustomCell : NSCell { NSImage *image; } @end In my appController, I set the

Re: Custom tableView cell by subclassing NSCell

2009-05-05 Thread Malayil George
just found http://developer.apple.com/samplecode/ImageBackground/listing3.html after posting this...going through it to see if I can figure it out :-) On Tue, May 5, 2009 at 8:41 PM, Malayil George georg...@gmail.com wrote: Hi, I'm trying to expand on Styling an NSTableView at katidev.com in

Re: Custom tableView cell by subclassing NSCell

2009-05-05 Thread Malayil George
Interestingly changing the property type from copy as I had it to retain @property (retain) NSImage *image; seems to have fixed the problem Not entirely sure why tho. I would imagine that with copy, my cell would be getting a copy of the image with a retain count of 1. When dealloced it goes

Re: Custom tableView cell by subclassing NSCell

2009-05-05 Thread Joar Wingfors
On 5 maj 2009, at 17.41, Malayil George wrote: The modification that I have made is that in my subclass of NSCell A couple of points: * NSCell already have an image property. Why are you adding an additional image property? If you're adding an additional image property, you should give

Binding the enabled attribute of each NSPopUpButtonCell

2009-05-05 Thread Dave Geering
Hi List, I've got a problem when I try to bind the enabled attribute of an NSPopUpButtonCell. I have set up an NSArray of custom objects, these custom objects provide two keys that I want to use for binding (and other keys for other uses). The two keys are optionTitle and optionAllowed. I have

Re: Binding the enabled attribute of each NSPopUpButtonCell

2009-05-05 Thread Ken Thomases
On May 5, 2009, at 8:46 PM, Dave Geering wrote: I've got a problem when I try to bind the enabled attribute of an NSPopUpButtonCell. I have set up an NSArray of custom objects, these custom objects provide two keys that I want to use for binding (and other keys for other uses). The two keys

Re: Binding the enabled attribute of each NSPopUpButtonCell

2009-05-05 Thread Jerry Krinock
Bindings are wonderful. I try and use bindings whenever available -- except when I'm dealing with menus. You see from Ken's response that there are things that just don't fit, or if they do fit, it might take a long time to figure out how. My advice is to not use bindings to create

instantiateNibWithOwner: fails due to mutated while enumerated

2009-05-05 Thread Philip White
Hello, I changed the target on my program from 10.4 to 10.5, built it fine but now the following line of code fails: [[self nib] instantiateNibWithOwner:self topLevelObjects:topLevelObjects]; where [self nib] is simply -(NSNib*)nib { static NSNib *nib=nil; if

UITextField not sending messages to delegate

2009-05-05 Thread Development
I have a UITextfield that I have set the delegate for. I have a default keyboard and when you hit the send key (I've set the return to send) nothing happens. I have the - (void)textFieldDone:(id)sender method implemented but the didendediting notification is never sent and the

Advice for drawing complex, line-based designs

2009-05-05 Thread Tom Roehl
I'm working on a project where I'm reading in a file that contains a list of coordinates that are used to define a stitch pattern for embroidery machines. Think of those machines you see at the mall that stitch names and logos on hats and t-shirts. To display the images, I created a

How to align a custom view in a toolbar ???

2009-05-05 Thread Anders Lassen
Hi, I am working on a program where I plan to put a mode selector in the upper right corner. I hope to implement this using a toolbar and a custom view. The custom view contains the mode selector, which is a NSSegmented control. So far, I have managed to display the custom view in the

NSNotificationQueue NSOperationQueue thread death

2009-05-05 Thread Eric Hermanson
The doc for NSNotificationQueue says: When the thread where a notification is enqueued terminates before the notification queue posts the notification to its notification center, the notification goes unposted. My question is, do the NSOperationQueue thread(s) stay around long enough so

Re: Binding the enabled attribute of each NSPopUpButtonCell

2009-05-05 Thread Dave Geering
On Wed, May 6, 2009 at 12:57 PM, Jerry Krinock je...@ieee.org wrote: Bindings are wonderful.  I try and use bindings whenever available -- except when I'm dealing with menus. You see from Ken's response that there are things that just don't fit, or if they do fit, it might take a long time

Re: NSNotificationQueue NSOperationQueue thread death

2009-05-05 Thread Eric Hermanson
I'll also ask a follow-up question, and that is, if one puts an NSNotification onto the thread's NSNotificationQueue in a method called by performSelectorInBackground..., then is it safe to assume this notification will probably never get sent because the thread spawned automatically by

Re: Advice for drawing complex, line-based designs

2009-05-05 Thread Graham Cox
On 06/05/2009, at 12:28 PM, Tom Roehl wrote: I'm working on a project where I'm reading in a file that contains a list of coordinates that are used to define a stitch pattern for embroidery machines. Think of those machines you see at the mall that stitch names and logos on hats and

Re: NSNotificationQueue NSOperationQueue thread death

2009-05-05 Thread Michael Ash
On Tue, May 5, 2009 at 11:44 PM, Eric Hermanson zmons...@mac.com wrote: I'll also ask a follow-up question, and that is, if one puts an NSNotification onto the thread's NSNotificationQueue in a method called by performSelectorInBackground..., then is it safe to assume this notification will

Minimize All - sends what?

2009-05-05 Thread Gerriet M. Denkmann
In a Cocoa app when I click Window - Minimize -[NSWindow performMiniaturize:] is called, which then calls -[NSWindow miniaturize:]. When I click the yellow button of a window, -[NSWindow miniaturize:] is called directly. Seen and checked in Debugger. But what is called when I

Re: Binding the enabled attribute of each NSPopUpButtonCell

2009-05-05 Thread Jerry Krinock
On 2009 May 05, at 20:40, Dave Geering wrote: It'd be nice if I could somehow hook into whatever is responsible for making the menu . . . - (void) willAddMenuItem:(NSMenuItem *) aMenuItem toPopUpButton:(NSPopUpButton *) forObject:(id) yourObject { [aMenuItem setEnabled:[[yourObject

Re: Minimize All - sends what?

2009-05-05 Thread Graham Cox
On 06/05/2009, at 11:01 AM, Gerriet M. Denkmann wrote: But what is called when I Option-click Window - Minimize (the Menu Item changes to Minimize All)? I cannot find any information in Interface Builder. And see no obvious methods in NSWindow. NSApplication: -

Re: Binding the enabled attribute of each NSPopUpButtonCell

2009-05-05 Thread Dave Geering
On Wed, May 6, 2009 at 2:30 PM, Jerry Krinock je...@ieee.org wrote: But then there would have to be another API to give it the items, and another to localize the titles.  Don't wish for that. Well, it's still not too bad an idea for me. optionTitle is already localised in my custom object

Re: instantiateNibWithOwner: fails due to mutated while enumerated

2009-05-05 Thread Jonathan Hess
Hey Philip - Have you tried running with a breakpoint on objc_exception_throw? Looking at the backtrace when you hit the exception could shed some light on what is happening. If that doesn't work, you could try a breakpoint on NSLog(), or even write(). After you hit the breakpoint, a

Associating Objective-C objects with Java objects using JNI

2009-05-05 Thread Kelvin Chung
I'm trying to find a good way of associating an Objective-C object with an arbitrary Java object, so that you could essentially delegate the Objective-C method call to a Java object. I envision that this would have to be done using JNI. However, I don't know the specifics of how it can