Re: NSNotificationCenter: addObserver:selector:name:object: - Specifying a single event

2008-05-27 Thread Andreas Mayer
Am 28.05.2008 um 06:00 Uhr schrieb Jens Alfke: I have defined Quit: on my main object, so I pass self as the first argument. This is, functionally, correct. However, the method should be named "quit:", not "Quit:". And while we are at it, "quit:" isn't a good name either, 'cause it soun

Re: Cocoa Classes from C++?

2008-05-27 Thread Bill Bumgarner
On May 27, 2008, at 9:09 PM, Jens Alfke wrote: On 27 May '08, at 8:59 PM, Bill Bumgarner wrote: In this case, it will change the way that GC handles the pointer, depending on how the class is compiled. GC is aware of the layout of objects and will scan only the fields that are marked __stron

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Graham Cox
I agree with your assessment. What business has NSApplication providing this method? it doesn't make sense. Easy to fix with a category though. G. On 28 May 2008, at 2:06 pm, Jens Alfke wrote: On 27 May '08, at 1:40 PM, Kyle Sluder wrote: You're looking for +[NSApplication beginSheet:m

Re: Cocoa Classes from C++?

2008-05-27 Thread Jens Alfke
On 27 May '08, at 8:59 PM, Bill Bumgarner wrote: In this case, it will change the way that GC handles the pointer, depending on how the class is compiled. GC is aware of the layout of objects and will scan only the fields that are marked __strong or are of an Objective-C object reference

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Jens Alfke
On 27 May '08, at 1:40 PM, Kyle Sluder wrote: You're looking for +[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:], I'm not surprised the OP didn't find this … it's my candidate for Most Misplaced Cocoa Method. I've always wondered why this isn't an inst

Re: NSNotificationCenter: addObserver:selector:name:object: - Specifying a single event

2008-05-27 Thread Jens Alfke
On 27 May '08, at 12:06 PM, Ari Black wrote: NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; [center addObserver:self selector:@selector(Quit:) name:NSApplicationWillTerminateNotification object:NSApp]; I have defined Quit: on my main object, so I pass self as the first

Re: Question concerning mouseDragged events.

2008-05-27 Thread Graham Cox
On 28 May 2008, at 1:55 pm, Graham Reitz wrote: So the way I have it is pretty much what people do? Yup. G. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the m

Re: Cocoa Classes from C++?

2008-05-27 Thread Bill Bumgarner
On May 27, 2008, at 8:43 PM, Jens Alfke wrote: This basically tells a white lie to any non-C++-savvy source file that imports the header, telling them that MyCppClass* is just some kind of pointer, and not to worry its pretty little head about exactly what it is. This is safe because (a) all

Re: Question concerning mouseDragged events.

2008-05-27 Thread Graham Reitz
Thanks. I wanted to make sure I wasn't missing out on anything. So the way I have it is pretty much what people do? (as far as mouse dragged information goes) - (void) mouseDragged:(NSEvent*)event { NSPoint eventLocation = [event locationInWindow]; NSPoint center = [self c

Re: Question concerning mouseDragged events.

2008-05-27 Thread Michael Vannorsdel
Generally you'd use the mouseDown to get when and where the drag started (may have). Then use the mouseDragged to track where the mouse is dragging to. Then on mouseUp you know it's done. Tracking area is only valid if a tracking rect you installed generated the event. On May 27, 2008,

Re: if statement

2008-05-27 Thread Jens Alfke
If you make this mistake often, go into your Project inspector, click the Build tab, and look for the item "Missing Braces And Parentheses" under "Warnings". Check its checkbox. This will cause the compiler to warn you when you do this. I also highly recommend enabling the "Treat Warnings A

Re: Question concerning mouseDragged events.

2008-05-27 Thread Jens Alfke
On 27 May '08, at 8:38 PM, Graham Reitz wrote: Do folks somehow get the direction of the drag, size of the rectangle, starting x,y, and etc.? IIRC, there are NSEvent properties that give you the x and y deltas since the last mouseDragged event (called something like -dx or - deltaX...)

Re: Question concerning mouseDragged events.

2008-05-27 Thread Graham Cox
On 28 May 2008, at 1:38 pm, Graham Reitz wrote: What is the typical information that people get from a mouse dragged event? Generally, the current mouse point and sometimes the modifier flags. There may be other useful stuff in there but I haven't used much else. I tried getting the tra

Re: Cocoa Classes from C++?

2008-05-27 Thread Jens Alfke
On 27 May '08, at 4:50 PM, Todd Heberlein wrote: (1) Changing an Objective-C file to an Objective-C++ object (by renaming it to a .mm file) often causes me to rename a lot of files to .mm, because if the Objective-C class definition has a C++ object in it, every source code file that inclu

Question concerning mouseDragged events.

2008-05-27 Thread Graham Reitz
What is the typical information that people get from a mouse dragged event? I have the following: - (void) mouseDragged:(NSEvent*)event { NSPoint eventLocation = [event locationInWindow]; NSPoint center = [self convertPoint:eventLocation fromView:nil]; m_controller->lef

Re: Which framework for Wifi?

2008-05-27 Thread J. Scott Tury
There is a private command line utility at the path: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/ Current/Resources/airport One word of warning about using this utility: it's output seems to change between OS builds (at least major ones)... So be prepared to update thi

Re: Cocoa Classes from C++?

2008-05-27 Thread Scott Ribe
> It requires both Mac OS X 10.4 and GCC 4, actually OK. I thought I had used it earlier, but thinking back more carefully, no, it was not until Tiger that I was able to do this. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice __

Re: Cocoa Classes from C++?

2008-05-27 Thread Chris Hanson
On May 27, 2008, at 5:14 PM, Scott Ribe wrote: like C++ objects as member variables of an ObjC object This works fine if you set the right compiler options, which I think has been around since 10.3. It requires both Mac OS X 10.4 and GCC 4, actually: There is Objective-C runtime suppor

Re: NSImage display quality and zooming

2008-05-27 Thread also
I had noticed this flag, but it did not solve the problem. I think this must only effect scaling when the receiving view is resized such as resizing a window. The docs are a bit vague. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: NSImage display quality and zooming

2008-05-27 Thread Michael Vannorsdel
I think this is right as well. The image can be cached in a form best suited for the first draw of it. Any further draws will very likely use the cached version and the original resolution is gone. If you set it not to cache, the image will be drawn from the original data each time. You

Re: NSImage display quality and zooming

2008-05-27 Thread also
That did the trick, many thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subs

Re: NSImage display quality and zooming

2008-05-27 Thread Graham Cox
I'm not 100% on this, but I think you need to set the cache mode on the NSImage to disable caching, i.e: [image setCacheMode: NSImageCacheNever]; hth, G. On 28 May 2008, at 10:37 am, also wrote: I've created a custom NSView that displays an image and allows the user to zoom in and out.

NSImage display quality and zooming

2008-05-27 Thread also
I've created a custom NSView that displays an image and allows the user to zoom in and out. The view works in general, but the quality of the image displayed is not what I expect. When I zoom in even slightly on a high resolution image (300 dpi, 500x500) the image is grainy and pixelated. If I d

Re: Cocoa Classes from C++?

2008-05-27 Thread Stefan Werner
On May 27, 2008, at 4:50 PM, Todd Heberlein wrote: The gotchas that I often run into are: (1) Changing an Objective-C file to an Objective-C++ object (by renaming it to a .mm file) often causes me to rename a lot of files to .mm, because if the Objective- C class definition has a C++ object

Re: Cocoa Classes from C++?

2008-05-27 Thread Scott Ribe
> like C++ objects as member > variables of an ObjC object This works fine if you set the right compiler options, which I think has been around since 10.3. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-d

Re: if statement

2008-05-27 Thread Graham Cox
I see you've decided to ignore my advice about using a "proper" parser ;-) That's OK, but you'll probably start to realise why they are a good idea once you try and expand this to more functions (which I presume you will eventually, since a 4-function calculator is not of very great utility

Re: Cocoa Classes from C++?

2008-05-27 Thread Todd Heberlein
On Tuesday, May 27, 2008, at 04:32PM, "Jens Alfke" <[EMAIL PROTECTED]> wrote: >We did that the PubSub framework and it works fine, actually. You just >have to check the "Call C++ Ctors/Dtors in Obj-C" build option in >Xcode. Ooh, I can learn something every day in these mailing lists. :-)

Re: Cocoa Classes from C++?

2008-05-27 Thread Jens Alfke
On 27 May '08, at 4:24 PM, Andrew Farmer wrote: don't expect anything really creative (like C++ objects as member variables of an ObjC object) to work quite correctly. We did that the PubSub framework and it works fine, actually. You just have to check the "Call C++ Ctors/Dtors in Obj-C" b

Re: Cocoa Classes from C++?

2008-05-27 Thread Kiel Gillard
Hi Jason, Addressing point one, you must use ObjC to use the Cocoa frameworks. For the other points, I suggest you take a look at < http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_12_section_2.html> to begin with. Also see < https://developer.apple.com/samplec

Re: Date compiled?

2008-05-27 Thread ainxow
On May 27, 2008, at 6:31 PM, Andy Lee wrote: On May 27, 2008, at 6:20 PM, Bill Monk wrote: NSString *compileDate = [NSString stringWithCString:__DATE__ encoding:NSASCIIStringEncoding]; NSString *compileTime = [NSString stringWithCString:__TIME__ encoding:NSASCIIStringEncoding

Re: Cocoa Classes from C++?

2008-05-27 Thread Andrew Farmer
On 27 May 08, at 16:12, J. Todd Slack wrote: 1. I wish to create an NSStatusItem. I have ObjC Code to do so, but how can I do this in C++? You can't. Cocoa is a Objective-C framework, and you'll need to write Objective-C code to use it effectively. 2. Can anyone point me to a reference of

Re: Cocoa Classes from C++?

2008-05-27 Thread Nick Zitzmann
On May 27, 2008, at 5:12 PM, J. Todd Slack wrote: 1. I wish to create an NSStatusItem. I have ObjC Code to do so, but how can I do this in C++? You can't. 2. Can anyone point me to a reference of using Apple's Frameworks with C++ rather than ObjC? There aren't any. ObjC is dynamically t

Re: Which framework for Wifi?

2008-05-27 Thread Peter Burtis
There is a private command line utility at the path: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/ Current/Resources/airport Calling it with NSTask works. If there's a better way I'd love to know it. It will give XML output with the right flag (-x) so it's quite useab

Cocoa Classes from C++?

2008-05-27 Thread J. Todd Slack
Hi All, 1. I wish to create an NSStatusItem. I have ObjC Code to do so, but how can I do this in C++? I dont see any examples anyplace. Must I use ObjC to use NSStatusItem? I would think not! Does anyone have an example dealing with NSStatusItem? 2. Can anyone point me to a reference of u

Re: Keyboard Layout

2008-05-27 Thread Deborah Goldsmith
This has nothing to do with which keyboard layout is selected. The direction indicator appears when you have right-to-left text. Also, which application are you seeing this direction indicator in? Mac OS X uses a split cursor to indicate a direction boundary. Deborah Goldsmith Apple Inc. [E

Re: Which framework for Wifi?

2008-05-27 Thread Ken Thomases
On May 27, 2008, at 5:25 PM, Howard Shere wrote: Which Apple framework would I use to interact with the wireless settings? I need to be able to get a list of the current visible networks, change networks, etc. from within my app. The System Configuration framework: http://developer.apple.c

Re: Date compiled?

2008-05-27 Thread Andy Lee
On May 27, 2008, at 6:20 PM, Bill Monk wrote: NSString *compileDate = [NSString stringWithCString:__DATE__ encoding:NSASCIIStringEncoding]; NSString *compileTime = [NSString stringWithCString:__TIME__ encoding:NSASCIIStringEncoding]; Any reason not to do the following? NSString

Which framework for Wifi?

2008-05-27 Thread Howard Shere
Which Apple framework would I use to interact with the wireless settings? I need to be able to get a list of the current visible networks, change networks, etc. from within my app. Howard Shere http://www.livejournal.com/users/realgreendragon/ Altair 8800a to Mac OS X so far... __

Re: Date compiled?

2008-05-27 Thread Bill Monk
On 27 May '08, at 9:16 AM, Jeff LaMarche wrote: Is there any way to make this work with the standard about box, or do I have to hand-roll one in order to make this work? I'm assuming the latter, but figured I'd ask just in case; I hate reinventing the wheel. I've done this for a client befo

Re: Dealing with NSError outside of the Responder chain

2008-05-27 Thread Paul Sargent
On 27 May 2008, at 21:24, Adam R. Maxwell wrote: In general, I think you're supposed to add NSError** parameters to pass it back up to some class that knows how to present an error, but I find that's not always practical, and it tends to be messy. In such cases I typically take the easy

[moderator] Re: if statement

2008-05-27 Thread Scott Anguish
more thread cleanup, sorry folks. this is a basic C question. please try and find a more suitable (and less traffic'd) forum for these thanks scott On May 27, 2008, at 5:24 PM, Nathan wrote: I'm having a weird problem here's my code: - (IBAction)operators:(id)sender { OB=[o

[moderator] Re: File's Owner

2008-05-27 Thread Scott Anguish
while the discussion of possible re-positioning of the term file's owner is interesting, discussing it here isn't going to change how it is referred to in the documentation (and for that matter, I doubt it'd be changed from file's owner anyways...) please take it off-list thanks scott [mo

[moderator] Re: running an external app

2008-05-27 Thread Scott Anguish
On May 27, 2008, at 4:03 PM, Peter Duniho wrote: Heck, if anything, I'd think that the fact that they are here _now_, doing exactly what you don't want them to do, would be proof enough that minimalist documentation isn't an effective barrier to their entry. Your claim flies in the face o

Re: if statement

2008-05-27 Thread Sherman Pendley
On May 27, 2008, at 5:24 PM, Nathan wrote: I'm having a weird problem here's my code: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB=1) { [operator setFloatValue: 4]; } if (OB=2) { [operator setFloatValu

Re: running an external app

2008-05-27 Thread Andy Lee
No worries. I both agree and disagree with almost everyone who's been on this discussion, so I can get confused myself about who said what. :) --Andy (this doesn't count as re-joining the discussion) On May 27, 2008, at 5:37 PM, Peter Duniho wrote: Date: Tue, 27 May 2008 16:48:23 -0400 Fro

Re: File's Owner

2008-05-27 Thread Gary L. Wade
Alex Kac wrote: I liked "Nib's Owner". It keeps with the "owner" tag, but makes it more clear. True, but the use of NIB vs. File may be a historical set-in-stone thing that never changed since the NIB is the File (conceptually, of course, since a NIB is a directory with three files), and ever

Re: if statement

2008-05-27 Thread Bob Smith
A way to help yourself with this (which I used to forget all the time too), get in the habit of placing the constant on the left side of the comparison, as in (1 == OB) instead of (OB == 1). Then if you forget and use a single = the compiler will remind you, since (1 = OB) is invalid and w

Re: if statement

2008-05-27 Thread Randall Meadows
On May 27, 2008, at 3:29 PM, Nathan wrote: *wonders how many more times he'll need correcting* I knew that... I just keep forgetting! :mad: Might I suggest you set the -Wparentheses GCC compiler warning flag for your projects? randy A: Because it messes up the order in which people nor

Re: running an external app

2008-05-27 Thread Peter Duniho
Date: Tue, 27 May 2008 16:48:23 -0400 From: Andy Lee <[EMAIL PROTECTED]> On May 27, 2008, at 4:15 PM, Peter Duniho wrote: Date: Tue, 27 May 2008 14:57:09 -0400 From: Andy Lee <[EMAIL PROTECTED]> Also, when we *do* ask to see people's code (which also happens), it's not because the code is th

Re: if statement

2008-05-27 Thread Andy Lee
On May 27, 2008, at 5:26 PM, Nick Zitzmann wrote: On May 27, 2008, at 3:24 PM, Nathan wrote: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB=1) { [operator setFloatValue: 4]; } if (OB=2) { [operator setFloatV

Re: if statement

2008-05-27 Thread Nathan
ok this is the last time I'm admitting I messed up and getting corrected. :lol: On May 27, 2008, at 5:32 PM, Scott Ribe wrote: = is assignment, == is equality test, so yes the conditions of both ifs do evaluate to true. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-

Re: if statement

2008-05-27 Thread Nathan
*sigh* no I just keep forgetting. On May 27, 2008, at 5:27 PM, Wayne Packard wrote: On May 27, 2008, at 2:24 PM, Nathan wrote: I'm having a weird problem here's my code: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB=1) { [ope

Re: Removing the Filename flag in Doc. based Application

2008-05-27 Thread Mark Piccirelli
There's some advice about this in the "Advice for Overriders of - [NSDocument displayName]" section of the AppKit release notes at http://developer.apple.com/releasenotes/Cocoa/AppKit.html. (Searching for "advice" on that page turns up a couple of other tidbits too.)

Re: if statement

2008-05-27 Thread Scott Ribe
= is assignment, == is equality test, so yes the conditions of both ifs do evaluate to true. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: running an external app

2008-05-27 Thread Peter Duniho
On May 27, 2008, at 2:04 PM, Hamish Allan wrote: [...] That's because you don't really believe in conceptual documentation. Please. Whatever else you do or say, do NOT presume to tell me what I do or do not believe in. Your statement is false and offensively arrogant. How about this, t

Re: if statement

2008-05-27 Thread Nathan
Third time... On May 27, 2008, at 5:27 PM, Vincent E. wrote: You need double equal signs in conditional statements, like: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB==1) { [operator setFloatValue: 4]; } if (OB==2) {

Re: if statement

2008-05-27 Thread Nathan
*wonders how many more times he'll need correcting* I knew that... I just keep forgetting! :mad: On May 27, 2008, at 5:26 PM, Nick Zitzmann wrote: On May 27, 2008, at 3:24 PM, Nathan wrote: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB=1) {

Re: if statement

2008-05-27 Thread Wayne Packard
On May 27, 2008, at 2:24 PM, Nathan wrote: I'm having a weird problem here's my code: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB=1) { [operator setFloatValue: 4]; } if (OB=2) { [operator setFloatVal

Re: if statement

2008-05-27 Thread Nathan
Thanks I always always always forget that lol. On May 27, 2008, at 5:25 PM, Hal Mueller wrote: On May 27, 2008, at 2:24 PM, Nathan wrote: if (OB=1) { That's an assignment statement. In particular, it's an assignment statement that will always return true. You want (OB==1) or (

Re: if statement

2008-05-27 Thread Nick Zitzmann
On May 27, 2008, at 3:24 PM, Nathan wrote: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB=1) { [operator setFloatValue: 4]; } if (OB=2) { [operator setFloatValue: 5]; } } So you would expect that if

if statement

2008-05-27 Thread Nathan
I'm having a weird problem here's my code: - (IBAction)operators:(id)sender { OB=[operatorBar floatValue]; if (OB=1) { [operator setFloatValue: 4]; } if (OB=2) { [operator setFloatValue: 5]; } } So you would expect that

Re: File's Owner

2008-05-27 Thread Alex Kac
As one who has been on the Cocoa road slowly over the last year (not much in the middle, though), it has let me learn and absorb Cocoa terminology and ideas slowly. But the one thing I found weird was File's Owner. I knew what it meant. I knew what it does (and especially after this past we

Re: Cover Flow in Cocoa?

2008-05-27 Thread colo
Dumb question. But has anyone tried to recreate the Real First Coverflow? The one that started thais whole thing. The Cover flow app had a really smooth animation dynamic, and ever tilted overhead just so slightly. That one was just awesome compared to the current coverflow like On Tue, May 27,

Re: Okay I have those pieces... now where's the g lue?

2008-05-27 Thread Nathan
I'm not joining your discussion here, just giving you a nice linkie. Cocoalab.com has done a great job with their tutorial, becomeanxcoder or something like that. It assumes you have no knowledge of C, and it has put me into a great position, I'm able to use other tutorials now. On May 27,

Re: Okay I have those pieces… now where's the glue?

2008-05-27 Thread Ken Thomases
There are several approaches to solving the communication issues you're facing, including delegation, notifications, the responder chain, etc. Rather than summarizing them (poorly) myself, I'll just point you to Apple's discussion of them: http://developer.apple.com/documentation/Cocoa/Co

Re: Okay I have those pieces... now where's the g lue?

2008-05-27 Thread Erik Buck
> How do I allow controller A to send commands to controller B and vice > versa? If controller A initialized controller B, then A knew about B, but > what about the other way round? 1) A can have an instance variable that points to B. 2) B can have an instance variable that points to A.

Re: Cover Flow in Cocoa?

2008-05-27 Thread Peter Maurer
I am thinking to use Cover Flow in cocoa app. - Is this a good idea for a desktop/laptop app? - What APIs are available? I wouldn't go as far as calling this an API, but feel free to look at the main header file of my Cover Flow implementation, which is implemented as a stand-alone bundle b

Re: running an external app

2008-05-27 Thread Hamish Allan
On Tue, May 27, 2008 at 9:03 PM, Peter Duniho <[EMAIL PROTECTED]> wrote: > Inasmuch as anyone has an option as to what platform they will support -- > and many of us do -- high barriers discourage careful programmers as much as > they discourage bad programmers. I don't see any evidence of that o

Re: File's Owner

2008-05-27 Thread Andy Lee
On May 27, 2008, at 4:40 PM, Quincey Morris wrote: On May 27, 2008, at 11:50, Andy Lee wrote: If you look at the rest of my original suggestion (before the clarification above), I suggested the term "Nib's Loader" as a replacement for "File's Owner", which would connote something behavioral

Re: Need NSNumber setBoolValue for KVC Compliance workaround

2008-05-27 Thread Ken Thomases
On May 27, 2008, at 3:41 PM, David Carlisle wrote: I want to put an NSMutableDictionary into my standardUserDefaults with keys and boolean values [NSNumber numberWithBool:YES/NO], then bind that to a table with keys and checkboxes in my preferences window. That all seems to work nicely, exc

Re: Need NSNumber setBoolValue for KVC Compliance workaround

2008-05-27 Thread Kyle Sluder
On Tue, May 27, 2008 at 4:41 PM, David Carlisle <[EMAIL PROTECTED]> wrote: > So I need an object that is both property list compliant and KVC compliant > for a BOOL value. You've bound the wrong thing. You can't provide an array of NSNumber objects, you'll need to provide an array of instances of

Re: Okay I have those pieces… now where's the glue?

2008-05-27 Thread Vincent E.
On May 27, 2008, at 10:25 PM, Wim Lewis wrote: Have you looked at the examples that get installed with the developer tools? In particular, under the "AppKit" subdirectory there's the source to TextEdit and a simple drawing application named Sketch, both of which are pretty good examples of

Re: File's Owner

2008-05-27 Thread Ken Thomases
On May 27, 2008, at 3:40 PM, Quincey Morris wrote: Putting this the other way round, I'm not sure that the answer is to give File's Owner or Nib's Loader behavior that justifies its name, but rather to give it a unobjectionable name that justifies its (lack of) behavior -- if anyone can come

Re: running an external app

2008-05-27 Thread Andy Lee
On May 27, 2008, at 4:15 PM, Peter Duniho wrote: Date: Tue, 27 May 2008 14:57:09 -0400 From: Andy Lee <[EMAIL PROTECTED]> Also, when we *do* ask to see people's code (which also happens), it's not because the code is the best way to express their intentions. It's because their code is not *fu

Re: Okay I have those pieces… now where's the glue?

2008-05-27 Thread Mark
I see a lot of blah blah and 2 fully distinct questions on your post - plus a completelly meaningfull subject text. Where's that link about how to ask questions... Ps: Is there any generic(!) open source app that you would recommend me to study to learn more about how to structure an app at

Need NSNumber setBoolValue for KVC Compliance workaround

2008-05-27 Thread David Carlisle
I want to put an NSMutableDictionary into my standardUserDefaults with keys and boolean values [NSNumber numberWithBool:YES/NO], then bind that to a table with keys and checkboxes in my preferences window. That all seems to work nicely, except that when I check one of the checkboxes I find

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Kyle Sluder
On Tue, May 27, 2008 at 4:28 PM, John Love <[EMAIL PROTECTED]> wrote: > Instead of calling NSAlertSheet with sender, defaultButton etc., is there a > way to call a window sheet whose GUI is hard wired in Interface Builder. I > know that in Applescript Studio, all you have to do is provide a name f

Re: File's Owner

2008-05-27 Thread Quincey Morris
On May 27, 2008, at 11:50, Andy Lee wrote: That's not good either. "Root object" has a special meaning in the context of archiving graphs of objects. In particular, it's one of the archived objects, whereas File's Owner is by definition not one of the objects in the nib. Yes. I was ad

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Sherman Pendley
On May 27, 2008, at 4:28 PM, John Love wrote: Instead of calling NSAlertSheet with sender, defaultButton etc., is there a way to call a window sheet whose GUI is hard wired in Interface Builder. Sure - pretty much any window you can build in IB, can be used as a sheet. Have a look at:

Alert Sheets hard wired in Interface Builder

2008-05-27 Thread John Love
Instead of calling NSAlertSheet with sender, defaultButton etc., is there a way to call a window sheet whose GUI is hard wired in Interface Builder. I know that in Applescript Studio, all you have to do is provide a name for the sheet you wish to call and it appears. Can the same implementation s

Re: Okay I have those pieces… now where's the glue?

2008-05-27 Thread Wim Lewis
On May 27, 2008, at 1:04 PM, Satsumac wrote: It's not that much about strictly technical questions like "how do I get this to do that?", but rather questions like "okay, I can think of several ways to do this, it's just that I have no clue which path to take?" Books like Hillegass or the

Re: Dealing with NSError outside of the Responder chain

2008-05-27 Thread Adam R. Maxwell
On Tuesday, May 27, 2008, at 12:40PM, "Paul Sargent" <[EMAIL PROTECTED]> wrote: >My question is what is accepted practice when I get an NSError back? >Reading the Error Handling Programming Guide I get the idea that >errors can be passed up the responder chain so that the user can be >aler

Re: Okay I have those pieces… now where's the glue?

2008-05-27 Thread Jens Alfke
On 27 May '08, at 1:04 PM, Satsumac wrote: How do I allow controller A to send commands to controller B and vice versa? If controller A initialized controller B, then A knew about B, but what about the other way round? I seem to remember this exact question coming up a few days ago... If

Re: running an external app

2008-05-27 Thread Peter Duniho
Date: Tue, 27 May 2008 14:57:09 -0400 From: Andy Lee <[EMAIL PROTECTED]> Also, when we *do* ask to see people's code (which also happens), it's not because the code is the best way to express their intentions. It's because their code is not *fulfilling* their intentions. Not at all the same as c

Okay I have those pieces… now where's the g lue?

2008-05-27 Thread Satsumac
Hi… just another beginner speaking… I'm coming from the rather procedural programming world of Applescript and web programming with PHP (OOP with CodeIgniter, though). Coming from OOP PHP I found the concept of object oriented programming and the MVC pattern quite easy to adapt to Cocoa. Ha

Re: running an external app

2008-05-27 Thread Peter Duniho
On Tue, May 27, 2008 at 6:35 PM, Peter Duniho <[EMAIL PROTECTED]> wrote: As I said, no one ever suffered from having too many code samples. Again, I disagree. We are seeing an ever-increasing number of people on this list who don't care about learning Cocoa, they just want to piece together

Re: running an external app

2008-05-27 Thread Gary L. Wade
When starting out, it can be difficult getting used to the different style of function declarations and calls used in Objective-C, but as so many others have said, that's a basic requirement when learning a framework like Cocoa. Anyone familiar with some C++-based object-oriented UI frameworks

Dealing with NSError outside of the Responder chain

2008-05-27 Thread Paul Sargent
Hi, I'm writing a model class that uses (in order to access on on disk database) NSFileManager to read directory contents, and so I'm using the method: - (NSArray *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error (directoryContentsAtPath is depreciated in 10.5, and th

[moderator] Re: Cocoa-dev Digest, Vol 5, Issue 919

2008-05-27 Thread Scott Anguish
Folks please remember that there are 4000 other people reading these messages, and many of them are already becoming overloaded with the traffic levels we've been seeing. a resume fight isn't going to help this situation at all. and will probably end up with more users joining johnny in t

Re: assignment in if clause

2008-05-27 Thread Isak Styf
With Steve I am on this one. if (CONSTANT == variable) is like saying "if red is the house" or "if a car is the vehicle". When Yoda says things like that its hilarious, when you are trying to read code it is just a pain. I often find that writing code that way is just an excuse for not

Re: NSSearchField and Key detection

2008-05-27 Thread Aki Inoue
You can do the same with any NSControl subclasses. See - control:textView:doCommandBySelector:. Aki On 2008/05/27, at 12:00, Chris & Dawn Kunicki wrote: I have a NSSearchField and I am trying to detect when the user presses the down arrow key to perform a specific action. This is no proble

Re: DO problems

2008-05-27 Thread Guy Meyer
Welcome to the Leopard club. Yes there is DO code that works fine with Tiger and faults on Leopard. The issue described below refers to remote DO (i.e. socketports) as opposed to local DO. What I have found (after spending many hours on the issue) is that if there are multiple DO connectio

NSNotificationCenter: addObserver:selector:name:object: - Specifying a single event

2008-05-27 Thread Ari Black
Hello, Originally I was going to post this as a question, but since I found the solution while composing the email, I thought I'd simply send it along for the edification of anyone who might be in a similar situation. I'm trying to make sure that my application catches all possible routes

NSSearchField and Key detection

2008-05-27 Thread Chris & Dawn Kunicki
I have a NSSearchField and I am trying to detect when the user presses the down arrow key to perform a specific action. This is no problem in NSTextView with doCommandBySelector. Is there a similiar way with NSSearchField? Thanks for your help. ___

Re: TabBarController + NavigationController Integration Problem in IB

2008-05-27 Thread Gleb Dolgich
On 27 May 2008, at 09:21, Scott Anguish wrote: On May 27, 2008, at 4:02 AM, George Stuart wrote: WooHoo! My first post to cocoa-dev... and it's to ask -- is this appropriate for cocoa-dev? The iPhone SDK is under NDA and can not be discussed here. scott [moderator] At the moment iPhone

Re: running an external app

2008-05-27 Thread Andy Lee
On May 27, 2008, at 2:36 PM, Hamish Allan wrote: On Tue, May 27, 2008 at 6:35 PM, Peter Duniho <[EMAIL PROTECTED]> wrote: Honestly, I'm surprised to have to reiterate this point. It's a common enough problem in every communications medium I'm participated in, and it's a constant refrain in

Re: File's Owner

2008-05-27 Thread Andy Lee
On May 27, 2008, at 2:02 PM, Quincey Morris wrote: So I was wondering if something like "Nib's Root Object" might work better. I think, to anyone with even a small amount of exposure to programming topics, "root" connotes something structural and not something behavioral, which seems appropr

Re: Distributed Objects/NSConnection dying under 10.4

2008-05-27 Thread Mark Munz
The Server app only has a single thread. I tried calling enableMultipleThreads just in case (fingers were crossed), but that didn't appear to change the results. The connection still just dies. Mark Munz On 5/27/08, Donald Lamar Davis II <[EMAIL PROTECTED]> wrote: > Are you running a multi-thread

Re: running an external app

2008-05-27 Thread Hamish Allan
On Tue, May 27, 2008 at 6:35 PM, Peter Duniho <[EMAIL PROTECTED]> wrote: > As I said, no one ever suffered from having too many code samples. Again, I disagree. We are seeing an ever-increasing number of people on this list who don't care about learning Cocoa, they just want to piece together bit

Re: running an external app

2008-05-27 Thread Andy Lee
On May 27, 2008, at 1:35 PM, Peter Duniho wrote: We can agree to disagree. Sure thing, no problem. IMHO, a code sample, providing some real context on the use of the method, is very beneficial. For some methods of some classes, I'd be first to agree an example in context is very useful

  1   2   >