Re: How to indent in NSOutlineView?

2008-07-10 Thread Aman Alam
The indentationMarkerFollowsCell is always reports one. I also try to indent disclosure button by setting setIndentationPerLevel in drawRow: rowIndex clipRect:clipRect method. It shows the button indented but the problem arises while clicking on it. It doesn't receive click properly. When we

Re: Making a text cell in a table editable

2008-07-10 Thread Vitaly Ovchinnikov
I replaced my code with this one: MyObject *p = [[MyObject alloc] init]; [arrayController addObject:p]; [p release]; [grid editColumn:0 row:[grid selectedRow] withEvent:nil selected:YES]; it works fine, NSTableView selects new row, -editColumn receives correct row number and starts editing. So,

Re: Setting the color label

2008-07-10 Thread Adam R. Maxwell
On Jul 9, 2008, at 10:07 PM, Chris Idou wrote: I came up with the code below to set the color label. Questions: 1) Is it really necessary to do a FSGetCatalogInfo first? I presume it is because otherwise the FSSetCatalogInfo wouldn't know what fields of catalogInfo.finderInfo it is

Re: Making a text cell in a table editable

2008-07-10 Thread Abizer Nasir
Try this. Run your application and create a sort on one of the columns (by clicking in the header). Now add your new items. Regardless of your sorting, the new items will appear at the end of the table view. Now. Add the call to rearrangeObjects: and when you add the new item. It will

How to animate a color in my custom layer draw code?

2008-07-10 Thread Rick Mann
I have code that draws the content of my layers. It's made up of various Quartz primitives. I'd like to animate aspects of these drawings, like the color of certain lines (for example). Is it possible to do this? It would require having a property that CA can change, and require that my

Re: Making a text cell in a table editable

2008-07-10 Thread Vitaly Ovchinnikov
I though about sorting, need to try that you wrote. Thank you. On Thu, Jul 10, 2008 at 12:08 PM, Abizer Nasir [EMAIL PROTECTED] wrote: Try this. Run your application and create a sort on one of the columns (by clicking in the header). Now add your new items. Regardless of your sorting, the

text hilighting

2008-07-10 Thread Giuseppe Cantavenera
Good morning, I wouold like to create a single word -hilighting or part of word hilighting effect in a text control so that it behaves like in safari when you use the cmd+f serarch feature. Is there any trick in cocoa to implement such a feature? Many thanks, Beppe

NSError and [NSTextStorage readFromURL:options:documentAttributes:error:]

2008-07-10 Thread Jesse Grosjean
My should open any kind of text file, so I accept wild-card file extensions. But if the user drops an image or some non text file onto my app then I want it to give a nice error response like TextEdit does. Text edit says: The document “test.zip” could not be opened. The file is not in

dataWithPDFInsideRect: ignores alpha of a shading?

2008-07-10 Thread Graham Cox
I've noticed that when generating PDF data from a view with - dataWithPDFInsideRect:, transparent flat colours work OK, but gradients (CGShading) that have some colours that are not 100% opaque are not recorded correctly (the alpha is ignored and the colours are always 100% opaque). Is

Re: NSError and [NSTextStorage readFromURL:options:documentAttributes:error:]

2008-07-10 Thread Graham Cox
On 10 Jul 2008, at 10:21 pm, Jesse Grosjean wrote: in a different format than you expect. I would hope that Leopard's grammar checker wouldn't allow through a sentence this badly written, but I suspect I'm being optimistic. :( G. ___

NSSavePanel bug with -setNameFieldLabel: workaround?

2008-07-10 Thread Graham Cox
Hmm, finding them thick and fast today... Using NSSavePanel's -setNameFieldLabel:, this method doesn't make more space available for a longer string (say by shifting the text field over or shortening it). That makes it really pretty useless for anything much (other than Save As:. If I want

Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Hi, I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I'm feeling totally at lost after having been reading up on Core Data for a couple of days by now. This is what I would like to do: 1) I

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Graham Cox
Sounds like you want to do archiving - it can handle all the object relationships you mention. Check out NSKeyedArchiver and the NSCoding protocol. http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/Concepts/archives.html hth, Graham On 10 Jul 2008, at 11:09 pm, Jules

Why can't I name a property `tag'?

2008-07-10 Thread an0
I have a NSString * property named `tag' in my class Foo, and use Foo instances to populate an NSOutlineView. In one delegate method of NSOutlineView, I pass the `tag' property of an item to a method as an NSString * argument as follows: - (void)outlineViewSelectionDidChange:(NSNotification

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
I ran into this a while back. Basically if the method names only differ by return type and there is nothing else to go on (like a concrete object pointer type) the compiler, without complaining, plumps for the first one it can find, which invariably is Cocoa's built-in methods and not

Re: Why can't I name a property `tag'?

2008-07-10 Thread an0
Thanks. But isn't it annoying for XCode to pretend to know something for sure while in fact it is just a wrong guess? At least the warning is very misleading. On Thu, Jul 10, 2008 at 9:31 PM, Graham Cox [EMAIL PROTECTED] wrote: I ran into this a while back. Basically if the method names only

NSEntityDescription random crash

2008-07-10 Thread Nicolas Lapomarda
Soon after the main nib has been loaded, I need to execute a fetch request. Now as the title says, the crash is random: sometimes the app executes just fine, sometimes it crashes. When it does crash, here is where it happens: [NSEntityDescription entityForName:anEntityName

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
On 10/07/2008, at 15.18, Graham Cox wrote: Sounds like you want to do archiving - it can handle all the object relationships you mention. Check out NSKeyedArchiver and the NSCoding protocol. http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/Concepts/archives.html

Re: NSEntityDescription random crash

2008-07-10 Thread I. Savant
Is NSEntityDescription acting crazy or am I? This is almost certainly a memory management error on your part, but it's impossible to say for sure because: 1 - You did not provide a code listing that demonstrates: a) where the pertinent objects are being declared/created*. b) the context

Any good advice for naming parameters of init methods?

2008-07-10 Thread an0
I've been always stumbling on the embarrassment of warning: local declaration of 'xxx' hides instance variable for my init methods, because I really can't figure out a nice naming pattern for parameters used to assign to instance properties, and I am always apt to write code like this: -

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jean-Daniel Dupas
Le 10 juil. 08 à 16:10, I. Savant a écrit : On Thu, Jul 10, 2008 at 9:49 AM, an0 [EMAIL PROTECTED] wrote: Thanks. But isn't it annoying for XCode to pretend to know something for sure while in fact it is just a wrong guess? At least the warning is very misleading. How is this XCode's

Re: Why can't I name a property `tag'?

2008-07-10 Thread I. Savant
Hey, that a newcomer spells Xcode XCode (instead of Xcode with a lowercase c) is not surprising, but that a guy that lies around for a long time and often gives good advice spell it wrong is not acceptable ;-) Touché, though I think it should be XCode, (if it's not written in camel notation,

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Steve Nicholson
On Jul 10, 2008, at 7:25 AM, an0 wrote: I've been always stumbling on the embarrassment of warning: local declaration of 'xxx' hides instance variable for my init methods, because I really can't figure out a nice naming pattern for parameters used to assign to instance properties, and I am

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Graham Cox
Bear in mind that the names you choose for these parameter variables are unimportant really, they don't affect the public interface of your class and don't even have to match the header. What I would suggest though is that you adopt a naming convention for your instance variables (ivars)

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
The return type is certainly part of NSMethodSignature - but as far as I can tell it's ignored for parsing the Obj-C source and resolving the method when compiling. Graham On 10 Jul 2008, at 11:39 pm, Steve Weller wrote: On Jul 10, 2008, at 6:31 AM, Graham Cox wrote: The return type is

Re: Why can't I name a property `tag'?

2008-07-10 Thread an0
We are Cocoa family. I am a RedCocoa, and my elder brother is a BlackCocoa. We both have a `pet', but our Dad doesn't. My pet is a Cat, while my elder brother's pet is a Dog. And of course he got his pet long before me, for he is 10 but I am only 2. So as a Cocoa, am I supposed to have a pet Dog

Re: Why can't I name a property `tag'?

2008-07-10 Thread I. Savant
On Thu, Jul 10, 2008 at 10:50 AM, an0 [EMAIL PROTECTED] wrote: We are Cocoa family. I am a RedCocoa, and my elder brother is a BlackCocoa. We both have a `pet', but our Dad doesn't. My pet is a Cat, while my elder brother's pet is a Dog. And of course he got his pet long before me, for he is

String Encoding problem with Unicode

2008-07-10 Thread Sandeep Nair
Sir, i want to convert a NSString to CString using Unicode Encoding. strcpy(cString, [nsString cStringUsingEncoding:NSUnicodeStringEncoding ]); (or) CFStringGetCString((CFStringRef)nsString], cString,1024, CFStringConvertNSStringEncodingToEncoding(NSUnicodeStringEncoding)); Here i am

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jean-Daniel Dupas
You don't say you my pet, you said one of my family member's pet I'm not wrong if I assume that it's your brother pet. Just tell the compiler it is your pet and not your brother's on and it will be happy (see the cast in the following line): filteredPosts = [[self filterPosts:postNodes

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread an0
I like the idea of adding prefix to my ivars, and in fact, all my C++ code use _ivars. However, I like the declared properties feature of Objective-C 2.0, and the good feeling will be impaired if I have to explicitly bind ivars to these declared properties like this: @synthesize url = iUrl, title

Re: String Encoding problem with Unicode

2008-07-10 Thread Alastair Houghton
AAARGH! This is a Cocoa question (and I thought I was replying to the Cocoa list too). Sandeep, please don't BCC mailing lists, and please post questions in *one* place---even if you're not sure, someone will tell you where to ask if it isn't right. (And apologies to the ObjC list for

Re: Receive notifications about frontmost application change

2008-07-10 Thread Matt Neuburg
On Wed, 09 Jul 2008 17:47:23 -0400, Bill Cheeseman [EMAIL PROTECTED] said: In Leopard, you can make your application process trusted by the accessibility API (requires user authentication), using the AXMakeProcessTrusted function. Then you don't need to ask your users to enable global access for

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:09 AM, an0 wrote: I like the idea of adding prefix to my ivars, and in fact, all my C++ code use _ivars. Good! I highly recommend that in Obj-C too. (I use _ like you.) However, I like the declared properties feature of Objective-C 2.0, and the good feeling will be

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread I. Savant
I'd probably use inTags I'll add my vote for this. I've seen it used many places. With respect, though, I think the OP may be a bit confused about the concept of 'scope': Am I supposed to use something like aGroupOfTags instead of just tags? This is why I suspect a conceptual problem. --

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
At some point you have to realise that it's a compiler, a very dumb finite state machine. It can't intelligently recognise every possible nuance of your code. I agree it's not good behaviour - in my case it caused a bug that corrupted memory that crashed the program in a completely

Re: Receive notifications about frontmost application change

2008-07-10 Thread matt . gough
On 10 Jul 2008, at 5:16pm, Matt Neuburg wrote: Copy and paste is pretty easy: http://www.cocoabuilder.com/archive/message/cocoa/2006/2/4/156003 EventHandlerUPP handlerUPP = NewEventHandlerUPP(appSwitched); InstallApplicationEventHandler (handlerUPP, 1, eventType, self, NULL);

Drawing issues in custom view

2008-07-10 Thread Jason Wiggins
Hi everyone, I have a Custom View in IB with an rounded NSTokenField (Focus ring set to none) and a rounded rect NSButton embedded in it. In XCode I have the Custom View class set to my subclass of NSView, with the following code: - (void)drawRect:(NSRect)rect { NSGradient

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:19 AM, an0 wrote: However, if you don't know what exact type of Cocoa I am, how could you call me BlackCocoa so surely? Can we stop using confusing metaphors and just talk about OOP? :-p When the compiler parses a message-send expression ([]) it tries to figure out

Re: Why can't I name a property `tag'?

2008-07-10 Thread an0
I am with you. We should coldly face the somewhat cold reality. On Thu, Jul 10, 2008 at 11:26 PM, Graham Cox [EMAIL PROTECTED] wrote: At some point you have to realise that it's a compiler, a very dumb finite state machine. It can't intelligently recognise every possible nuance of your code. I

Printing a Webview

2008-07-10 Thread Western Botanicals
I am trying to print a whole page in a webview, but it is only printing the portion that I can see in the window (there is more if I scroll down), how can I print the whole thing. I think the problem may be that the page setup is not the right size. What can I do? Thank you Justin

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
Actually it doesn't emit a warning. If you recall my problem a few weeks ago with: - (float) position; vs. - (int) position; the compiler sailed blithely on without a mention, generating code that smashed the stack to pieces. This is different from the situation that does emit a warning,

Re: Why can't I name a property `tag'?

2008-07-10 Thread Johan Kool
filteredPosts = [[self filterPosts:postNodes WithTag:[[tagView itemAtRow:row] tag]] retain]; You don't tell the compiler what is returned by -(id)itemAtRow: so the compiler doesn't know wether to expect you or your brother. You should tell it whom to expect and it won't complain

Re: NSEntityDescription random crash

2008-07-10 Thread Shawn Erickson
On Thu, Jul 10, 2008 at 6:56 AM, Nicolas Lapomarda [EMAIL PROTECTED] wrote: The error I'm getting is random as well, but always takes the form *** -[NSCFString _entityForName]: unrecognized selector sent to instance xxx. You likely are not retaining an object that you expect to stay

Re: Why can't I name a property `tag'?

2008-07-10 Thread an0
Sure. I'm grateful that you tell me the internal truth instead of confusing me even more by just saying it is my responsibility to tell compiler more. But if different return types cause different native code, how could my program still work with the mistaken type(an NSString * returned from the

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
Probably because at the machine code level, it's just a value placed into a register. You get away with it because an object address is 32 bits wide and so is an integer, and both types are passed in the same register. G. On 11 Jul 2008, at 1:55 am, an0 wrote: But if different return

Design Question: Where to observe using KVO?

2008-07-10 Thread Patrick Mau
Hallo everyone I would appreciate if someone wants to comment on my conceptual design question: I have developed a custom NSView displaying a pie chart. The data is an NSMutableArray containing NSMutableDictionary instances for the pie segments (a standard NSArrayController instance). Each

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:52 AM, Sean McBride wrote: On 7/11/08 12:38 AM, Graham Cox said: What I would suggest though is that you adopt a naming convention for your instance variables (ivars) that consistently flag them as such. Some people use a leading underscore, but Apple say not to do that.

Re: NSSavePanel bug with -setNameFieldLabel: workaround?

2008-07-10 Thread Corbin Dunn
Can you please log a bug for this? thank you, corbin On Jul 10, 2008, at 6:08 AM, Graham Cox wrote: Hmm, finding them thick and fast today... Using NSSavePanel's -setNameFieldLabel:, this method doesn't make more space available for a longer string (say by shifting the text field over or

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:55 AM, an0 wrote: But if different return types cause different native code, how could my program still work with the mistaken type(an NSString * returned from the inner message is treated as an NSInteger at the first place, then is passed as an NSString * to the outer

Re: garbage collection and NSConnection

2008-07-10 Thread Marcel Weiher
Some minor factual corrections: On Jul 2, 2008, at 18:33 , Michael Ash wrote: In Cocoa you do lots of retaining and releasing. These operations aren't free. They involve a lookup into a global hash table and some sort of atomic increment/decrement operation. The hash table is only used by

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jean-Daniel Dupas
Le 10 juil. 08 à 17:52, Graham Cox a écrit : Actually it doesn't emit a warning. If you recall my problem a few weeks ago with: - (float) position; vs. - (int) position; the compiler sailed blithely on without a mention, generating code that smashed the stack to pieces. This is

Problem copying pdfImageRep to bitmapRep.

2008-07-10 Thread Graham Cox
OK, it's very late (2.18 am) and I'm almost cross-eyed with fatigue.. but I just can't see what I'm doing wrong here. I want to render pdf data into a bitmap as part of an export conversion. My pdf data is good (I can save it as a pdf file and that comes up OK). My bitmap is good, but it's

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
Well, that's the weird thing. I wasn't getting that warning. I was including both headers, my own usage explicitly using #import, and all of Cocoa implictly using the precompiled headers. I wonder if that's how the compiler fails to notice the ambiguity - because of one being in a

Re: Drawing issues in custom view

2008-07-10 Thread Jason Wiggins
Not to worry, just realised what is happening. drawRect: gets called for ALL drawing operations in the view, not just background as I expected. Carry on... Regards, Jason On 11/07/2008, at 1:38 AM, Jason Wiggins wrote: Hi everyone, I have a Custom View in IB with an rounded

Re: Printing a Webview

2008-07-10 Thread Frédéric Testuz
Hello, If your have : WebView *myView; Don't print myView, but print [[[myView mainFrame] frameView] documentView]. Consider WebView and frameView like NSScrolView. You don't want to print the scroll view but its content. Frédéric Testuz Le 10 juil. 08 à 17:44, Western Botanicals a

Re: Why can't I name a property `tag'?

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 9:49 AM, an0 [EMAIL PROTECTED] wrote: Thanks. But isn't it annoying for XCode to pretend to know something for sure while in fact it is just a wrong guess? At least the warning is very misleading. The warning isn't misleading at all. Xcode is not pretending anything. It

Re: garbage collection and NSConnection

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 12:17 PM, Marcel Weiher [EMAIL PROTECTED] wrote: Some minor factual corrections: On Jul 2, 2008, at 18:33 , Michael Ash wrote: In Cocoa you do lots of retaining and releasing. These operations aren't free. They involve a lookup into a global hash table and some sort

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jean-Daniel Dupas
That's odd. I did some test. It does not require any warning flags, but for an undefined reason, gcc does not considere that int and float are incompatibles. if you have int and short, int and double, int and long long, int and NSSize, int and , it logs a warning, but int and float is

Re: NSTableView prematurely posts selection changed notification

2008-07-10 Thread Joan Lluch (casa)
El 10/07/2008, a las 5:21, Graham Cox escribió: When my app starts up, it opens a floating window containing a table view. As the table is brought to life from the Nib, it posts a selection changed notification to its delegate. At that time it hasn't had its data initialised from the

XCode3 for Persistent Data on Tiger

2008-07-10 Thread John Velman
I'm new to Mac, Objective C and XCode, but comfortable what I've seen seen and tried so far. I am confident I could complete my project except for the question of developing on Leopard, running on Tiger. I want to develop an app with persistent data on my intel iMac running Leopard that will run

Intercepting Apple Events

2008-07-10 Thread Elan Feingold
Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? Many thanks, -elan ___ Cocoa-dev mailing list

Re: Why can't I name a property `tag'?

2008-07-10 Thread Joan Lluch (casa)
Joan Lluch El 10/07/2008, a las 18:29, Graham Cox escribió: Well, that's the weird thing. I wasn't getting that warning. I was including both headers, my own usage explicitly using #import, and all of Cocoa implictly using the precompiled headers. I wonder if that's how the compiler

Re: Why can't I name a property `tag'?

2008-07-10 Thread Bill Bumgarner
On Jul 10, 2008, at 8:55 AM, an0 wrote: Sure. I'm grateful that you tell me the internal truth instead of confusing me even more by just saying it is my responsibility to tell compiler more. But if different return types cause different native code, how could my program still work with the

Re: Why can't I name a property `tag'?

2008-07-10 Thread Brian Stern
On Jul 10, 2008, at 12:44 PM, Michael Ash wrote: On Thu, Jul 10, 2008 at 9:49 AM, an0 [EMAIL PROTECTED] wrote: Thanks. But isn't it annoying for XCode to pretend to know something for sure while in fact it is just a wrong guess? At least the warning is very misleading. The warning isn't

I cannot add a (system) framework to a Cocoa Application

2008-07-10 Thread Anders Sommer Lassen
Hi, I have problem adding frameworks to standard Cocoa Application projects. When I add a framwork the header files are not included. That is, there is no header folder beneath the framework icon. This is very odd, because when I read documentation and search on the internet, I can see

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread glenn andreas
On Jul 10, 2008, at 11:06 AM, Jens Alfke wrote: On 10 Jul '08, at 8:52 AM, Sean McBride wrote: On 7/11/08 12:38 AM, Graham Cox said: What I would suggest though is that you adopt a naming convention for your instance variables (ivars) that consistently flag them as such. Some people use

the 11th can't come soon enough :-)

2008-07-10 Thread John Zorko
... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Regards, John Falling You - exploring the beauty of voice and sound http://www.fallingyou.com

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Hi Graham, On 10/07/2008, at 15.18, Graham Cox wrote: Sounds like you want to do archiving - it can handle all the object relationships you mention. Check out NSKeyedArchiver and the NSCoding protocol.

Dynamic Tooltips

2008-07-10 Thread jeffs87
Hi, I have a slider and while dragging I want to have a tooltip show the current value of the slider and have the tooltip follow the mouse position. GarageBand does this for volume and pan. I've looked around and it doesn't look like you can do it in Cocoa. In Carbon you can do it with

Re: dataWithPDFInsideRect: ignores alpha of a shading?

2008-07-10 Thread David Duncan
On Jul 10, 2008, at 5:47 AM, Graham Cox wrote: I've noticed that when generating PDF data from a view with - dataWithPDFInsideRect:, transparent flat colours work OK, but gradients (CGShading) that have some colours that are not 100% opaque are not recorded correctly (the alpha is ignored

[OT] Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Jeff Johnson
If you have a property value in your subclass (using the term 'property' loosely, not in the Objective-C 2.0 sense), and Apple adds the property value to the superclass, you're probably going to be hosed in one way or another. For example, if Apple adds the _value ivar, they're also likely

Re: the 11th can't come soon enough :-)

2008-07-10 Thread Ricky Sharp
... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Please wait until an official communication comes from Apple. The NDA may still be in place even after the 11th.

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Ricky Sharp
On Jul 10, 2008, at 11:19 AM, glenn andreas wrote: The problem is that while when you recompile you'll see the conflict, for existing users (who won't be compiling from source), if they use KVC they'll have the problem. @interface NSFoo { id _reserved; } @end @interface MyFoo:

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Hi again, On 10/07/2008, at 20.29, Jules Colding wrote: On 10/07/2008, at 15.18, Graham Cox wrote: Sounds like you want to do archiving - it can handle all the object relationships you mention. Check out NSKeyedArchiver and the NSCoding protocol.

Re: Why can't I name a property `tag'?

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 11:52 AM, Graham Cox [EMAIL PROTECTED] wrote: Actually it doesn't emit a warning. If you recall my problem a few weeks ago with: - (float) position; vs. - (int) position; the compiler sailed blithely on without a mention, generating code that smashed the stack

Re: Why can't I name a property `tag'?

2008-07-10 Thread Randall Meadows
On Jul 10, 2008, at 1:29 PM, Michael Ash wrote: Some experimentation reveals that the compiler is merely extremely inconsistent about when it warns. For example, int and void warns, float and void warns, but float and int does not. Double and int warns, double and float warns, but int and id

Re: Why can't I name a property `tag'?

2008-07-10 Thread Steve Bird
On Jul 10, 2008, at 3:29 PM, Michael Ash wrote: On Thu, Jul 10, 2008 at 11:52 AM, Graham Cox [EMAIL PROTECTED] wrote: Actually it doesn't emit a warning. If you recall my problem a few weeks ago with: - (float) position; vs. - (int) position; the compiler sailed blithely on without a

delegation strategy

2008-07-10 Thread Wesley Smith
Hi list, I'm trying to provide a particular windowing interface that combines NSWindow and NSPanel. For the most part I'm using a custom subclass of NSWindow that adds a decent amount of functionality. Occasionally, I want to make use of NSPanel (for the NSUtilityWindowMask style flag) and I'd

Re: the 11th can't come soon enough :-)

2008-07-10 Thread Scott Anguish
On Jul 10, 2008, at 2:26 PM, John Zorko wrote: ... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Please do not assume that the iPhone SDK will be something

Re: Why can't I name a property `tag'?

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 3:29 PM, Michael Ash [EMAIL PROTECTED] wrote: I recommend you file a bug with Apple. And to put my money where my mouth is, I've filed this bug as rdar://6066914 Anyone who's interested in playing with this further may find this python program useful: #!/usr/bin/python

Re: Why can't I name a property `tag'?

2008-07-10 Thread Uli Kusterer
On 10.07.2008, at 21:29, Michael Ash wrote: I can't find any particular pattern to it, but it's clear that it's a bug, not a deliberate omission. I recommend you file a bug with Apple. Your warnings kinda remind me of type promotion. Ints get promoted to floats, etc. Cheers, -- Uli

Re: Design Question: Where to observe using KVO?

2008-07-10 Thread I. Savant
Where would you observe changes to data? I think you should worry about one thing at a time (ie, leave the animation part for another day and concentrate on your bindings machinery first). Check out this page: http://homepage.mac.com/mmalc/CocoaExamples/controllers.html Great examples of

Re: Design Question: Where to observe using KVO?

2008-07-10 Thread I. Savant
Check out this page: http://homepage.mac.com/mmalc/CocoaExamples/controllers.html I should also mention that you should approach these examples like this: 1 - Read the Cocoa Bindings documentation (including all the Key Value Coding / Key Value Observing related documentation). 2 - Examine

Re: Problem copying pdfImageRep to bitmapRep.

2008-07-10 Thread Heinrich Giesen
On 10.07.2008, at 20:19, Graham Cox wrote: I want to render pdf data into a bitmap as part of an export conversion. My pdf data is good (I can save it as a pdf file and that comes up OK). My bitmap is good, but it's blank. follows the code . If I understand the code and what you

Re: Dynamic Tooltips

2008-07-10 Thread Todd Ransom
Jeff, You can do this but you will need to implement the tooltips yourself using tracking rects (or maybe you can just do it in mouseDown:, I have only done it for cell-based custom views, not sliders) and a custom window class for the tooltips. A tooltip window implementation to start

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 10:19 AM, John Velman wrote: If I set the SCM options properly, and use XCode3, following steps as outlined in the NSPersistentDocument CoreDataUtilityTutorial (but setting the SCM options for 10.4), am I going to get there? If you mean SDK, not SCM, then the answer is

KVO: Observing an aggregate property of a collection?

2008-07-10 Thread Jens Alfke
How do I set up key-value observing of an aggregate property over an array, like a sum? Say I have a Bulb class with a boolean lit property. I have an NSArrayController with an array of Bulbs, being shown in a table view. To compute the number of lit bulbs I can do: - (unsigned)

Re: the 11th can't come soon enough :-)

2008-07-10 Thread Jeff Johnson
On Jul 10, 2008, at 2:50 PM, Scott Anguish wrote: On Jul 10, 2008, at 2:26 PM, John Zorko wrote: ... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Please do

Re: Mini Popup Window (Like iCal)

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

Re: Intercepting Apple Events

2008-07-10 Thread Michael Hall
On Jul 10, 2008, at 12:24 PM, Elan Feingold wrote: Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? I just remembered this one from the

NSOutlineView hiding a column while editing a row in another column

2008-07-10 Thread Joan Lluch (casa)
I have a NSOutlineView which I want to make several columns hidden in response to a user action. I have set up the outlineColumn to resize with table and the rest have fixed size, so that when one or more columns are hidden, the outlineColumn widens accordingly. In normal conditions

Re: Drawing issues in custom view

2008-07-10 Thread I. Savant
Not to worry, just realised what is happening. drawRect: gets called for ALL drawing operations in the view, not just background as I expected. More specifically, -drawRect: gets called (by the system) for the rect (of your view) that needs redrawn. It's up to you to 'do the right

Re: Intercepting Apple Events

2008-07-10 Thread Michael Hall
On Jul 10, 2008, at 12:24 PM, Elan Feingold wrote: Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? A very limited way might be with the debug

Re: Why can't I name a property `tag'?

2008-07-10 Thread Matt Burnett
But most of the time compound statements makes code easier to read. Why do you think apple included valueForKeyPath instead of only valueForKey? On Jul 10, 2008, at 10:26 AM, Graham Cox wrote: There's no real performance advantage to huge compound statements, and they definitely make code

Re: Best way to handle background i/o and notify main UI thread

2008-07-10 Thread Chris Irvine
On Jul 1, 2008, at 4:27 PM, Jean-Daniel Dupas wrote: Le 2 juil. 08 à 01:24, Chris Irvine a écrit : On Jul 1, 2008, at 3:17 PM, Douglas Davidson wrote: On Jul 1, 2008, at 3:11 PM, Chris Irvine wrote: I've been doing a lot of reading about this, but I still don't feel like I have a

Re: garbage collection and NSConnection

2008-07-10 Thread Marcel Weiher
On Jul 10, 2008, at 9:50 , Michael Ash wrote: On Thu, Jul 10, 2008 at 12:17 PM, Marcel Weiher [EMAIL PROTECTED] wrote: [hash tables not generally used + internal refcounts] Atomic updates are still a pretty big hit on a multiprocessor system (all of them, these days), Yes, they're

Re: KVO: Observing an aggregate property of a collection?

2008-07-10 Thread Chris Suter
On 11/07/2008, at 7:46 AM, Jens Alfke wrote: How do I set up key-value observing of an aggregate property over an array, like a sum? Say I have a Bulb class with a boolean lit property. I have an NSArrayController with an array of Bulbs, being shown in a table view. To compute the

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread John Velman
Thanks, Jens. I see that by selecting the SCM Menu item, and under that, Configure SCM for this project I find that I've actually set the SDK to 10.4 and the architectures to ppc and i386. Probably couldn't have found this without your info. Thanks, John V. On Thu, Jul 10, 2008 at 01:54:22PM

Re: Why can't I name a property `tag'?

2008-07-10 Thread Bill Bumgarner
On Jul 10, 2008, at 4:25 PM, Matt Burnett wrote: But most of the time compound statements makes code easier to read. Why do you think apple included valueForKeyPath instead of only valueForKey? The two are completely unrelated. Key-Value Coding has all kinds of behaviors and heuristics

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 3:46 PM, John Velman wrote: Thanks, Jens. I see that by selecting the SCM Menu item, and under that, Configure SCM for this project I find that I've actually set the SDK to 10.4 and the architectures to ppc and i386. Oh I see, that's why you were referring to SCM! That

  1   2   >