Re: Minimize All - sends what?

2009-05-05 Thread Gerriet M. Denkmann
On 6 May 2009, at 11:41, Graham Cox wrote: 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.

Re: Associating Objective-C objects with Java objects using JNI

2009-05-05 Thread Greg Guerin
Kelvin Chung wrote: 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 specif

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 be

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 quic

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 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 because it comes

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: - (void)miniaturizeAll:(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 valu

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 Option-cl

Re: NSNotificationQueue & NSOperationQueue thread death

2009-05-05 Thread Michael Ash
On Tue, May 5, 2009 at 11:44 PM, Eric Hermanson 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 probably neve

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 t-shir

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 p

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 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 to figure

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

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 to

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 documen

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 textFieldDone

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

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 menus

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 are

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 hav

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

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 to

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 wrote: > Hi, I'm trying to expand on "Styling an NSTableView" at katidev.com in a > test app of

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

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 10

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

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 wrote: > NSLog(@"Cell image pointer: %x, retain count: %d", [cell image], [[cell > image] retainCount]); //retain count 4 > > NSLog(@"Cell image pointer: %x, retain count: %d", [cell ima

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 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 wrote: > > On May 5, 2

Re: Trouble with property (copy) and retain counts

2009-05-05 Thread Nick Zitzmann
On May 5, 2009, at 4:54 PM, Malayil George wrote: If the getter is always incrementing the reference count by 1, I would expect the reference count at each NSLog, where I am using the getter, to be 2 above the previous value. This doesn't seem to be the case for line 3 of the output where i

Re: Trouble with property (copy) and retain counts

2009-05-05 Thread Malayil George
Hi, Thanks for the replies. Things are a bit clearer now, that I understand the synthesized getters are returning retained and auto-released objects. However, the behavior doesn't seem to be entirely consistent. I have marked in comments below what I would expect the retain count to be

Re: How remove a clip path? SOLVED

2009-05-05 Thread Michael Ash
On Tue, May 5, 2009 at 2:57 PM, 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 t

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

2009-05-05 Thread Michael Ash
On Tue, May 5, 2009 at 3:15 PM, Jan-Willem Buurlage wrote: > 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 wasn't aware that you were using garbage collection. Autorelease pools ca

Re: How to change the case of letters

2009-05-05 Thread Kyle Sluder
On Tue, May 5, 2009 at 5:31 PM, Deborah Goldsmith wrote: > Note that this will do a non-language-sensitive case conversion. If you care > about handling languages like Turkish correctly, use CFStringUppercase. This brings up a question I've had for a while. I would like to file an enhancement re

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

2009-05-05 Thread James Montgomerie
On 5 May 2009, at 16:38, James Lin wrote: Basically I am doing a Tab Bar based application but need Navigation functionalities combined into one. This is covered in the "View Controller Programming Guide for iPhone OS", in the "Combining Tab Bar and Navigation Controllers" section: http:/

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: T

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: Ac

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 rela

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 s

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 ba

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, n

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 sev

Re: A tree data structure?

2009-05-05 Thread Jeffrey Oleander
> On Tue, 2009/05/05, WT wrote: > From: WT > Subject: Re: A tree data structure? > To: "Cocoa-Dev List" > 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 > balancing... The OP's post reminds me of a coupl

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 NSBezierV

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 NSDi

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". I

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 wrote: > On May 5, 2009, at 11:18 AM, Eric E.

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 l

"Arrange in Front" menu item and iterating over menus

2009-05-05 Thread kvic...@pobox.com
if i iterate over all the menu items in the main menu bar in NSApplication's delegate method: applicationDidFinishLaunching, then i don't find the menu item for "Arrange in Front" (an alternate for "Bring All to Front") for the Window menu. if i either click on the Window menu (in the main men

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 object(s

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 than

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: [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. T

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 n

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 na

[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 do

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 ? NSLay

Re: A tree data structure?

2009-05-05 Thread Clark Cox
On Tue, May 5, 2009 at 8:28 AM, Andreas Grosam wrote: > > On May 5, 2009, at 3:21 PM, Ken Thomases wrote: >> >> Since you mention NSTreeController and CFTree, you may already be aware of >> this, but just in case you aren't: have you looked at NSTreeNode? > > I didn't - thanks for this hint :) And

Re: KVC array proxy objects

2009-05-05 Thread Ashley Clark
The documentation[1] about accessor search order shows that it will prefer a method named - over the corresponding -countOf and - objectInAtIndex: methods. Specifically you should read the section about the search pattern for valueForKey. The mutableArrayValueForKey proxy only details how ar

Re: A tree data structure?

2009-05-05 Thread Andreas Grosam
On May 5, 2009, at 4:46 PM, BJ Homer wrote: 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 -BJ Homer This is a quite interesting frame

Re: WTF? Is a file corrupted?

2009-05-05 Thread Jim Correia
On May 5, 2009, at 9: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 0x9175736

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:[NSPred

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 c

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 e

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 object

Re: WTF? Is a file corrupted?

2009-05-05 Thread Bill Bumgarner
On May 5, 2009, at 8:15 AM, Scott Ribe wrote: 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

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 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, how can

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: Correct memory management in -awakeAfterUsingCoder: ?

2009-05-05 Thread Michael Ash
On Tue, May 5, 2009 at 12:45 AM, Graham Cox 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 > documentation doesn't explici

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 registerUndoWithTarge

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 0x91757360

Re: NSImage drawing

2009-05-05 Thread Keary Suska
On May 4, 2009, at 3:51 PM, Livio Isaia wrote: I have a custom NSButtonCell named MyButtonCell with a drawing method: - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { cellFrame = [self imageRectForBounds:cellFrame]; [[self image] drawInRect:cellFrame fromRe

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 -BJ Homer On Tue, May 5, 2009 at 7:10 AM, Andrea

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 wi

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 wrote: > Hi, > > I'm using an Image Well as a button... such as: > > > - (void)mouseDown:(NSEvent *)

KVC array proxy objects

2009-05-05 Thread Aaron Braunstein
I'm trying to understand how the proxy object which is returned from mutableArrayValueForKey: works and I've hit a bit of a wall. I get what the proxy is and why it exists. I have a test app which allows me to do things to/with the collection it represents and it all works fine. The pro

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: 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

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,

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(); [vi

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

Re: NSManagedObjectContext -insertObject: Cancels Prior Deletion?

2009-05-05 Thread Dave Fernandes
Yes... Begin forwarded message: From: Ben Trumbull Date: March 28, 2009 1:47:07 AM EDT (CA) To: Nick Zitzmann Cc: Cocoa Developers Subject: re: "Un-deleting" objects in an NSManagedObjectContext? -insertObject: is the reciprocal of deleteObject: You can use it to cancel a deletion. -

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, sizeof(ser

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 us

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 = [[NSIm

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 n

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 wi

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: 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: http://github.com/tcurdt/feedbackreporter/blob/443300c21f6b7c5b70298edd861b4b2017a97b00/Sources/Main/F

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 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 hole. I said it opened

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: 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. Con

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 t