releasing NSKeyedUnarchiver causes crash

2008-05-18 Thread Markus Spoettl
Hi all, once again I have a question I can't seem to figure out on my own. I'm trying to implementing an NSDocument application, more specifically the load/store part of it. It actually works as expected, reading and writing my object graph to and from a file works fine. The problem is t

Re: Conditionally modifying NIBs?

2008-05-18 Thread Uli Kusterer
Am 14.05.2008 um 19:37 schrieb Mike Fischer: Given the recent/ongoing discussion about bypassing Interface Builder I have one question/issue for which IB does not seem to provide any solution. Interface Builder and NIBs are nice and have many advantages but I am missing a way to build differ

Cocoa et al as HCI usability problem

2008-05-18 Thread Julius Guzy
The very good , interesting and informative debate in this list concerning the accessibility of the programming environment to new users has it seems to me incresingly polarised between those who think the documentation more or less adequate and those like me who for whatever reason, have g

releasing NSKeyedUnarchiver causes crash

2008-05-18 Thread Klaus Backert
Am 18.05.2008 um 09:51 schrieb Markus Spoettl: - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError { *outError = nil; NSKeyedUnarchiver *archiver; archiver = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; // release current

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Jason Stephenson
Julius, You could change Apple for just about any other vendor, and Cocoa for just about another GUI/system interface, and your argument will still hold. (Have you ever tried programming X11 with just XLib C calls? Nasty stuff that) Also, please don't confuse the language, Objective-C i

Re: Conditionally modifying NIBs?

2008-05-18 Thread Mike Fischer
Am 18.05.2008 um 11:14 schrieb Uli Kusterer: Am 14.05.2008 um 19:37 schrieb Mike Fischer: Given the recent/ongoing discussion about bypassing Interface Builder I have one question/issue for which IB does not seem to provide any solution. Interface Builder and NIBs are nice and have many ad

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Erik Buck
There are conventions and metaphors of human computer interfaces. Apple used to provide interactive training programs to explain the use of a mouse to customers in stores. My own father who is a brilliant scientist could not initially master double-click and fifteen years later frequentl

NSTextView Font Substitution

2008-05-18 Thread Gerriet M. Denkmann
I have an NSTextView with no "Multiple fonts allowed" (isRichText = NO). The font is the userFixedPitchFontOfSize: 0 (Monaco 10 pt). But when I insert a THAI CHARACTER SARA E (Unicode 0E40), which has no glyph in Monaco, a replacement font is used. This is Lucida Grande, which is not a FixedP

NSStream, NSInputStream, NSOutputStream

2008-05-18 Thread John MacMullin
I modified slightly the Echo Server code sample from Apple with the following results. One, I couldn't stream a large file from a polling routine. More than likely it would cancel because of a Sigterm 15. It appears from reading the docs that the user cannot detect the end of a stream a

CATransactions not working

2008-05-18 Thread Adam Radestock
Hi everyone, I've been struggling to work out how to animate some properties on my NSButton subclass. I have looked through all the examples given in Apple's docs, but can't work out why my code doesn't animate. My code is: [CATransaction begin]; // Begin grouping animated property

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Gary L. Wade
Just to add some insight, when reading the Cocoa documentation, it's very helpful when a developer also has some degree of exposure to Interface Builder. Take heart, though, as Interface Builder is just a click away. Once you have an idea how things somewhat work within Interface Builder and

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread David Wilson
On Sun, May 18, 2008 at 10:39 AM, Erik Buck <[EMAIL PROTECTED]> wrote: > Cocoa is the most consistent, elegant, and productive software development > technology I have ever used, and I have used a lot. Cocoa uses key > metaphors and design patterns ubiquitously. If the programmer is either > unaw

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Jens Alfke
On 18 May '08, at 4:33 AM, Julius Guzy wrote: Apple has been less celebrated for the humanity of its programming interface having, in my experience of Macs from the Lisa onwards, seemingly taken the attitude that its programmers were hobbyists, geeks essentially, who because of their enthu

Re: NSTextView Font Substitution

2008-05-18 Thread Jens Alfke
On 17 May '08, at 6:36 AM, Gerriet M. Denkmann wrote: I have an NSTextView with no "Multiple fonts allowed" (isRichText = NO). The font is the userFixedPitchFontOfSize: 0 (Monaco 10 pt). But when I insert a THAI CHARACTER SARA E (Unicode 0E40), which has no glyph in Monaco, a replacement fo

Re: releasing NSKeyedUnarchiver causes crash

2008-05-18 Thread Markus Spoettl
On May 18, 2008, at 5:25 AM, Klaus Backert wrote: - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError { *outError = nil; NSKeyedUnarchiver *archiver; archiver = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; // release current da

Re: Working through a problem...

2008-05-18 Thread Scott Ribe
> How do I get IB to select the tableView instead of the columnView? Get out of the column. Drag to the header or to the edge between columns. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing lis

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Michael Vannorsdel
Well what can you do. Not sure why but lately many newcomers have been showing up and complaining about Cocoa's difficulty. I'm not sure if they've done GUI work before, but I remember my days with PowerPlant and spending a massive amount of time just creating the GUI and the code to back

Re: NSStream, NSInputStream, NSOutputStream

2008-05-18 Thread Jens Alfke
On 18 May '08, at 8:50 AM, John MacMullin wrote: I modified slightly the Echo Server code sample from Apple with the following results. One, I couldn't stream a large file from a polling routine. More than likely it would cancel because of a Sigterm 15. Whenever you report a crash, a b

Re: NSStream, NSInputStream, NSOutputStream

2008-05-18 Thread Ken Thomases
On May 18, 2008, at 10:50 AM, John MacMullin wrote: I modified slightly the Echo Server code sample from Apple with the following results. To which sample are you referring? I assume you mean the sample called CocoaEcho at . One, I could

Re: NSTextView Font Substitution

2008-05-18 Thread Ken Thomases
On May 17, 2008, at 8:36 AM, Gerriet M. Denkmann wrote: So: is there a way in Tiger to tell the text system to prefer FixedPitchFonts? Possibly using NSFontDescriptor. You can specify NSFontMonoSpaceTrait as part of its symbolic traits. If nothing else, you can specify the list of fonts

Re: CATransactions not working

2008-05-18 Thread Brian Christensen
On May 18, 2008, at 12:00 , Adam Radestock wrote: Hi everyone, I've been struggling to work out how to animate some properties on my NSButton subclass. I have looked through all the examples given in Apple's docs, but can't work out why my code doesn't animate. Where exactly are you invok

Re: The challenge for Cocoa's on-line documentation

2008-05-18 Thread Scott Anguish
bindings is discussed in the Cocoa Bindings Reference the UI settings alone don't take into account all the usage patterns. although there is no question that documentation could always be better (and that's coming from someone in techpubs). On May 17, 2008, at 4:16 PM, Johnny Lundy wrote:

NSTreeController problems

2008-05-18 Thread Charles Srstka
Lately, I've been trying to update my stodgy old ways and try to incorporate some of the new technologies Cocoa has picked up over the years when starting new projects (my main app has had to be compatible with older OS X versions, so I haven't had much opportunity to jump into the world of

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread I. Savant
On May 18, 2008, at 12:41 PM, Jens Alfke wrote: Maybe I'm taking this too personally, but I sense a subtext that some people think the task of software design itself is somewhat trivial, more like programming a VCR than like architecture or painting or chemistry ... well it *should* be

validateMenuItem() not always being called

2008-05-18 Thread jeffs87
Hi, I'm new to Cocoa and I created a Document-based Application with New Project. I added a validateMenuItem() method to my document class and it is only being called when you click on the FIle menu, not any of the other menus. Is the document the correct place for this or do I need o add a

Re: NSTreeController problems

2008-05-18 Thread Jonathan Dann
On 18 May 2008, at 20:57, Charles Srstka wrote: Lately, I've been trying to update my stodgy old ways and try to incorporate some of the new technologies Cocoa has picked up over the years when starting new projects (my main app has had to be compatible with older OS X versions, so I haven

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread P Teeson
begin rant: Oh me oh my the poor newcomers to Cocoa. Sorry folks back in the days of 360 mainframes there were manuals and they were inscrutable. But if you took the Winston Churchill aproach and spent some blood, sweat, toil and tears you would probably become a 1/2 decent assembler langua

Re: releasing NSKeyedUnarchiver causes crash

2008-05-18 Thread Jonathan Dann
On 18 May 2008, at 18:04, Markus Spoettl wrote: On May 18, 2008, at 5:25 AM, Klaus Backert wrote: - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError { *outError = nil; NSKeyedUnarchiver *archiver; archiver = [[NSKeyedUnarchiver alloc] initForRead

Re: NSTreeController problems

2008-05-18 Thread Charles Srstka
Thanks, that looks very useful. I only have one trepidation about it, which concerns this: On May 18, 2008, at 3:33 PM, Jonathan Dann wrote: - (NSArray *)rootNodes; { return [[self arrangedObjects] childNodes]; } Isn't -arrangedObjects one of those methods you're never supposed to

Cocoa et al as HCI usability problem

2008-05-18 Thread Johnny Lundy
For the record, my comments weren't about it being difficult; it's about the documentation not providing the information needed to use it. It's a beautiful API, as you say with tons of work done to implement these reusable constructs. The documentation is voluminous, but in too many cases j

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Jason Stephenson
Johnny Lundy wrote: Tutorials to me are pretty much useless, as I am not looking for a "step by step" cookbook to just getting something working, but rather a discussion of the why. How many times have we seen a tutorial say something like "control-drag from the textfield to the File's Owner

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Νικόλας Τουμπέλης
As a (relatively) newcomer to Cocoa and generally far less experienced than most of the people that have responded so far, here are my 2 cents. Cocoa and Objective-C are no more difficult or obscure than any other popular OO framework out there. I made the transition from .NET as easily as I had do

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Michael Vannorsdel
I'm also wondering if many of the people finding Cocoa difficult are also lacking OO programming experience. The docs teach Cocoa really well but if you're unfamiliar with OO design and concepts the Cocoa docs are going to be very daunting. On May 18, 2008, at 3:28 PM, Jason Stephenson wr

Re: validateMenuItem() not always being called

2008-05-18 Thread Kyle Sluder
On Sun, May 18, 2008 at 4:31 PM, <[EMAIL PROTECTED]> wrote: > I'm new to Cocoa and I created a Document-based Application with New > Project. I added a validateMenuItem() method to my document class and it is Methods in Objective-C are not denoted as you have done. The correct method is -valida

Re: validateMenuItem() not always being called

2008-05-18 Thread Hal Mueller
-validateMenuItem: is deprecated; you should probably be using - validateUserInterfaceItem: (these are both methods, not functions as you wrote). Where to implement it depends on what functionality you're trying to control/limit. If I'm only allowing one document open for read/write at a t

Re: validateMenuItem() not always being called

2008-05-18 Thread Joel Norvell
Jeff, You need to call super for the "else" cases. Are you doing that? Joel - (BOOL) validateMenuItem: (NSMenuItem *) menuItem { BOOL enable = NO; if ([menuItem action] == @selector(yourSelector:)) { if (yourEnablingLogicForThisSelectorIsSatisfied) { enable

Re: NSTreeController problems

2008-05-18 Thread Jonathan Dann
On 18 May 2008, at 21:57, Charles Srstka wrote: Thanks, that looks very useful. I only have one trepidation about it, which concerns this: On May 18, 2008, at 3:33 PM, Jonathan Dann wrote: - (NSArray *)rootNodes; { return [[self arrangedObjects] childNodes]; } Isn't -arrangedObjec

Re: validateMenuItem() not always being called

2008-05-18 Thread Kyle Sluder
On Sun, May 18, 2008 at 6:46 PM, Hal Mueller <[EMAIL PROTECTED]> wrote: > -validateMenuItem: is deprecated; you should probably be using > -validateUserInterfaceItem: Not entirely true... according to the Application Menu and Pop-up List Programming Topics for Cocoa document, under "Choosing valid

Re: validateMenuItem() not always being called

2008-05-18 Thread j o a r
On May 18, 2008, at 3:46 PM, Hal Mueller wrote: -validateMenuItem: is deprecated Really? Where is this documented? j o a r ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the li

Re: NSTreeController problems

2008-05-18 Thread Charles Srstka
On May 18, 2008, at 5:47 PM, Jonathan Dann wrote: Not any more, the documentation may not have been updated yet. The header for NSTreeController says differently as of 10.5. It's always good to check the docs and the comments in the header file. (control double click on the word NSTreeCo

Re: validateMenuItem() not always being called

2008-05-18 Thread Hal Mueller
Correction: deprecated on NSDocument. http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSDocument_Class/Reference/Reference.html#/ /apple_ref/doc/uid/2008-BBCDBJEF Hal On May 18, 2008, at 3:55 PM, j o a r wrote: On May 18, 2008, at 3:46 PM, Hal Mueller wr

Re: NSTreeController problems

2008-05-18 Thread Jonathan Dann
On 18 May 2008, at 23:57, Charles Srstka wrote: On May 18, 2008, at 5:47 PM, Jonathan Dann wrote: Not any more, the documentation may not have been updated yet. The header for NSTreeController says differently as of 10.5. It's always good to check the docs and the comments in the header

Re: NSTreeController problems

2008-05-18 Thread Charles Srstka
On May 18, 2008, at 6:44 PM, Jonathan Dann wrote: Yeah that one's really useful. NSTreeController is so much easier to use in 10.5 but those extensions to NSTreeController NSTreeNode and NSIndexPath make it really simple to use. You're welcome. These ones I didn't post but I use ALL the tim

Cocoa bindings and reluctance to use NSPopupButon

2008-05-18 Thread Erik Buck
Johnny Lundy had a difficult time using NSPopupButon along with bindings. The struggles are archived via www.cocoabuilder.com for posterity. Mr. Lundy recently wrote "...I am still very very hesitant to put another NSPopUpButton on my interface, because of the complete absence of guidance

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Torsten Curdt
On May 18, 2008, at 22:38, P Teeson wrote: begin rant: Oh me oh my the poor newcomers to Cocoa. Sorry folks back in the days of 360 mainframes there were manuals and they were inscrutable. But if you took the Winston Churchill aproach and spent some blood, sweat, toil and tears you would p

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Julius Guzy
On 18 May 2008, at 14:36, Jason Stephenson wrote: (Have you ever tried programming X11 with just XLib C calls? Nasty stuff that) Yes, superDooperExtraSpecialHighIntensityOpenWindowAndDoLotsOfWonderfulThings IfYouSetTheParametersRightWidget. Also, please don't confuse the language, Ob

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread David Wilson
On Sun, May 18, 2008 at 8:41 PM, Julius Guzy <[EMAIL PROTECTED]> wrote: > Well, there is a problems with the documentation and if it does not get > resolved then people will end up unable to write the code. I mean what is > the point in loosing people who actually want to program this machine and >

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Julius Guzy
On 18 May 2008, at 17:41, Jens Alfke wrote: On 18 May '08, at 4:33 AM, Julius Guzy wrote: Apple has been less celebrated for the humanity of its programming interface having, in my experience of Macs from the Lisa onwards, seemingly taken the attitude that its programmers were hobbyists,

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Jens Alfke
On 18 May '08, at 6:15 PM, Julius Guzy wrote: I do not think it naive of me to raise serious questions regarding usability given that i have made huge and increasingly successful efforts to get into this system so I can do some heavy duty programming. … Well if it were doing as good a job

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Julius Guzy
On 19 May 2008, at 1:56, David Wilson wrote: On Sun, May 18, 2008 at 8:41 PM, Julius Guzy <[EMAIL PROTECTED]> wrote: Well, there is a problems with the documentation and if it does not get resolved then people will end up unable to write the code. I mean what is the point in loosing people

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Scott Anguish
On May 18, 2008, at 5:03 PM, Johnny Lundy wrote: Take the "Currency Converter With Bindings" much-touted tutorial; it actually uses a method that is deprecated. this actually is a prime example of why tutorials are few and far between in the Apple doc. They require significant upkeep.

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Scott Anguish
where you feel this to be the case, PLEASE file bugs (bugreporter.apple.com) or feedback. it is all taken seriously. On May 18, 2008, at 5:39 PM, Νικόλας Τουμπέλης wrote: Apple's documentation is often verbose and pedantic but there are excellent free alternatives online and very good boo

Re: releasing NSKeyedUnarchiver causes crash

2008-05-18 Thread Markus Spoettl
On May 18, 2008, at 1:53 PM, Jonathan Dann wrote: Sorry if I've told you things you know already and there was another perfectly valid reason for doing what you did. Actually it's a good question why I didn't use a property. I'm using properties all the time - one of the reasons being the a

Re: Cocoa bindings and reluctance to use NSPopupButon

2008-05-18 Thread David
This is a very interesting topic.I've been writing my first large Cocoa application. New to objective-C and Cocoa, very experienced with Java. I started out wanting to learn what facilities are available in this new platform, partly to try to get a quick feel if it was worth switching to rather th

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Julius Guzy
On 19 May 2008, at 2:34, Jens Alfke wrote: On 18 May '08, at 6:15 PM, Julius Guzy wrote: I do not think it naive of me to raise serious questions regarding usability given that i have made huge and increasingly successful efforts to get into this system so I can do some heavy duty progr

Re: Cocoa bindings and reluctance to use NSPopupButon

2008-05-18 Thread mmalc crawford
On May 18, 2008, at 6:57 PM, David wrote: In anycase, I started with the highest level facilities expressly because I'm a newbie. Coredata and in turn bindings, seemed simple to configure and use. I didn't have to learn all the underlying gorp. Sadly that doesn't seem to be the case. Wh

XML schema support

2008-05-18 Thread David
Is there a Cocoa package that supports XML schema for either event driven (SAX like) or tree based (DOM like) XML parsing? I haven't seen any reference to XML schema for either Cocoa packages other than a statement saying you can do your own validation. _

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Michael Vannorsdel
On May 18, 2008, at 7:39 PM, Julius Guzy wrote: So I wouldn't have much to say about it except that it does have a tendency to make things seem more exciting than they actually are. For instance I can refer here to the idea of dynamic typing which still requires us to have the header files

Re: XML schema support

2008-05-18 Thread Michael Vannorsdel
Checkout NSXML* and friends (NSXMLNode, NSXMLElement). Also there's "Introduction to Tree-Based XML Programming Guide for Cocoa" and "Introduction to Event-Driven XML Programming Guide for Cocoa" guides in the docs. On May 18, 2008, at 8:07 PM, David wrote: Is there a Cocoa package that

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Jonathan Hendry
For what it's worth, something about the OS X Cocoa docs' arrangement has never quite clicked with me. In part it might be an excess of hyper text, too many pages to click through, breaking up the stream of thought. (I wish XCode's doc viewer had some kind of keyboard shortcut for clicking

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Erik Buck
On Sun, May 18, 2008 at 8:41 PM, Julius Guzy <> wrote: Tthe fact is that there will be others like me who do not find it easy to get into cocoa. At this stage I'll not be jumping ship but believe me I've had sleeples nights about it. Mainly i'll not do it because although I'm far from attack spee

Re: Cocoa bindings and reluctance to use NSPopupButon

2008-05-18 Thread Andreas Mayer
Am 19.05.2008 um 04:03 Uhr schrieb mmalc crawford: Which is exactly what the documentation takes pains to tell you. I guess it's just not clear enough. There should be a big red warning box: "Don't try to use Core Data or Cocoa Bindings unless you are an experienced Cocoa programmer and

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread ben syverson
On May 18, 2008, at 8:39 PM, Julius Guzy wrote: Well this is exactly how things seem to pan out. Those who have been doing this for some time like the documentation they have. No doubt once I become a bit more adept I will too. But right now.. This is going to sound bitchy, but it's ha

Is there an NSCollectionView selection change notification?

2008-05-18 Thread Markus Spoettl
Hello List, I've started playing with NSCollectionView and everything worked out beautifully (custom views, selection state handling for items etc.). One thing I can't figure out is how my application/document gets notified about a change of selection. I could go through the NSCollectio

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Andreas Mayer
Am 19.05.2008 um 04:08 Uhr schrieb Michael Vannorsdel: Hopefully you won't get rude people responding with RTFM and such. Actually, I don't understand why an RTFM kind of answer is perceived as rude. I'm really happy when I get an RTFM *with a link* to the appropriate document. Also, I

Re: Cocoa bindings and reluctance to use NSPopupButon

2008-05-18 Thread John Joyce
Johnny Lundy had a difficult time using NSPopupButon along with bindings. The struggles are archived via www.cocoabuilder.com for posterity. Mr. Lundy recently wrote "...I am still very very hesitant to put another NSPopUpButton on my interface, because of the complete absence of guidance on ho

Re: validateMenuItem() not always being called

2008-05-18 Thread jeffs87
Hi else { enable = [super validateMenuItem:menuItem]; } I wasn't, but when I did, it still was only called for the File menu. -validateMenuItem: is deprecated; you should probably be using -validateUserInterfaceItem: Tried validateUserInterfaceItem, no change. I recommend Hi

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Stuart Malin
On May 18, 2008, at 3:56 PM, [EMAIL PROTECTED] wrote: On Sun, May 18, 2008 at 8:41 PM, Julius Guzy <[EMAIL PROTECTED]> wrote: Well, there is a problems with the documentation and if it does not get resolved then people will end up unable to write the code. I mean what is the point in loosin

Re: validateMenuItem() not always being called

2008-05-18 Thread Kyle Sluder
On Sun, May 18, 2008 at 11:05 PM, <[EMAIL PROTECTED]> wrote: > The example "SimpleToolbar" has a validateMenuItem method in MyDocument.m > and it too only gets > called for the File menu but the Edit menu is properly updated for Cut, Copy > and Paste. > I guess NSTextView handles it. Correct. NS

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Michael Vannorsdel
Nothing wrong with saying "you should read such and such". But RTFM is the condescending way of saying it (just look what it stands for). Would be like asking someone where the restroom is and getting "look at the building directory, you blind clueless moron". My point was about posts th

Re: Cocoa bindings and reluctance to use NSPopupButon

2008-05-18 Thread Brett Powley
On 19/05/2008, at 12:38 PM, Andreas Mayer wrote: Am 19.05.2008 um 04:03 Uhr schrieb mmalc crawford: Which is exactly what the documentation takes pains to tell you. I guess it's just not clear enough. There should be a big red warning box: "Don't try to use Core Data or Cocoa Bindings

Re: validateMenuItem() not always being called

2008-05-18 Thread Jens Alfke
On 18 May '08, at 8:05 PM, [EMAIL PROTECTED] wrote: I wasn't, but when I did, it still was only called for the File menu. Any object's validateMenuItem method is only called for menu items that would message that object if they were invoked. That means: * Menu items whose target directly

Re: Is there an NSCollectionView selection change notification?

2008-05-18 Thread Jens Alfke
On 18 May '08, at 7:41 PM, Markus Spoettl wrote: I've started playing with NSCollectionView and everything worked out beautifully (custom views, selection state handling for items etc.). One thing I can't figure out is how my application/document gets notified about a change of selection.

Re: XML schema support

2008-05-18 Thread Jens Alfke
On 18 May '08, at 7:07 PM, David wrote: Is there a Cocoa package that supports XML schema for either event driven (SAX like) or tree based (DOM like) XML parsing? I haven't seen any reference to XML schema for either Cocoa packages other than a statement saying you can do your own validati

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Nathan Kinsinger
Some people have said they didn't know where to start (or their questions lead myself and others to believe that is the case). One of the conceptual documents that I found most useful was the Cocoa Fundamentals Guide http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals

Re: NSStream, NSInputStream, NSOutputStream

2008-05-18 Thread John MacMullin
Jens and Ken: Thank you for your responses. I believe I now understand in part as to what is happening as to the streams. Let me take the output "trigger" first. The Stream Programming Guide states: "if the delegate receives an NSStreamEventHasSpaceAvailable event and does not write

Re: XML schema support

2008-05-18 Thread Stuart Malin
As best as I understand, the NSXML* classes are build on libxml, but even so, there isn't, to my knowledge, any schema support exposed in Cocoa by these classes. However, the good news is that you should have libxml on your machine. Todd Ditchendorf's XML Nanny performs Schema and RELAX NG

Accessing variables across classes

2008-05-18 Thread Joey None
Hello all, I hope someone can help me with this. I have my ApplicationDelegate which contains a couple of NSMutableArrays with data in them. Then I have a few CustomNSViews classes which I have sub-classed. I need to access the NSMutableArrays declared on the AppDelegate class from the NSVie

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Peter Duniho
From: ben syverson <[EMAIL PROTECTED]> This is going to sound bitchy, but it's hard for me to have any sympathy for vague complaints about the docs or the usability of Cocoa. That does sound bitchy. I mean, it's fair enough to say that people ought to be providing specific feedback and const

Re: Accessing variables across classes

2008-05-18 Thread Brett Powley
MyAppDelgate *ad = [NSApp delegate]; then do something with [ad myMutableArray] Cheers, Brett On 19/05/2008, at 3:03 PM, Joey None wrote: Hello all, I hope someone can help me with this. I have my ApplicationDelegate which contains a couple of NSMutableArrays with data in them. Then I h

Re: Is there an NSCollectionView selection change notification?

2008-05-18 Thread Markus Spoettl
On May 18, 2008, at 8:36 PM, Jens Alfke wrote: I've started playing with NSCollectionView and everything worked out beautifully (custom views, selection state handling for items etc.). One thing I can't figure out is how my application/document gets notified about a change of selection. If

Re: Accessing variables across classes

2008-05-18 Thread Andrew Farmer
On 18 May 08, at 22:06, Brett Powley wrote: MyAppDelgate *ad = [NSApp delegate]; then do something with [ad myMutableArray] Incorrect. You don't get accessors for instance variables automatically like that. To the original poster, there are three approaches you can go with here. One is to

Re: Accessing variables across classes

2008-05-18 Thread Brett Powley
On 19/05/2008, at 3:22 PM, Andrew Farmer wrote: On 18 May 08, at 22:06, Brett Powley wrote: MyAppDelgate *ad = [NSApp delegate]; then do something with [ad myMutableArray] Incorrect. You don't get accessors for instance variables automatically like that. Well yes, but I assumed that his

Re: Accessing variables across classes

2008-05-18 Thread Andrew Merenbach
On May 18, 2008, at 10:22 PM, Andrew Farmer wrote: On 18 May 08, at 22:06, Brett Powley wrote: MyAppDelgate *ad = [NSApp delegate]; then do something with [ad myMutableArray] Incorrect. You don't get accessors for instance variables automatically like that. To the original poster, there a

Re: Accessing variables across classes

2008-05-18 Thread Adam Leonard
Hi, What you are doing is probably bad design. I would recommend your read up on the MVC (Model View Controller) pattern: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html In your set up, the ApplicationDelegate is your con

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Graham Cox
For clipping tasks like this, NSBezierPath is a very poor cousin to Apple's old technology for this - Regions. With regions one could trivially obtain union, intersection, difference and xor of complex shapes using the built-in APIs. Neither NSBezierPath nor the underlying Quartz routines i

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Andrew Merenbach
Is there any reason to use the cast on cbbox, instead of using NSRectFromCGRect(cbbox), which does the same thing but wraps it up nicely in an easy-to-read fashion? From the docs: NSRectFromCGRect Returns an NSRect typecast from a CGRect. NSRect NSRectFromCGRect(CGRect cgrect) { return (*

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Graham Cox
Yes, it's not available pre 10.5 G. On 19 May 2008, at 4:31 pm, Andrew Merenbach wrote: Is there any reason to use the cast on cbbox, instead of using NSRectFromCGRect(cbbox) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Erik Buck
FROM : Peter Duniho DATE : Mon May 19 07:03:25 2008 [deleted] Real people are having real problems getting into Cocoa. I don't see the kind of repeated commentary about poor documentation and difficult APIs in the C#/.NET forums or Java forums. It comes up once in a blue moon, but not with the

Re: Is there an NSCollectionView selection change notification?

2008-05-18 Thread Jens Alfke
On 18 May '08, at 10:18 PM, Markus Spoettl wrote: Does this look OK, especially, is removeObserver: in dealloc: not too late? Yup, that looks fine. —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev

Re: NSStream, NSInputStream, NSOutputStream

2008-05-18 Thread Jens Alfke
On 18 May '08, at 9:19 PM, John MacMullin wrote: I think that all one needs to do is to write one byte in the "external" function, then handle the rest of the writes through the delegate NSStreamEventHasSpaceAvailable event. You don't even need to do the one byte externally. Your delegate

Re: Is there an NSCollectionView selection change notification?

2008-05-18 Thread Markus Spoettl
On May 18, 2008, at 11:43 PM, Jens Alfke wrote: Does this look OK, especially, is removeObserver: in dealloc: not too late? Yup, that looks fine. Excellent, thanks! Regards Markus -- __ Markus Spoettl smime.p7s Description: S/MIME cryptographic sig