Re: Why aren't my bindings firing?

2008-06-27 Thread Ken Thomases
On Jun 28, 2008, at 1:30 AM, Charles Srstka wrote: I guess the only question I still have then is: why did my example worke one-way in the first place? If the bindings are in a different namespace, shouldn't it have failed for lack of an exposed binding named "title" in the Bar object? Or i

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread Owen Yamauchi
On Fri, Jun 27, 2008 at 11:29 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > I've read what you said but I don't know what to do still. > > Do I need to implement the method? the -observeValueForKeyPath >> >> :ofObject:change:context: method? No. NSTextField implements this already. See below. > I am

switching content views

2008-06-27 Thread dudley ackerman
i can call setContentView on my app's window only if i don't plug in a 2nd monitor. posts on this topic in the archives say you can't simple call setContentView on a window - i'm not clear if that means even once. even with a 2nd monitor, the call always works the 1st time for me -- perhaps

Re: NSPopupButton Bindings-Related Issue

2008-06-27 Thread Ken Thomases
On Jun 27, 2008, at 11:01 PM, Keary Suska wrote: Generally, my needs are simple. In this case, I need a sheet that displays an nspopupbutton populated with product names, where a user can select an item from the popup and a description of the item would appear in a designated space below the

Re: Why aren't my bindings firing?

2008-06-27 Thread Charles Srstka
On Jun 28, 2008, at 1:00 AM, Ken Thomases wrote: Actually, NSTextField does not have a binding named "stringValue", even though it does have a property with that name. Conversely, it has a binding called "value", although it doesn't have a property by that name. See the NSTextField bindin

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
I've read what you said but I don't know what to do still. Do I need to implement the method? the -observeValueForKeyPath > > :ofObject:change:context: method? I am not having trouble with bindings. They seem to be working ok. What I need to know is what I need to add to get the text field to u

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread Owen Yamauchi
On Fri, Jun 27, 2008 at 10:20 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > But I was sure since I have a firstName method and a setFirstName method it > would update the textField. I have used IB to bind the value of the > textField to the value of the person object and that works when I edit the > t

Re: Why aren't my bindings firing?

2008-06-27 Thread Ken Thomases
On Jun 27, 2008, at 11:08 PM, Charles Srstka wrote: With that said, aren't bindings *always* creating a two-way connection between properties? Not exactly, no. A binding is a different thing than a property. (By the way, did you read the "How Do Bindings Work?" chapter I linked to, or the

Re: Help getting custom cell layout in NSOutlineView column

2008-06-27 Thread Sebastian Nowicki
On 28/06/2008, at 2:57 AM, Sebastian Nowicki wrote: On 28/06/2008, at 12:05 AM, j o a r wrote: This is a good piece of sample code to show how to create a complex custom cell subclass: j o a r Thanks, that helped a lot. I've g

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
Further investigation says that my "firstName" method is indeed being called. Hmm. On Fri, Jun 27, 2008 at 10:28 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > I was under the impression that if my class implemeted the "varname" and > "setVarName" methods, that I could safely add an observer. > > > >

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
I was under the impression that if my class implemeted the "varname" and "setVarName" methods, that I could safely add an observer. On Fri, Jun 27, 2008 at 10:24 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > could you be more specific that just a link? ;) > > > On Fri, Jun 27, 2008 at 10:23 PM, mm

Re: Style Question

2008-06-27 Thread Jens Alfke
On 27 Jun '08, at 9:45 PM, Rob Ross wrote: Btw, how many people realize this convention comes from the early K&R C book, and the *only* reason they wrote it this way was to minimize the number of lines of text their examples would take up on each page? It's a type-setting design decision,

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
could you be more specific that just a link? ;) On Fri, Jun 27, 2008 at 10:23 PM, mmalc crawford <[EMAIL PROTECTED]> wrote: > > On Jun 27, 2008, at 10:20 PM, Alex Wait wrote: > > But I was sure since I have a firstName method and a setFirstName method >> it >> would update the textField. I have

Re: KVO Question -- Really Simple for Pros

2008-06-27 Thread mmalc crawford
On Jun 27, 2008, at 10:20 PM, Alex Wait wrote: But I was sure since I have a firstName method and a setFirstName method it would update the textField. I have used IB to bind the value of the textField to the value of the person object and that works when I edit the textfield (yay). So I kn

KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
Practicing some KVO concepts. I have this line [person addObserver:textField forKeyPath:@"firstName" options:NSKeyValueObservingOptionNew context:NULL]; person is App Controller's Person object. textField is a NSTextField person does have a "firstName" property of type NSString When I clic

Re: Style Question

2008-06-27 Thread Alex Wait
I was meaning to imply that if it was called "FirstName" would setFirstName still be called? I know the convention for naming variables. :) On Fri, Jun 27, 2008 at 10:13 PM, Jens Alfke <[EMAIL PROTECTED]> wrote: > > On 27 Jun '08, at 9:44 PM, Alex Wait wrote: > > if I have a member, let's say a

Re: Style Question

2008-06-27 Thread Jens Alfke
On 27 Jun '08, at 9:44 PM, Alex Wait wrote: if I have a member, let's say a NSString, called FirstName... would the setter still be setFirstName? Yes. But you shouldn't name the property "FirstName". Property and method (and instance variable) names should be lowercased. There are some ex

Re: NSString uppercaseString

2008-06-27 Thread Jens Alfke
On 27 Jun '08, at 8:51 PM, Shawn Erickson wrote: Could I assume if the doc does not mention releasing the memory, then I don't have to worry about it? No :) Well, to respond a bit more positively, it's not what the doc says so much as what the method's named, that tells you what its beh

Re: Style Question

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 9:44 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > I got another Style related question. /me points at ... http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/index.html -Shawn ___ Cocoa-dev mailing list (Co

Re: Style Question

2008-06-27 Thread Rob Ross
I love this one. This becomes a religious issue for some people. Both styles are popular, you should feel comfortable reading either one. Write in the one you like best. Btw, how many people realize this convention comes from the early K&R C book, and the *only* reason they wrote it this wa

Re: Style Question

2008-06-27 Thread Alex Wait
I got another Style related question. if I have a member, let's say a NSString, called FirstName... would the setter still be setFirstName? I notice how it capitalizes the first letter even if the member doesn't start with a capital letter. if I have a "three word" named variable, let's say firs

Re: Core data question in multiwindow doc app

2008-06-27 Thread Chris Hanson
On Jun 27, 2008, at 7:25 PM, Steven Hamilton wrote: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildSourceList) name:@"NSManagedObjectContextObjectsDidChangeNotification" object: [self.document managedObjectContext]]; Notification names should always use the

Re: Style Question

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 9:30 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > Also since I am using this style, XCode doesn't tab in for me when I type { > then a return. It will if you enable it (at least it always does for me). Use whatever coding style you want however do try to follow Cocoa like n

Style Question

2008-06-27 Thread Alex Wait
I have noticed, coming from C++ and Visual Studio (at school), a couple style differences if (value) { //do something } insteasd of if (value) { //do something } Also since I am using this style, XCode doesn't tab in for me when I type { then a return. This is the style I "taught" and I

Re: simple question about passing around pointers to objects

2008-06-27 Thread Graham Cox
Actually, in the context of this: NSArray *a = [NSArray arrayFromObjects:someObject, anotherObject, nil]; you would do nothing, since that method returns an autoreleased NSAarray already. But in a situation where you alloc/inited an object, you would autorelease before returning it. G

Re: simple question about passing around pointers to objects

2008-06-27 Thread Graham Cox
Then you'd be wrong. You should use [a autorelease]; G. On 28 Jun 2008, at 10:19 am, Daniel Richman wrote: I would use [a retain]; ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-27 Thread Graham Cox
On 28 Jun 2008, at 12:38 am, John Love wrote: [code snipped] Finally, you nailed it, almost (one small bug, see below). Phew! Okay ... all the snippets are done ... now, the questions: (1) warning: no doSheetSelection:contextInfo method found which, I think, is due to the fac

Re: while loop with sleep(): logging works, but not UI events

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 8:59 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > On Fri, Jun 27, 2008 at 8:55 PM, Daniel Richman > <[EMAIL PROTECTED]> wrote: >> Hi All, >> >> I'm trying to program a simple timer app: you enter a number of seconds, and >> it updates a text field every second with the nu

Re: Why aren't my bindings firing?

2008-06-27 Thread Charles Srstka
On Jun 27, 2008, at 8:06 PM, Ken Thomases wrote: A binding is not just an automated two-way connection between KVC/ KVO-conforming properties. In particular, the binding name you pass to bind:toObject:withKeyPath:options: is not in the same "namespace" as properties. Binding names are som

Re: while loop with sleep(): logging works, but not UI events

2008-06-27 Thread Stephen J. Butler
On Fri, Jun 27, 2008 at 10:55 PM, Daniel Richman <[EMAIL PROTECTED]> wrote: > What's happening is that if I enter a number and then press 'start', 'start' > stays in the 'pressed' position until the loop finishes, after which it > returns to the normal position. My guess is that this is stopping an

NSPopupButton Bindings-Related Issue

2008-06-27 Thread Keary Suska
Generally, my needs are simple. In this case, I need a sheet that displays an nspopupbutton populated with product names, where a user can select an item from the popup and a description of the item would appear in a designated space below the control, and of course I want to retrieve the value aft

Re: while loop with sleep(): logging works, but not UI events

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 8:55 PM, Daniel Richman <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm trying to program a simple timer app: you enter a number of seconds, and > it updates a text field every second with the number of secs remaining. The > problem is that I'm not able to do anything with the

while loop with sleep(): logging works, but not UI events

2008-06-27 Thread Daniel Richman
Hi All, I'm trying to program a simple timer app: you enter a number of seconds, and it updates a text field every second with the number of secs remaining. The problem is that I'm not able to do anything with the UI while this is going on. Here's my code: - (IBAction)startTimer:(id)sender {

Re: NSString uppercaseString

2008-06-27 Thread Shawn Erickson
On Fri, Jun 27, 2008 at 8:37 PM, Sam Mo <[EMAIL PROTECTED]> wrote: > Could I assume if the doc does not mention releasing the memory, then I > don't have to worry about it? No :) Read and understand the memory management programming guide for Cocoa. Cocoa memory management is easy and consistent

How can I find the source of random crashes when using debug frameworks

2008-06-27 Thread Markus Spoettl
Hello All, I'm trying to hunt down a crash bug for two days now and I'm at a complete loss, have finally run out of ideas what else I can try. I've read the Corbin Dunn's EXC_BAD_ACCESS blog post as well as the debugger magic tech note. I turned on debug frameworks, NSZombieEnabled and

Re: NSString uppercaseString

2008-06-27 Thread Sam Mo
On Jun 27, 2008, at 10:12 AM, Tito Ciuro wrote: As Matt also points out, the documentation is not always crystal- clear, so I was simply trying to answer Sam's specific question. Since not all APIs behave the same way I added the link to the "Memory Management Programming Guide for Cocoa" pa

Re: Opening a Panel

2008-06-27 Thread Alex Wait
I misspelled preference. And yeah. Xcode was telling me of my mistake. :) On Fri, Jun 27, 2008 at 7:24 PM, Kyle Sluder < [EMAIL PROTECTED] <[EMAIL PROTECTED]>> wrote: > On Fri, Jun 27, 2008 at 10:01 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > > I had misspelled my action's name. I am still gettin

Re: Core data question in multiwindow doc app

2008-06-27 Thread Steven Hamilton
On 28/06/2008, at 4:32 AM, Ben Trumbull wrote: When I add a new account entity my outlineview doesn't know. Should I be using a notification to find out when a new account entity is added. If so, which one? The easiest way to track insertions and deletions in the NSManagedObjectContext is t

Re: Opening a Panel

2008-06-27 Thread Kyle Sluder
On Fri, Jun 27, 2008 at 10:01 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > I had misspelled my action's name. I am still getting used to Obj C and it's > ability to compile methods that haven't been declared. :) You haven't specified what was misspelled (just the implementation or the interface decl

Re: Opening a Panel

2008-06-27 Thread Alex Wait
apologies to all ;) I had misspelled my action's name. I am still getting used to Obj C and it's ability to compile methods that haven't been declared. :) On Fri, Jun 27, 2008 at 6:15 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > On Jun 27, 2008, at 6:31 PM, Alex Wait wrote: > > and when my pro

Re: Opening a Panel

2008-06-27 Thread Ken Thomases
On Jun 27, 2008, at 6:31 PM, Alex Wait wrote: and when my program runs, the Preferences menu item is grayed out. I checked to make sure it was "Enabled" and it is. Is there some property I need to set? By default, Cocoa automatically enables/disables menu items. It does this based on the

Re: Opening a Panel

2008-06-27 Thread Sherm Pendley
On Fri, Jun 27, 2008 at 7:31 PM, Alex Wait <[EMAIL PROTECTED]> wrote: > Been working my way through the Hillegass book. I don't have the book (sorry Aaron, I'm poor...) so I'll to talk in generalities. > I'm on the chapter where you usea a Panel window and I am having some > trouble. I did all th

Re: Why aren't my bindings firing?

2008-06-27 Thread Ken Thomases
On Jun 27, 2008, at 2:37 PM, Charles Srstka wrote: and in Foo's windowControllerDidLoadNib: method (it's an NSDocument subclass) I've got this: [[self bar] bind:@"title" toObject:ivar_controller withKeyPath:@"selection.displayName" options:nil]; Now here's the thing: if I call setDisplayN

Re: simple question about passing around pointers to objects

2008-06-27 Thread Clark Cox
On Fri, Jun 27, 2008 at 5:19 PM, Daniel Richman <[EMAIL PROTECTED]> wrote: > >> Here is a simple example: >> >> -(NSArray*) makeObject { >>NSArray *a = [NSArray arrayFromObjects];someObject, anotherObject, >> nil]; > > This should be NSArray *a = [NSArray arrayFromObjects:someObject, > anotherO

Re: NSMutableArray help

2008-06-27 Thread William Squires
On Jun 27, 2008, at 7:44 PM, Alex Wait wrote: To complete the exercise you need to make your app controller a data source of the NSTableView. The function he gives you as a hint is the one that is called when a user edits the field. Actually, this is what you should do AFTER the user e

Re: NSMutableArray help

2008-06-27 Thread Alex Wait
To complete the exercise you need to make your app controller a data source of the NSTableView. The function he gives you as a hint is the one that is called when a user edits the field. On Fri, Jun 27, 2008 at 5:37 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > On Jun 27, 2008, at 5:46 PM, Nick

Re: NSMutableArray help

2008-06-27 Thread Ken Thomases
On Jun 27, 2008, at 5:46 PM, Nick Zitzmann wrote: On Jun 27, 2008, at 4:41 PM, Eric Lee wrote: My question is, how do you add an object to a NSMutableArray, -addObject:. This is in the NSMutableArray documentation... If the NSMutableArray is the backing storage for a property, then modif

Re: Working with Notifications and NSFileHandle

2008-06-27 Thread Jason Coco
On Jun 27, 2008, at 20:11 , Ken Thomases wrote: On Jun 27, 2008, at 3:32 PM, Wan, Nathan (CIV) wrote: I'm new to Objective-C and Cocoa and I am having trouble with the notifications system. This I thought was just a small project to write a native mac program to continuously read and writ

Re: NSTableView / NSArrayController Drawing

2008-06-27 Thread Ken Thomases
On Jun 27, 2008, at 12:16 PM, Murray Bookchin wrote: Thanks for your reply Ken, You're welcome. The way I'm modifying the content array is: [myArrayController addObject:someDictionary]; And that is certainly using KVC, probably through - mutableArrayValueForKey:, to pass the modification

Re: Losing some event

2008-06-27 Thread Scott Anguish
On Jun 27, 2008, at 1:37 PM, Laurent Cerveau wrote: Hi I am experiencing with Core Animation applications in kiosk mode and starts from the MenuView sample code I found somewhere on Apple web site (it displays a Quartz Composer composition in the background with a few CALayer that acts a

Re: simple question about passing around pointers to objects

2008-06-27 Thread Daniel Richman
Here is a simple example: -(NSArray*) makeObject { NSArray *a = [NSArray arrayFromObjects];someObject, anotherObject, nil]; This should be NSArray *a = [NSArray arrayFromObjects:someObject, anotherObject]; // should I [a retain]; I would use [a retain]; // or [a release]; /

Re: Working with Notifications and NSFileHandle

2008-06-27 Thread Ken Thomases
On Jun 27, 2008, at 3:32 PM, Wan, Nathan (CIV) wrote: I'm new to Objective-C and Cocoa and I am having trouble with the notifications system. This I thought was just a small project to write a native mac program to continuously read and write data from a serial port to a file. It was sugg

Opening a Panel

2008-06-27 Thread Alex Wait
Been working my way through the Hillegass book. I'm on the chapter where you usea a Panel window and I am having some trouble. I did all the instructions to the letter (as best as I can tell ^_^ ) and when my program runs, the Preferences menu item is grayed out. I checked to make sure it was "Ena

Re: Why aren't my bindings firing?

2008-06-27 Thread Charles Srstka
On Jun 27, 2008, at 5:17 PM, Keary Suska wrote: If you aren't overriding +automaticallyNotifiesObserversForKey: to return NO, you should not be calling willChangeValueForKey/ didChangeValueForKey in your setters. They are KVC-compliant as shown. Fix that, then see if the problem goes away.

Re: NSMutableArray help

2008-06-27 Thread Nick Zitzmann
On Jun 27, 2008, at 4:41 PM, Eric Lee wrote: My question is, how do you add an object to a NSMutableArray, -addObject:. This is in the NSMutableArray documentation... and then have to array display it? Arrays usually serve as back-ends for NSTableView views (hint). The book has a hint ab

NSMutableArray help

2008-06-27 Thread Eric Lee
For practice (and I¹m a beginner...reading Aaron Hillegass¹ book), and I¹m trying to complete one of his challenges in his Third Edition. In that challenge, you are supposed to make a to-do list. My question is, how do you add an object to a NSMutableArray, and then have to array display it? The

Re: How to deal with a MenuItem with both a binded state property and an action method

2008-06-27 Thread Keary Suska
6/27/08 4:06 PM, also sprach [EMAIL PROTECTED]: > I am struck in what should be a simple task so I would appreciate any > help. > > I have a menu item which I want to show a default on or off state, so > I set up a binding in IB to a BOOL "monitor" property in my > controller. This works ok and b

Re: Why aren't my bindings firing?

2008-06-27 Thread Keary Suska
6/27/08 1:37 PM, also sprach [EMAIL PROTECTED]: > I've got two classes - let's call them "Foo" and "Bar". Foo's > implementation has this in it: > > - (void)setDisplayName:(NSString *)name { > [self willChangeValueForKey:@"displayName"]; > > NSLog(@"setting display name to %@", name);

How to deal with a MenuItem with both a binded state property and an action method

2008-06-27 Thread Joan Lluch (casa)
I am struck in what should be a simple task so I would appreciate any help. I have a menu item which I want to show a default on or off state, so I set up a binding in IB to a BOOL "monitor" property in my controller. This works ok and both the check mark in the menu item and the property

Re: Losing some event

2008-06-27 Thread Laurent Cerveau
That was it! Thanks laurent On Jun 27, 2008, at 8:33 PM, Michael Ash wrote: On Fri, Jun 27, 2008 at 1:37 PM, Laurent Cerveau <[EMAIL PROTECTED]> wrote: Hi I am experiencing with Core Animation applications in kiosk mode and starts from the MenuView sample code I found somewhere on Apple

Re: simple question about passing around pointers to objects

2008-06-27 Thread Rob Ross
The details of memory management take a long time to understand fully, but there are some basic simple principles that will really help you out. 1. When you get an object from a method that starts with "alloc" or "new", or contains the word "copy" in it, YOU own that object. The retain co

Re: simple question about passing around pointers to objects

2008-06-27 Thread Andy Lee
On Jun 27, 2008, at 4:22 PM, Paul Archibald wrote: I am reading the Hillegass book, but I don't really see an example of what I am tryng to do, although it seems like a very basic question. [...] But, as I have been trying to make an exhaustive test of what "works" and what "crashes", I rea

Re: Extent of NDA concerning iPhone

2008-06-27 Thread Kyle Sluder
On Fri, Jun 27, 2008 at 2:27 PM, John Murphy <[EMAIL PROTECTED]> wrote: > I was planning to put some video tutorials up on my site that included some > stuff on the iPhone. Should I hold off? Omar's right, this isn't the best place for that. You can e-mail WWDR for clarification, and then maybe

Working with Notifications and NSFileHandle

2008-06-27 Thread Wan, Nathan (CIV)
Hi all I'm new to Objective-C and Cocoa and I am having trouble with the notifications system. This I thought was just a small project to write a native mac program to continuously read and write data from a serial port to a file. It was suggested I use NSFileHandle to maintain safe threads,

Re: NSSpeechSynthesizer and a speech dictionary

2008-06-27 Thread David Brennan
Hi, I've been told that I can use sample dictionary in the documentation for the UseSpeechDictionary function in the Speech Synthesis Manager Reference, but I don't seem to be able to get it to work. Any ideas on what I might be doing wrong would be a great help. Below is the code that I am using

simple question about passing around pointers to objects

2008-06-27 Thread Paul Archibald
Comrades: I have experimented a bit with this, and I think I have something that works, but I would like to understand it better. I am reading the Hillegass book, but I don't really see an example of what I am tryng to do, although it seems like a very basic question. The Question: If I w

Re: Extent of NDA concerning iPhone

2008-06-27 Thread Omar Qazi
On Jun 27, 2008, at 11:27 AM, John Murphy wrote: I was planning to put some video tutorials up on my site that included some stuff on the iPhone. Should I hold off? This is not really the right place for a question like that. That said, yes. Omar Qazi Hello, Galaxy! 1.310.294.1593

Help with notifications and NSFileHandle threads

2008-06-27 Thread Wan, Nathan (CIV)
Hi all, I am new to Objective-C and Cocoa, but I am learning it for what I thought was a pretty small project. I need some help with the notification system and the run loop in Cocoa. The end result is supposed to be a program that constantly reads and writes data from a serial port to a loc

Why aren't my bindings firing?

2008-06-27 Thread Charles Srstka
Okay, in a project I'm working on, I made the mistake of trying to do something simple with the weird deep magic known as Cocoa Bindings. I've got two classes - let's call them "Foo" and "Bar". Foo's implementation has this in it: - (void)setDisplayName:(NSString *)name { [self willChan

Extent of NDA concerning iPhone

2008-06-27 Thread John Murphy
I was planning to put some video tutorials up on my site that included some stuff on the iPhone. Should I hold off? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: Help getting custom cell layout in NSOutlineView column

2008-06-27 Thread Sebastian Nowicki
On 28/06/2008, at 12:05 AM, j o a r wrote: This is a good piece of sample code to show how to create a complex custom cell subclass: j o a r Thanks, that helped a lot. I've got a problem changing the height of the cell. Whateve

re: Core data question in multiwindow doc app

2008-06-27 Thread Ben Trumbull
When I add a new account entity my outlineview doesn't know. Should I be using a notification to find out when a new account entity is added. If so, which one? The easiest way to track insertions and deletions in the NSManagedObjectContext is the notification NSManagedObjectContextObjectsDidCh

Re: Losing some event

2008-06-27 Thread Michael Ash
On Fri, Jun 27, 2008 at 1:37 PM, Laurent Cerveau <[EMAIL PROTECTED]> wrote: > Hi > > I am experiencing with Core Animation applications in kiosk mode and starts > from the MenuView sample code I found somewhere on Apple web site (it > displays a Quartz Composer composition in the background with a

Re: Losing some event

2008-06-27 Thread Omar Qazi
On Jun 27, 2008, at 10:37 AM, Laurent Cerveau wrote: - I also make sure I make the view ist the firstResponder of the window. Sorry, I missed the last line of your email. Omar Qazi Hello, Galaxy! 1.310.294.1593 smime.p7s Description: S/MIME cryptographic signature __

Re: Losing some event

2008-06-27 Thread Omar Qazi
On Jun 27, 2008, at 10:37 AM, Laurent Cerveau wrote: Hi I am experiencing with Core Animation applications in kiosk mode and starts from the MenuView sample code I found somewhere on Apple web site (it displays a Quartz Composer composition in the background with a few CALayer that acts

Losing some event

2008-06-27 Thread Laurent Cerveau
Hi I am experiencing with Core Animation applications in kiosk mode and starts from the MenuView sample code I found somewhere on Apple web site (it displays a Quartz Composer composition in the background with a few CALayer that acts as button). In order to go full screen I have been goi

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 initW

Re: Layer Backed Views and CoreAnimation neither animate nor stay in place

2008-06-27 Thread Brian Christensen
On Jun 27, 2008, at 08:56, Chilton Webb wrote: (3) Even when everything else is working right, the first time I perform my animation method, the animation does not work. Instead, it quickly swaps out the old view with the new one, and displays it in the foreground, on top of all other views

Re: NSTableView / NSArrayController Drawing

2008-06-27 Thread Murray Bookchin
Thanks for your reply Ken, The way I'm modifying the content array is: [myArrayController addObject:someDictionary]; Each of the NSTableColumns in my TableView have their value bound to myArrayController.arrangedObjects.someKey where someKey corresponds to a key in a dictionary in the content arr

Re: Leak in NSSavePanel

2008-06-27 Thread Corbin Dunn
On Jun 26, 2008, at 3:23 PM, Jelle Vandebeeck wrote: Hi Corbin, You should check out this link: http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSavePanel_Class/Reference/Reference.html The word singleton is used :-) Thank you -- I logged a bug against our

Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Steve Christensen
On Jun 27, 2008, at 8:25 AM, Devon Ferns wrote: I agree. It's not like what's in the SDK is super secret. Anyone can download it. Yeah, anyone can download it, but in order to download it, you have to go through the process of accepting a license agreement that includes a NDA restrictio

Re: Help getting custom cell layout in NSOutlineView column

2008-06-27 Thread j o a r
On Jun 27, 2008, at 8:55 AM, Sebastian Nowicki wrote: I've been trying to find some documentation as to how to do this, and as far as I can tell I'm supposed to subclass NSCell and somehow draw both labels. I'm completely new to creating views and such, and I'm unable to find any good samp

Help getting custom cell layout in NSOutlineView column

2008-06-27 Thread Sebastian Nowicki
Hi, I'd like to make an NSOutlineView have a (perceptually) single column, with 2 labels and an image. The image isn't really important at the moment, as I can't implement that part yet. At the moment I just want to have two labels within a column, one above the other. I've been trying to

[Moderator] Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Scott Anguish
On Jun 27, 2008, at 11:25 AM, Devon Ferns wrote: I agree. It's not like what's in the SDK is super secret. Anyone can download it. Devon You can only download it after accepting to the confidentiality agreement. Believe it or not, there are people who can't, or won't, download it b

Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Scott Anguish
On Jun 27, 2008, at 11:17 AM, Tom Harrington wrote: Oh, they do allow it, despite what the moderators here say. I'm not just making these rules up as I go because it's what I want. These are the rules provided by WWDR and others. You just have to use the appropriate Apple forum. Apple's s

[Moderator] Re: Suggestions on how to price an iPhone app for the app store which relies on a central server

2008-06-27 Thread Scott Anguish
On Jun 27, 2008, at 5:18 AM, Brian Tunning wrote: Let me know if there is a more appropriate forum for this question -- this Cocoa list was the best I could find, especially considering that I am not one of the lucky few in the "official" iphone developer program, and do not see any other

Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Devon Ferns
I agree. It's not like what's in the SDK is super secret. Anyone can download it. Devon Tom Harrington wrote: Oh, they do allow it, despite what the moderators here say. You just have to use the appropriate Apple forum. Apple's support forums have a "developer" section with no shortage o

Re: Catching the delegate message in a subclass

2008-06-27 Thread Andy Lee
On Jun 27, 2008, at 11:03 AM, Sveinbjorn Thordarson wrote: Hello everyone, I'm implementing a subclass of NSTextField and I need to intercept a delegate message in the class before it is sent to the delegate. Is this possible, and if so, how? See the docs for the methods -textDidBeginEditin

Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Tom Harrington
On Fri, Jun 27, 2008 at 12:01 AM, Jens Alfke <[EMAIL PROTECTED]> wrote: > On 26 Jun '08, at 11:36 AM, Hamish Allan wrote: > >> What we really need is for the cocoa-dev list admin page to require >> new subscribers to type in the phrase "I will not make posts about the >> iPhone or Snow Leopard" :)

Catching the delegate message in a subclass

2008-06-27 Thread Sveinbjorn Thordarson
Hello everyone, I'm implementing a subclass of NSTextField and I need to intercept a delegate message in the class before it is sent to the delegate. Is this possible, and if so, how? Many thanks, Sveinbjorn ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-27 Thread John Love
Graham, Yup, Nathan the double indirection of id * 1st, just the key snippet from FileController.m: @implementation FileController id mFileSheetDelegate; = Here's the complete interface and implementation files for just one SheetController, which has 2 buttons in its sheet window: // Sav

Re: NSString uppercaseString

2008-06-27 Thread Tito Ciuro
Uli, As Matt also points out, the documentation is not always crystal- clear, so I was simply trying to answer Sam's specific question. Since not all APIs behave the same way I added the link to the "Memory Management Programming Guide for Cocoa" page, hoping to help Sam. In any case, it w

Re: NSString uppercaseString

2008-06-27 Thread matt . gough
On 27 Jun 2008, at 3:30pm, Uli Kusterer wrote: If you read the documentation closely, you'll see that it would be perfectly valid to implement this method so the string goes away when the original (non-uppercase) string is released. Hmmm, not sure I'd read it that way (depending on what yo

Re: NSString uppercaseString

2008-06-27 Thread Uli Kusterer
Am 27.06.2008 um 15:15 schrieb Tito Ciuro: It's autoreleased. No, there's no guarantee that it's autoreleased. All that's guaranteed is that you do not own it. This still means there'll be no leak and you shouldn't call release on it, but assuming it' autoreleased would be assuming a lo

Re: NSString uppercaseString

2008-06-27 Thread Tito Ciuro
Hi Sam, It's autoreleased. Make sure you read this document, as it'll answer many of your questions: -- Tito On 27 Jun 2008, at 5:56 AM, Sam Mo wrote: Newbie here: I am looking at t

NSString uppercaseString

2008-06-27 Thread Sam Mo
Newbie here: I am looking at the documentation in Xcode for the method uppercaseString in NSString class but it does not mention how the return NSString is being released. Will the return NSString be released when the originator be released? Or I have to release the return NSString separately? O

Layer Backed Views and CoreAnimation neither animate nor stay in place

2008-06-27 Thread Chilton Webb
Hi, I am absolutely confused regarding something simple in layer backed view animation, and it's been haunting me for many months now. So I have constructed a sample project that illustrates the 3 problems I run into most frequently. I'm hoping someone will point to some place in the docs I've

Core data question in multiwindow doc app

2008-06-27 Thread Steven Hamilton
Easy one this I reckon (but not that easy or I wouldn't ask), I've converted my core data app to NSPersistentDocument and using a multi-nib model for my 3 windows. I have an account window using the IB wizard Master-Detail interface with bindings to add and manage Account entities. I also h

Re: initWithCoder in Nib object loading

2008-06-27 Thread Michael Watson
All view objects are sent -initWithCoder:, but the "custom view" object does something extra. After the custom view object is unarchived, it creates your view subclass, sends the

initWithCoder in Nib object loading

2008-06-27 Thread John Murphy
I notice that there are a couple different init methods used for nib loading. For instance, objects from the IB Library get an initWithCoder message, while custom view objects get an initWithFrame, and everything else gets an init. Why is this? Specifically, why a special initWithCoder technique

  1   2   >