Re: Path handling routines

2008-10-29 Thread Jonathan del Strother
NSString has most of them. See -[NSString pathComponents], -[NSString stringByAppendingPathComponent:] etc. On Wed, Oct 29, 2008 at 1:01 PM, Daniel Luis dos Santos [EMAIL PROTECTED] wrote: Hello, Are there in the Foundation framework (or anywhere else on the Cocoa platform) path handling

Re: how to run single instance?

2008-10-27 Thread Jonathan del Strother
On Tue, Oct 28, 2008 at 4:54 PM, han [EMAIL PROTECTED] wrote: how to run single instance? Double click ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: CGPoint wrapper?

2008-10-23 Thread Jonathan Dann
If you're targeting Leopard then you can use the NS_BUILD_32_LIKE_64 flag and use NSRect/Point/Size and CGRect/Point/Size interchangeably without the cast or the inline conversion functions. Here's a how-to http://theocacao.com/document.page/552 Jonathan http://espresso-served-here.com

Re: Using Core Animation to animate view properties?

2008-10-23 Thread Jonathan Dann
with this for a while now. Jonathan http://espresso-served-here.com On 22 Oct 2008, at 20:13, Jim Correia wrote: On Oct 22, 2008, at 12:54 PM, Matt Long wrote: 1. If you want to know whether an animation is still running, just check to see if it is still in the animations dictionary in the layer

Re: NSMutableDictionary won't accept my NSString as Value (NEWBIE)

2008-10-23 Thread Jonathan del Strother
On Thu, Oct 23, 2008 at 12:34 PM, Sebastian Pape [EMAIL PROTECTED] wrote: But my NSMutableDictionary won't accept my NSString, because it requires setValue:(id)value and I just have my NSString. 'id' is just a generic type - anything that accepts id will accept NSString, NSObject, NSData, etc.

Re: Core Data saving / Leopard / The temporary directory at ...

2008-10-21 Thread Jonathan Freeman
the objects that have been deleted (using deleteObject:)—if an object has been inserted and deleted without an intervening save operation, it is not included in the set. I was able to remove and clean up some legacy code, thanks so much! Jonathan Freeman

Core Data saving / Leopard / The temporary directory at ...

2008-10-20 Thread Jonathan Freeman
to behave correctly. Thanks so much for your time, Jonathan Freeman __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Cocoa-dev mailing list (Cocoa

Re: Desired Tabbing order not working

2008-10-16 Thread Jonathan Hess
Hey Adil - Do you happen to have the Auto Recalculates View Loop checkbox checked in the containing window's attributes inspector? Jon Hess On Oct 16, 2008, at 1:31 PM, Adil Saleem wrote: Hi, There is a small problem i am having while using Interface Builder. I have multiple text

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-15 Thread Jonathan del Strother
On Wed, Oct 15, 2008 at 11:36 AM, Chris Suter [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 9:03 PM, John Engelhart [EMAIL PROTECTED] wrote: On Oct 14, 2008, at 7:11 AM, Chris Suter wrote: You can't override the type for existing methods. For example, initWithString: always returns an

Re: NSView subclass

2008-10-15 Thread Jonathan Hess
On Oct 15, 2008, at 2:30 PM, Scott Andrew wrote: If its a delegate you would want to check if the delegate handles the selector with respondsToSelector and the use performSelector to make the call. For example if ([delegate respondsToSelector:@selector(pointClicked:)]) [delegate

Re: EXC_BAD_ACCESS with NSAutoReleasePool, NSThread and NSThreadWillExitNotification

2008-10-14 Thread Jonathan del Strother
On Tue, Oct 14, 2008 at 3:38 PM, John Zorko [EMAIL PROTECTED] wrote: Hello, all ... I'm experiencing a crash after a thread exits. Program received signal: EXC_BAD_ACCESS. (gdb) bt #0 0x300c8c18 in objc_msgSend () #1 0x3067073a in NSPopAutoreleasePool () #2 0x306770ea in

Re: Trouble with NSSplitView

2008-10-08 Thread Jonathan Hess
/ApplicationKit/Classes/NSSplitView_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/splitView:canCollapseSubview: Good Luck - Jon Hess Dave On Oct 7, 2008, at 10:43 PM, Jonathan Hess wrote: On Oct 7, 2008, at 4:44 PM, Dave Fernandes wrote: I had the same problem. The fix

Re: Problems with loose ViewController coupling and KVO to-many relationships

2008-10-07 Thread Jonathan del Strother
On Tue, Sep 30, 2008 at 8:19 PM, Jonathan del Strother [EMAIL PROTECTED] wrote: Heya I'm struggling a bit with NSViewControllers. My app displays a list of widgets. I have a Widget model, a WidgetView view (an NSView subclass), and a WidgetViewController (an NSViewController subclass). All

Re: Trouble with NSSplitView

2008-10-07 Thread Jonathan Hess
On Oct 7, 2008, at 4:44 PM, Dave Fernandes wrote: I had the same problem. The fix was to recreate the view in IB. Seems to be a bug in IB, but I never tried to repeat the problem once it was fixed. This isn't a problem with IB, it also isn't unique to split views. The problem has to do

Re: premature dealloc of the datasource of a NSTableView crashes my application

2008-10-05 Thread Jonathan Hess
On Oct 5, 2008, at 6:32 AM, Dr. Rolf Jansen wrote: Am 05.10.2008 um 00:36 schrieb Michael Ash: On Sat, Oct 4, 2008 at 4:01 PM, Dr. Rolf Jansen [EMAIL PROTECTED] wrote: Mac OS X 10.5.5, Xcode 3.1.1, PowerBook G4. ... In order to prevent my application from crashing, I overwrote

Re: Clueless about this warning

2008-10-04 Thread Jonathan del Strother
On Sat, Oct 4, 2008 at 3:43 PM, Andre Masse [EMAIL PROTECTED] wrote: Hi, Can someone explain to me why I get this compiler warning (BigLetterView is a subclass of NSView): 'BigLetterView' may not respond to '-prepareAttributes' - (id)initWithFrame:(NSRect)rect { if(![super

Re: Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-10-03 Thread Jonathan Oddie
Message: 8 Date: Fri, 3 Oct 2008 01:09:48 -0700 From: Ken Ferry [EMAIL PROTECTED] Subject: Re: Newbie: Strange problem with NSTableView, check boxes and Core Data To: Jonathan Oddie [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Message-ID: [EMAIL PROTECTED] Content-Type: text

Re: Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-10-02 Thread Jonathan Oddie
On Sep 29, 2008, at 5:36 PM, Corbin Dunn wrote: On Sep 29, 2008, at 10:55 AM, Jonathan Oddie wrote: Hi all, I'm new on this list -- teaching myself Cocoa programming by writing a small utility as a Core Data document-based application. Mostly I have everything working well

Re: Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-10-02 Thread Jonathan Oddie
On Oct 2, 2008, at 11:55 AM, Corbin Dunn wrote: Thanks for the advice Corbin. Below is a long backtrace, but I am not sure it sheds much light on the problem. I will keep working at it but since I am moving house this week I may not get much done for a while... Jonathan

Re: Newbie: Simple display with NSView - problem

2008-10-01 Thread Jonathan del Strother
On Thu, Oct 2, 2008 at 12:42 AM, Graham Cox [EMAIL PROTECTED] wrote: On 2 Oct 2008, at 5:02 am, Genu Mathew wrote: On debugging, I found that when I run the command [NewWindow showWindow:self] in the APPController class, the constructor of 'OUSubImageView is called twice Sounds like you

Problems with loose ViewController coupling and KVO to-many relationships

2008-09-30 Thread Jonathan del Strother
a reordering), but they all seem pretty ugly and heavyweight. How is this usually handled? How do you managed your view controller lifetimes w.r.t. the model lifetime? Thanks for reading this far, any suggestions would be greatly appreciated -Jonathan

Re: NSWindowController retain count confusion

2008-09-30 Thread Jonathan Hess
On Sep 30, 2008, at 12:01 PM, James Walker wrote: Jonathan Hess wrote: The method -[NSObject retainCount] only exists to aid in debugging. You shouldn't be making any runtime decisions based on the return value of retainCount. You should only release something you previously retained

Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-09-29 Thread Jonathan Oddie
to the [NSCFNumber intValue]: unrecognized selector problem recently discussed here, but I'm not explicitly using any threads in this app. It almost seems like something is getting freed by the garbage collector before it's used. Thanks for any advice about a newbie's problem, Jonathan

Re: NSWindowController retain count confusion

2008-09-29 Thread Jonathan Hess
Hey James - The method -[NSObject retainCount] only exists to aid in debugging. You shouldn't be making any runtime decisions based on the return value of retainCount. You should only release something you previously retained/alloced/newed/copied or are for some other reason explicitly

Re: Porting 'operator' to Obj-C

2008-09-26 Thread Jonathan Prescott
the type. Jonathan On Sep 26, 2008, at 11:40 AM, Alex Finkel wrote: Thanks, but can you point me in the right direction. The code bellow does not build. Am I doing something wrong with the struct? typedef struct dbnames { short Handle; short Version; int Size; intNumEntries

Re: [Q] Custom NSFormatter and IB's Cocoa Simulator

2008-09-22 Thread Jonathan Hess
On Sep 22, 2008, at 4:01 PM, JongAm Park wrote: Hello. I tried making my own custom NSFormatter by following the guide, Interface Builder Plug-In Programming Guide However, when I tried my NSFormatter subclass using the Simulate Interface menu item of the Interface Builder, it rasied :

Re: Multi DB Library

2008-09-17 Thread Jonathan Monroe
company, as part of our Actual Open Source Databases driver: http://www.actualtech.com/product_opensourcedatabases.php For using ODBC with Cocoa, I recommend using Andy Satori's BSD- licensed ODBCKit: http://sourceforge.net/projects/odbckit Jonathan Monroe Actual Technologies - ODBC for Mac OS X

Re: Swapping IB-created views and keeping IBOutlets hooked up

2008-09-16 Thread Jonathan Hess
Hey Alex - If your controller is the File's Owner, and in your NIB there is a connection connecting the the File's Owner's 'myButton' outlet to a button, then when you load the nib, the controller's myButton instance variable will be connected to the button in the nib. So far, everything

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
Hey Brad - So it sounds like you have two controllers, A, and B, and they each have their own NIB. Sound like you're on the right track. Now you want to have an action in B's NIB affect controller A. Does controller B have an instance variable, or other mechanism, for referencing

Re: App name from Bundle Identifier?

2008-09-12 Thread Jonathan Hess
Hey Dave - You could start with -[NSWorkspace absolutePathForAppBundleWithIdentifier:] to get a path. Use that path to create an NSBundle instance with +[NSBundle bundleWithPath:], and then use the NSBundle to find the name. -[NSBundle objectForInfoDictionaryKey:] and -[NSBundle

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
a reference to the main window controller, perhaps your view controller can do something like 'self window] windowController] document] mainWindowController]'. Good Luck - Jon Hess Thanks again. Brad On Sep 12, 2008, at 1:38 PM, Jonathan Hess wrote: Hey Brad - So it sounds like you have

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
:43 PM, Jonathan Hess wrote: On Sep 12, 2008, at 2:25 PM, Brad Gibbs wrote: If I'm reading your mail correctly, I've tried that without success. I have a MainWindowController controlling MainWindow. On MainWindow.xib is a button which launches another window (MainMenu,xib) with a window

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
its window, to that window's controller and then to NSApp. I don't know how to cause it to jump to the main window's window controller. On Sep 12, 2008, at 5:15 PM, Jonathan Hess wrote: On Sep 12, 2008, at 3:07 PM, Brad Gibbs wrote: Thanks for the help. I'm trying to understand your

Re: Trying to compile an ObjectiveC and C++ program in XCode 3.1

2008-09-11 Thread Jonathan Prescott
there is not a name collision. Jonathan On Sep 11, 2008, at 6:51 PM, Robert Douglas wrote: I'm in the same boat. Is the C++ code handled the same in both? I've been trying to add some numerical recipes routines to my cocoa app and I'm stymied by an apparent difference. The nr3.h header compiles fine if I

Re: confused about allocating and releasing objects

2008-08-27 Thread Jonathan del Strother
On Wed, Aug 27, 2008 at 11:45 AM, Memo Akten [EMAIL PROTECTED] wrote: HI All, i'm a bit confused about the 2 scenarios: NSDictionary *myData1 = [NSDictionary dictionaryWithContentsOfFile:@mydata.plist]; // this one I don't need to release when I'm done? NSDictionary *myData2 =

Re: confused about allocating and releasing objects

2008-08-27 Thread Jonathan del Strother
On Wed, Aug 27, 2008 at 12:13 PM, Memo Akten [EMAIL PROTECTED] wrote: ok thanks, Ive added that link to my ever growing Cocoa bookmarks!! I'm just writing a Quartz Composer plugin using the QCPlugIn API and ran into a problem regarding this, my question isn't related to the QCPlugIn API so I'm

Re: Semi-transparent, blurred NSWindow background?

2008-08-26 Thread Jonathan Dann
On 26 Aug 2008, at 00:52, Graham Cox wrote: On 26 Aug 2008, at 8:00 am, Jonathan Dann wrote: Using the private APIs / the method that Rob showed is perfectly fast. I'd really like this made easier too, so I filed an enhancement request rdar://6174287 Is it possible to file a de

Re: Semi-transparent, blurred NSWindow background?

2008-08-25 Thread Jonathan Dann
On 25 Aug 2008, at 16:58, Tim Andersson wrote: 24 aug 2008 kl. 23.20 skrev Jonathan Dann: On 24 Aug 2008, at 17:45, Tim Andersson wrote: YMMV but I'd start with a window as shown in this sample code http://developer.apple.com/samplecode/RoundTransparentWindow/index.html and then replace

Re: Semi-transparent, blurred NSWindow background?

2008-08-25 Thread Jonathan Dann
filed an enhancement request rdar://6174287 Jonathan http://espresso-served-here.com smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: call setContentBorderThickness:forEdge: in Tiger

2008-08-25 Thread Jonathan Hess
On Aug 25, 2008, at 12:22 PM, Georg Seifert wrote: Hello, I have a problem: - (id)initWithContentRect:(NSRect)contentRect styleMask: (unsigned int)windowStyle backing:(NSBackingStoreType)bufferingType defer: (BOOL)deferCreation { BOOL useTextured = YES; if([self

Re: UTI Example

2008-08-23 Thread Jonathan Dann
setObject:entityName forKey:filepath]; } if ([mutableErrorsDictionary count] != 0 dictionaryPtr != NULL) *dictionaryPtr = [[mutableErrorsDictionary copy] autorelease]; return [[mutableEntityMap copy] autorelease]; } Jonathan http://espresso-served-here.com

Re: Object change to NSView update

2008-08-22 Thread Jonathan del Strother
On Fri, Aug 22, 2008 at 3:58 PM, Paul Bruneau [EMAIL PROTECTED] wrote: I feel I can nearly grasp what I need to do, but not quite. I know what I shouldn't be doing--which is what I am doing and I feel I'm a little in the weeds. I seek a nudge in the right direction if someone can help. I have

Re: Parse form values from HTTP POST

2008-08-21 Thread Jonathan del Strother
On Thu, Aug 21, 2008 at 9:17 AM, Thomas Engelmeier [EMAIL PROTECTED] wrote: Am 20.08.2008 um 22:54 schrieb Jesse Grosjean: Does anyone know what the best way to parse form values from and HTTP Post is? I have a mini HTTP server in my app, and it needs to accept posts. I'm using CFHTTP to

Re: Outlet Initialization Uses Accessors

2008-08-20 Thread Jonathan Hess
Yes it does. One thing to be aware of is that this can lead you to retain your outlets. Also, if you have an action named '-(IBAction) setFoo:(id)sender' and an outlet named foo, setting the outlet at runtime will be defeated by the existence of the action with the matching KVC name. It's

Re: MacBook Wake On Lan

2008-08-20 Thread Jonathan Hendry
in the mini-DVI-VGA adaptor from Apple. Jonathan Hendry Howard Hughes Medical Institute Maunsell Lab Harvard Medical School ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: Question about respondsToSelector

2008-08-19 Thread Jonathan del Strother
On Tue, Aug 19, 2008 at 2:33 PM, Carmen Cerino Jr. [EMAIL PROTECTED] wrote: Sorry about the sketchy details. Basically I have a wrapper class for the Sequence Grabber, and I want to setup a delegate for the decompression callback. This is where I use the respondsToSelector method: static

Re: document based app, custom ibaction

2008-08-19 Thread Jonathan Hess
Hey Bart - Understanding the File's Owner is really an essential part of understanding how to use Interface Builder effectively. At the most basic level, all NIBs are loaded at runtime with a call to -[NSBundle loadNibNamed:owner:]. The method takes two arguments, a NIB name which is the

Re: Threading problem using AsyncSocket (Matthew Youney)

2008-08-15 Thread jonathan
- (void)doAcceptWithSocket: (CFSocketNativeHandle)newNative and the delegate method -[theDelegate onSocket:self wantsRunLoopForNewSocket:newSocket]. 5. Use CFRunLoopContainsSource to check that your socket has been successfully added to the correct run loop. Good luck! Jonathan FROM : Matthew

Re: Threading problem using AsyncSocket (Matthew Youney)

2008-08-15 Thread jonathan
. Jonathan On 14 Aug 2008, at 23:42, Matthew Youney wrote: Jonathan, The reason I need to thread is not anything to do with AsyncSocket, which is an excellent library that does not block. I have several time consuming operations that must occur sequentially. These sequences need to run

Re: drawRect is erasing view

2008-08-14 Thread Jonathan Hess
Hey Jeff - The expectation of drawRect is that it will repaint the entire invalid area. I don't think there is a way to do additive drawing on each call to draw rect. If you'd like to re-use and erase portions of the same picture, you could draw to a bitmap context that you keep around and

Re: Get specified window from nib

2008-08-12 Thread Jonathan Hess
On Aug 12, 2008, at 3:33 AM, Andy Lee wrote: On Aug 10, 2008, at 10:07 PM, Graham Perks wrote: 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

Re: Newbie Question on self

2008-08-11 Thread Jonathan Hess
On Aug 11, 2008, at 10:47 AM, Matt Keyes wrote: Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with this i.e. this.m_sMyString = this is my string; In Objective-C, this doesn't seem as clear to me (or

Re: Problem with friend function and gcc 4.2 with

2008-08-11 Thread Jonathan Prescott
Operator signatures are already know by the compiler since they are defined in the standard, and are really global in scope. Thus, you don't have to declare them prior to defining them. Jonathan On Aug 10, 2008, at 11:09 PM, Ken Worley wrote: First, I appreciate the response

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

2008-08-09 Thread Jonathan deWerd
On Aug 9, 2008, at 4:48 PM, Cate Tony wrote: This code is leaking: - (void)saveItemExtensions:(id)sender { NSMutableString* itemExtensionsFilePath = [NSMutableString stringWithString:@~/Library/Preferences/MyApp/extensions.abc]; NSDictionary* extensions = [NSDictionary

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

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

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

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

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

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

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

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

Re: Using performSelector: on super

2008-08-06 Thread Jonathan deWerd
The solution I would use would be to implement a category on super's class, or rename the method (probably the best option from a design standpoint). For instance, suppose we have (stretching the objc syntax a bit) @implementation FooClass - (void)sayHi { NSLog(@Hi); } @end

Re: Command Line Argument - Choosing a Style

2008-08-06 Thread Jonathan deWerd
I would make plugins of a different type: standard cocoa bundles (there are a handful of tutorials on google). This way, people could install and uninstall using the finder (a little known but helpful feature of the info box), you could use standard cocoa APIs, you wouldn't have to deal

Re: reloading an NSTreeController

2008-08-05 Thread Jonathan Dann
On 4 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: On 3 Aug 2008, at 16:53, Jonathan Dann wrote: On 3 Aug 2008, at 04:35, Gerriet M. Denkmann wrote: On 3 Aug 2008, at 05:51, Jonathan Dann wrote: On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: But all disclosure triangels are now

Re: handling idle events

2008-08-05 Thread Jonathan Hess
Hey Jim - The typical way that I like to handle this is with these methods from NSRunLoop.h: @interface NSObject (NSDelayedPerforming) - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay inModes:(NSArray *)modes; -

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

2008-08-05 Thread Jonathan Hess
On Aug 5, 2008, at 7:27 PM, Erik Buck wrote: You could add a category to NSArray... @implementation NSArray (ArrayOfStringsAsSingleString) - (NSString *)arrayOfStringsAsSingleString { return [self componentsJoinedByString:@, ]; } @end ...and then bind to

Re: backporting nibs question / Rhapsody license anyone?

2008-08-04 Thread Jonathan Hess
I read the original question to mean that Lars was trying to get the NIB's from Rhapsody to run on Open Step. If so, I don't know of anyway to do this. It's largely the reason we use NSKeyedArchiver on Mac OS X instead of NSArchiver. Generally, we're pretty good about reading old binary

Re: Properties and memory management

2008-08-04 Thread Jonathan Hess
Hey Mike - The implementation of the property will manage the retaining and the releasing. You only need to worry about sending retain and release messages manually if you access the instance variable directly (not through a property). The only place you would typically need to do that

Re: reloading an NSTreeController

2008-08-03 Thread Jonathan Dann
On 3 Aug 2008, at 04:35, Gerriet M. Denkmann wrote: On 3 Aug 2008, at 05:51, Jonathan Dann wrote: On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: But all disclosure triangels are now closed. Is there some way to reopen them to the previous state? I have the strong feeling that I

Re: reloading an NSTreeController

2008-08-02 Thread Jonathan Dann
that instances of this class with respond to *anything*. Hope this helps, Jonathan http://espresso-served-here.com smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Dragging a header file to XIB Dock

2008-07-30 Thread Jonathan Hess
Hey Nelson - The only time you should have to drag a header file to IB is if that header is used by your project, doesn't come from the system, and is not in your project either. A header in a second project that your main project depends on would be an example of this. Otherwise, if

Re: Repositioning a content view w/in a window

2008-07-29 Thread Jonathan Hess
On Jul 28, 2008, at 3:29 PM, R.L. Grigg wrote: On Jul 26, 2008, at 3:15 AM, Michael Ash wrote: On Fri, Jul 25, 2008 at 11:08 PM, Henry McGilton (Starbase) [EMAIL PROTECTED] wrote: On Jul 25, 2008, at 6:50 PM, Michael Ash wrote: In fact I would go so far as to say that if you ever use

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Jonathan del Strother
On Mon, Jul 28, 2008 at 8:02 AM, Graham Cox [EMAIL PROTECTED] wrote: Once in a blue moon, I get a console message that a nil string was passed to [NSConcreteAttributedString initWithString:] I'd like to find out where this is coming from by setting a breakpoint there, but only for a nil string.

Re: Converting Windows RC to NIBs (was Re: Creating and App menu from Scratch)

2008-07-28 Thread Jonathan Hess
On Jul 16, 2008, at 3:38 AM, Uli Kusterer wrote: On 14.07.2008, at 14:53, Bill Royds wrote: Are there any good tools for porting Application menus and forms from other windowing systems (such as MS Windows or X or even Carbon) to Cocoa nibs? I have a number of applications that I would

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Jonathan Hess
On Jul 28, 2008, at 11:44 AM, I. Savant wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? I'm racking my brains trying to think of a good reason to do this and am drawing a blank. I can, however, think

NSTreeController rearrangeObjects doesn't always trigger sorting

2008-07-28 Thread Jonathan Fewtrell
I know that similar issues have been raised in the past, but I haven't been able to find a clear solution. I have a Core Data app with an NSOutlineView controlled by an entity- mode NSTreeController bound to the managed object context. The NSTreeController has sort descriptors based on

Re: NSOutlineView with Multiple Core Data Entities

2008-07-25 Thread Jonathan Dann
On 25 Jul 2008, at 17:21, Garrett Bjerkhoel wrote: I have a NSOutlineView hooked up to a NSTreeController, which has multiple entities inside of it. I would like to know how to set it up having each entity having its own group. I have downloaded Jonathan Dann's example, which compiles

Re: Drawing a drop-shadow around a view

2008-07-25 Thread Jonathan Dann
How odd I came across this yesterday on my travels! The site for this source is http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html Jonathan www.espresso-served-here.com On 25 Jul 2008, at 11:13, Ian Jackson wrote: Hi Graham, if I understand your question, then I wanted to do

Re: NSOutlineView with Multiple Core Data Entities

2008-07-25 Thread Jonathan Dann
MAILBOXES, etc) when -isSpecialGroup returns YES. In a shipping app I'd bracket such calls (when you don't know what type of node your dealing with) with a -respondsToSelector: or - isKindOfClass: call. Sorry for the confusion. Hope this clears it up. Jonathan www.espresso-served-here.com

Re: Flip animation like dashboard widgets

2008-07-18 Thread Jonathan Dann
There was an example of this on Cocoa Is My Girlfriend http://www.cimgf.com/ HTH Jon On 18 Jul 2008, at 08:42, chaitanya pandit wrote: Is there any way to do flip animation like the one with dashboard widgets when u click the i to change the settings for the widget. Can it be done for

Re: NSViewController Binding Problem continued

2008-07-18 Thread Jonathan Dann
asks for the -view. So as long as the rO is not nil when -loadView is called then it should bind properly. Granted though I haven't tried it with an NSController subclass as the rO. Have you tried binding it in code during -awakeFromNib? Jonathan www.espresso-served-here.com smime.p7s

Re: NSViewController Binding Problem continued

2008-07-18 Thread Jonathan Dann
] infoForBinding:NSValueBinding] valueForKey:NSObservedObjectKey]; } then print the results to the console. Calling it at the end of awakeFromNib: with a -performSelector:withObject:afterDelay: (not necessary but just to be sure!) should do the trick. Is what you get back an array controller? Jonathan

Re: Duplicate rows appearing in outlineview after creating new Entity in moc, why?

2008-07-17 Thread Jonathan Dann
get it. Cheers, Sean On 7/16/08 1:44 PM, Jonathan Dann said: The duplicate problem is likely fixed by giving the tee controller a fetch predicate in IB. Set the predicate to something like parent==nil. This will obviously depend on what you've called your 'parent' property. I've blogged

Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Jonathan Dann
. HTH, Jonathan www.espresso-served-here.com On 17 Jul 2008, at 16:34, Keary Suska wrote: I don't think it matters when you *start* observing, as long the the observed objects are guaranteed to exist. awakeFromNib is a perfect place if you expect the observation to last the lifetime

Re: Duplicate rows appearing in outlineview after creating new Entity in moc, why?

2008-07-16 Thread Jonathan Dann
The duplicate problem is likely fixed by giving the tee controller a fetch predicate in IB. Set the predicate to something like parent==nil. This will obviously depend on what you've called your 'parent' property. I've blogged about doing this with drag and drop in core data and non- core

Re: Rounded NSWindow corners?

2008-07-14 Thread Jonathan Dann
Have a look and see if the window is textured or not, it a window setting in IB. Non-textured windows have no bottom border by default. Its in the AppKit release notes http://developer.apple.com/releasenotes/Cocoa/AppKit.html under the NSWindow heading. Often this is used in conjunction

Re: Responder Chain Patching

2008-07-14 Thread Jonathan Dann
Have you seen this http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/ and this thread http://www.cocoabuilder.com/archive/message/cocoa/2008/3/19/201743 All of this is covered, with automatic insertion of view controllers into the responder chain. If you want

Re: JDBC Frameworks?

2008-07-11 Thread Jonathan Monroe
just SQLite. They do; it's called ODBC. And it connects to databases other than SQLite. Andy Satori's open source ODBCKit framework is a good start for ObjC apps: http://sourceforge.net/projects/odbckit Jonathan Monroe Actual Technologies - ODBC for Mac OS X [EMAIL PROTECTED

Re: Mini Popup Window (Like iCal)

2008-07-11 Thread Jonathan Dann
On 10 Jul 2008, at 19:33, Seth Willits wrote: Has anyone created a custom window like the event info editor in iCal in 10.5? There's a few things I'm not sure how to do: 1) Drawing the window background gradient is pretty straightforward, but creating the thin border on the window is

Re: Releasing objects causes BAD_ACCESS

2008-07-07 Thread Jonathan del Strother
On Mon, Jul 7, 2008 at 10:38 PM, Meik Schuetz [EMAIL PROTECTED] wrote: Dear all, according to the document http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html the connection object as well as the receivedData object are released in the

Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread Jonathan Hohle
I recently wrote some code to retrieve data from an NTLM authenticated web server. As far as I can tell NTLM isn't supported at the Cocoa level, so I used CFNetwork to make the request. The example docs were clear and helpful, but I couldn't find anything on deallocating a

Re: Correct Order for CFRelease-ing CFNetwork Refs?

2008-07-01 Thread Jonathan Hohle
The Core Foundation Ownership Policy is actually specified in terms of a naming convention similar to that for Cocoa and defined by two rules, the Create Rule and the Get Rule: http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html . I

Re: class keeps track of object

2008-07-01 Thread Jonathan Hess
Han Daniel - You can use a global variable just like you would in C: static Foo *bar = nil; @implementation Foo + (id)bar { if (!bar) { bar = [[Foo alloc] init]; } return bar; } @end Thats the simple single threaded case. Things get much more interesting if you want to

Re: Widgets for HUD

2008-06-29 Thread Jonathan Dann
On 27 Jun 2008, at 20:48, Erik Verbruggen wrote: I know this has been asked before on this list (somewhere earlier this year), but I couldn't find the posting back. So sorry for repeating the question, but I'd like to use the HUD of Leopard and with fitting widgets. Somebody mentioned

Re: initWithCoder in Nib object loading

2008-06-27 Thread Jonathan Hess
Hey John - If you're thinking about overriding initWithCoder: just to do post NIB loading instantiation, I would recommend overriding awakeFromNib instead. The objects in the NIB are sent the initWithCoder: message because they're actually being decoded from an archive. Conceptually

Re: NSArchiver question?

2008-06-26 Thread Jonathan Hess
Hey Damien - You should also consider using NSKeyedArchiver over NSArchiver. NSKeyedArchiver is much more flexible and handles archive versioning much better. Jon Hess On Jun 26, 2008, at 4:22 PM, Mike Abdullah wrote: Yes, it is your responsibility to implement the NSCoding protocol in

Re: #import importing twice?

2008-06-19 Thread Jonathan del Strother
On Thu, Jun 19, 2008 at 9:36 AM, Martin Häcker [EMAIL PROTECTED] wrote: Hi guys, I was today stung by a problem that I couldn't quite understand. I was importing a header file with #import and the compiler complained about a duplicate interface declaration of the class defined in the header

Re: Passing CGImageSourceRef to IKImageView

2008-06-18 Thread Jonathan Dann
Thanks Douglas, Nice to know I'm not going mad! Jon On 16 Jun 2008, at 17:51, douglas a. welton wrote: Jonathan, I don't think you missed anything. I do believe that documentation is somewhat misleading for this class. I was in the same situation as you, so I simply decided to get

Re: nib and xib

2008-06-17 Thread Jonathan Hess
Hey William - This blog post explains XIB files quite nicely: http://speirs.org/2007/12/05/what-are-xib-files/ Jon Hess On Jun 16, 2008, at 5:54 PM, William Squires wrote: What's the difference? (assuming 'xib's aren't under NDA here...) ___

Re: unexpected nil outlet

2008-06-17 Thread Jonathan Hess
Hey William - Assuming everything else is correct, it looks like your problem is that you're poking at 'window' too early. Your object receives the init message before IB has a chance to establish connections. If you think about it, IB has to create all of the objects before it can

Passing CGImageSourceRef to IKImageView

2008-06-16 Thread Jonathan Dann
Hi Guys, I was just looking at passing a CGImageSourceRef to an IKImageView, the documentation says you can, but there's not method that accepts it as a parameter. Is this just a feature that isn't present in the release? Are there release notes that this would be in as Image Kit isn't

Re: Requesting Administrator Name and Password

2008-06-16 Thread Jonathan del Strother
On Mon, Jun 16, 2008 at 11:35 AM, Glover,David [EMAIL PROTECTED] wrote: Hi all, I've created a little app that removes some files from within /Applications. This works fine when logged in as an Administrator, but won't run when logged in as a standard user. I've been spending some time

Re: warning: return makes pointer from integer without cast

2008-06-10 Thread Jonathan del Strother
On Tue, Jun 10, 2008 at 1:32 PM, Steven Hamilton [EMAIL PROTECTED] wrote: Hi folks, newbie here. A quickie query on a warning. Both returns in the following code give a 'warning: return makes pointer from integer without cast' - (id)outlineView:(NSOutlineView *)outlineView

<    2   3   4   5   6   7   8   >