Re: Basic Core Animation question

2008-04-12 Thread Michael Watson
I've spoken too soon, I'm afraid. Quartz.h also imports QuartzCore.h, and as such what I said isn't entirely accurate. You'll still import the header for QuartzCore, so that's not your problem. Have you verified in your project target that the QuartzCore framework is listed in the "Link Bin

Re: Basic Core Animation question

2008-04-12 Thread Michael Watson
I noticed: //GameBoard.h* #import #import You've added QuartzCore.framework, but Quartz.h isn't the top-level header for QuartzCore. You're importing a header in a framework you aren't linking to. Either link to Quartz.framework and import ,

Re: Basic Core Animation question

2008-04-12 Thread Greg Sabo
Hmm, I just added it, and I still get the same linking error. Any other ideas? I could probably use an example project which successfully uses CALayers, too. I can't find any on the net that are helpful. On Sat, Apr 12, 2008 at 7:36 PM, Michael Vannorsdel <[EMAIL PROTECTED]> wrote: > Did you pu

Re: NSURL with query string

2008-04-12 Thread Scott Anguish
On Apr 12, 2008, at 3:24 PM, C Sandeep wrote: Greetings, For my application, I need to form a NSURL, which looks something like this: http://www.google.com/search?hl=en&q=test I have the following code: NSURL *url = [NSURL URLWithString: baseUrl]; //where baseUrl is http://www.google.com/sea

[Moderator] Re: Override AppleScrollBarVariant on NSScroller?

2008-04-12 Thread Scott Anguish
I think this has run its course. Time to take it to private email. Ultimately, Michael is accurately describing the dynamic that the list has. When a responder makes additional comments after simply answering a question, they are typically just trying to help and understand what the purpos

Re: KVO strangeness under 10.5

2008-04-12 Thread Charles Steinman
--- Sean Todd <[EMAIL PROTECTED]> wrote: > I have no idea what sort of object 0x6503f00 is or > how/when it was > registered. Looking at the address in memory did not > give me any > clues. The one interesting bit of info is that the > address listed with > its Context is the same as the fir

Re: Transparent view click-through -- NOT SOLVED

2008-04-12 Thread Greg Hoover
Actually, no. It prevents the view from being transparent at all -- which I'll settle for at the moment. I'd really like it to be transparent and receive clicks but I'm not sure how to do that and my attempts thus far haven't worked. On Apr 12, 2008, at 3:00 PM, Ron Fleckner wrote: So, d

Re: Convert NSArray to NSString

2008-04-12 Thread Ben Lachman
I assume you mean selectedRanges, which returns an NSArray of ranges. This array contains NSValue objects that represent ranges of selected text, not actually the text that is selected. To get the text that is selected you have to do a bit more work. First you need to the get string of t

Re: Highlight color of a NSTableView row

2008-04-12 Thread Ben Lachman
Sorry, perhaps I should have been a bit more specific. That implementation both overrides highlightColorWithFrame: and drawWithFrame:. As you noticed, the draw with draw bit just just draws the text white if the cell is selected. This is nice for dark selection highlight colors and most

Re: KVO strangeness under 10.5

2008-04-12 Thread Jim Correia
On Apr 12, 2008, at 8:14 PM, Sean Todd wrote: Unfortunately, that doesn't work: grade, Options: Context: 0x1957c0, Property: 0x18edf0> ) (gdb) po 0x6500210 Program received signal EXC_BAD_ACCESS, Could not access memory. Consider setting NSZombieEnabled=YES, NSDeallocateZombies=NO then

Re: struct problem

2008-04-12 Thread Ben Lachman
On Apr 12, 2008, at 8:03 AM, Dean Ritchie wrote: On Apr 12, 2008, at 1:37 AM, Hamish Allan wrote: On Sat, Apr 12, 2008 at 2:58 AM, Dean Ritchie <[EMAIL PROTECTED]> wrote: columnCount = [[LASize cellAtIndex:0] intValue]; rowCount = [[LASize cellAtIndex:1] intValue]; When I

Re: HUD-style panel controls?

2008-04-12 Thread Jacob
Done. #5860547. On Sat, Apr 12, 2008 at 7:21 PM, Michael Watson <[EMAIL PROTECTED]> wrote: > You aren't missing anything. Apple gave us an official HUD panel and UI > guidelines surrounding it, and failed to provide any HUD-style controls to > go with it. If the idea is to give us something standa

Re: addObjectsToArray: behaving badly - why?

2008-04-12 Thread Hank Heijink (Mailinglists)
Are you sure self.dependencies isn't returning nil? That'd explain it. Hank On Apr 12, 2008, at 10:42 PM, K. Darcy Otto wrote: My code used to look like this: NSMutableArray *newDependencies = [self.dependencies mutableCopy]; [newDependencies addObjectsFromArray:[aDependency de

addObjectsToArray: behaving badly - why?

2008-04-12 Thread K. Darcy Otto
My code used to look like this: NSMutableArray *newDependencies = [self.dependencies mutableCopy]; [newDependencies addObjectsFromArray:[aDependency dependencies]]; Now self.dependencies and [aDependency dependencies] both return NSArrays. The code works very well provided th

Re: HUD-style panel controls?

2008-04-12 Thread Michael Watson
You aren't missing anything. Apple gave us an official HUD panel and UI guidelines surrounding it, and failed to provide any HUD-style controls to go with it. If the idea is to give us something standard, so everyone's not rolling slightly different HUD panels, we should have at least /some

HUD-style panel controls?

2008-04-12 Thread Jacob Bandes-Storch
I'm adding a HUD panel to my application. Looking around, I don't see a way to get the proper style of controls easily. The Human Interface Guidelines say that HUD controls should be "white with gray accents and use white or gray text." And yet I don't see a way to get these controls (gray

Re: Convert NSArray to NSString

2008-04-12 Thread Michael Vannorsdel
The textStorage of the NSTextView is actually an NSMutableAttributedString subclass so you can treat it as such and get the text and attributes from it. On Apr 12, 2008, at 6:48 PM, Lincoln Green wrote: I am trying to store the selected text in an NSTextView in an NSString/NSMutableStrin

Re: Highlight color of a NSTableView row

2008-04-12 Thread Eric Gorr
If anyone is interested, with a bit more playing around and putting various pieces of comments together, I was able to get the highlighting behavior I wanted. On Apr 12, 2008, at 1:23 PM, Eric Gorr wrote: At this point, actually seeing my specific case might be helpful... I have placed my p

Re: KVO strangeness under 10.5

2008-04-12 Thread Mark Piccirelli
Yikes, that's not good. I'd try running with NSZombieEnable = YES to see if that turns up anything. That should also set NSDeallocateZombies = NO, which might make gdb po work. -- Mark On Apr 12, 2008, at 5:14 PM, Sean Todd wrote: Unfortunately, that doesn't

Convert NSArray to NSString

2008-04-12 Thread Lincoln Green
I am trying to store the selected text in an NSTextView in an NSString/ NSMutableString. I have found the selectedRange method, but can't figure out how to turn the NSArray into an NSString. Any help would be greatly appreciated. Thanks! - LG ___

Re: Basic Core Animation question

2008-04-12 Thread Michael Vannorsdel
Did you put the QuartzCore framework in your project Frameworks? The linker needs to know about QuartzCore before it can find the CALayer class symbols. On Apr 12, 2008, at 5:58 PM, Greg Sabo wrote: I'm a Compsci student trying to learn Cocoa development, and I'm trying to write a simple

Re: KVO strangeness under 10.5

2008-04-12 Thread Sean Todd
Unfortunately, that doesn't work: Options: Context: 0x1957c0, Property: 0x18edf0> ) (gdb) po 0x6500210 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xc007391b 0xfffeff18 in objc_msgSend_rtp () The program being debugged was signale

Basic Core Animation question

2008-04-12 Thread Greg Sabo
Hello, I'm a Compsci student trying to learn Cocoa development, and I'm trying to write a simple program using Core Animation, but I'm having a hard time getting it to work. I just need someone to tell me what I'm doing wrong so I can move on and screw up something else :) Thanks, and I apologize

Re: KVO strangeness under 10.5

2008-04-12 Thread Mark Piccirelli
You can copy-and-paste to find out what the surprising observers are, as in: (gdb) po 0x19e5a0 -- Mark On Apr 12, 2008, at 2:59 PM, Sean Todd wrote: I have a Cocoa document app that uses bindings. After installing 10.5 and Xcode 3.0, I started seeing console

Re: Transparent view click-through -- SOLVED

2008-04-12 Thread Ron Fleckner
So, do you mean that overriding -isOpaque and returning YES allows you to have a transparent view which still catches mouse clicks? Ron On 13/04/2008, at 3:10 AM, Greg Hoover wrote: I hadn't implemented the isOpaque method on my custom views. This did the trick, at least for my situation.

KVO strangeness under 10.5

2008-04-12 Thread Sean Todd
I have a Cocoa document app that uses bindings. After installing 10.5 and Xcode 3.0, I started seeing console output stating that objects were being deallocated while observers are still registered with them. After some investigation, I found that the objects being deallocated had an extra

Re: NSURLConnection doesn't post

2008-04-12 Thread Matt Burnett
It depends what you mean by 'running'. You could always use "runMode:beforeDate" instead of "run" to do things in the thread while the loop is running. On Apr 11, 2008, at 10:32 PM, David Wilson wrote: you can't have a run loop magically running in your thread while you're doing other thing

Re: NSURL with query string

2008-04-12 Thread Jerry Krinock
On 2008 Apr, 12, at 12:24, C Sandeep wrote: However Im not able to find a optimized way to append the query strings "hl" and "q". Any help is apprecaited. Thanks. I've done this many times, by simply combining the query into what you call your baseURL using -[NSString stringWithFormat:]. I

Re: Method Explanation

2008-04-12 Thread Daniel Staal
--As of April 11, 2008 5:31:08 PM -0700, Kevin Ferguson is alleged to have said: Now, I'm entirely self-taught in Cocoa, so this may be something more obvious than I think. Is there a reason for this occurrence? I assume it's got something to do with the +, but not knowing what the + means, or

NSURL with query string

2008-04-12 Thread C Sandeep
Greetings, For my application, I need to form a NSURL, which looks something like this: http://www.google.com/search?hl=en&q=test I have the following code: NSURL *url = [NSURL URLWithString: baseUrl]; //where baseUrl is http://www.google.com/search However Im not able to find a optimized wa

Re: Building a custom Data Detector

2008-04-12 Thread Errol Sayre
On Apr 11, 2008, at 3:09 PM, Bill Cheeseman wrote: Doesn't this have something to do with Leopard's LatentSemanticMapping framework? This was a private framework until Leopard. Apple now hosts a mailing list for it at . Not tha

Re: Highlight color of a NSTableView row

2008-04-12 Thread Eric Gorr
On Apr 12, 2008, at 11:26 AM, Eric Gorr wrote: On Apr 11, 2008, at 11:42 AM, Corbin Dunn wrote: On Apr 10, 2008, at 5:41 PM, Eric Gorr wrote: On Apr 10, 2008, at 8:28 PM, Corbin Dunn wrote: If you're targeting Leopard, there is an NSTableView method you can override for this (a public on

Re: NSMailDelivery Deprecated

2008-04-12 Thread Robert Cerny
Hello Seth, check this link HTH Robert On 12.4.2008, at 19:35, Seth Willits wrote: Howdy, I'm writing an internal tool, and NSMailDelivery looked to fit the bill to automatically send emails behind the scenes, but it was deprecated

NSMailDelivery Deprecated

2008-04-12 Thread Seth Willits
Howdy, I'm writing an internal tool, and NSMailDelivery looked to fit the bill to automatically send emails behind the scenes, but it was deprecated in 10.5. Is there a replacement at all for it? All I need is a way to send emails from an smtp server. Thanks, -- Seth Willits __

Re: Highlight color of a NSTableView row

2008-04-12 Thread Eric Gorr
On Apr 11, 2008, at 12:21 AM, Ben Lachman wrote: I do something like this: @implementation HilightingTextFieldCell - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { if( [self isHighlighted] ) { NSColor *oldColor = [self textColor];

Re: Transparent view click-through -- SOLVED

2008-04-12 Thread Greg Hoover
I hadn't implemented the isOpaque method on my custom views. This did the trick, at least for my situation. Thanks. On Apr 12, 2008, at 1:19 AM, Ron Fleckner wrote: On 12/04/2008, at 9:54 AM, Greg Hoover wrote: Is there a way to prevent click through on a transparent view? Greg Not rea

Re: NSApplicationMain arguments [SOLVED]

2008-04-12 Thread slasktrattenator
Oh, right. I didn't think of that. Thanks for the correction and clarification. F. On Sat, Apr 12, 2008 at 6:46 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > > You're grabbing all defaults from all domains with the above, and promoting > them all into the NSArgumentDomain below, changing their p

Re: Override AppleScrollBarVariant on NSScroller?

2008-04-12 Thread slasktrattenator
I do want your answers, asked for them politely and got a most helpful one almost immediately from Mike Abdullah, whom I respectfully thanked for his help. What I don't want is people jumping to conclusions, calling me names and telling me I'm "breaking consistency in a very severe manner" when my

Re: Efficient object wrappers and GC

2008-04-12 Thread Quincey Morris
On Apr 12, 2008, at 08:36, Alastair Houghton wrote: or even -(void)discard; Anyone have any preferences? I quite like -discard. "discard" sounds so ... cruel. :) "surrender"? "derez"? (j/k) How about "unleash"? That also contains a verb which could be used to describe the overall tec

Re: NSApplicationMain arguments [SOLVED]

2008-04-12 Thread Ken Thomases
On Apr 12, 2008, at 8:13 AM, [EMAIL PROTECTED] wrote: Thanks Ken! You're welcome. int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSMutableDictionary* myValues = [NSMutableDictionary dictionaryWithCapacity:1]; [myValues setDic

Re: Override AppleScrollBarVariant on NSScroller?

2008-04-12 Thread Michael Watson
On 12 Apr, 2008, at 06:33, [EMAIL PROTECTED] wrote: Guys, you are way off-topic, and you are offending me. Of course I have good reasons for wanting to do this. Trust me, I'm not tampering with user defaults for the sheer fun of it. If you can't provide me with an answer to my question, please sp

Re: Core Data and the Document Dirty indicator

2008-04-12 Thread Gary L. Wade
>Exactly what I needed! Thank you, that has fixed my problem. > >I wish the Conceptual documents could be made available in a book :) > >Jonathan > I've requested that Apple provide a print-on-demand link with each document on their web site. The way I suggested it was to have a shopping cart ic

Re: Efficient object wrappers and GC

2008-04-12 Thread Alastair Houghton
On 11 Apr 2008, at 18:27, Quincey Morris wrote: On Apr 11, 2008, at 09:51, Alastair Houghton wrote: It doesn't, but you might conceivably have methods that take an NSEnumerator and do something with the objects it returns. Hence the utility of "nextObject". Ah, I see - simultaneous cake-

Re: Highlight color of a NSTableView row

2008-04-12 Thread Eric Gorr
On Apr 11, 2008, at 11:42 AM, Corbin Dunn wrote: On Apr 10, 2008, at 5:41 PM, Eric Gorr wrote: On Apr 10, 2008, at 8:28 PM, Corbin Dunn wrote: If you're targeting Leopard, there is an NSTableView method you can override for this (a public one!) -(void)highlightSelectionInClipRect:(NSRect

Re: Get file type/creator

2008-04-12 Thread I. Savant
How would I get a file 4 charter type/creator from a file. This is a FAQ. Please search the list archives. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contac

Get file type/creator

2008-04-12 Thread Mr. Gecko
How would I get a file 4 charter type/creator from a file. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/U

Re: Accessing Directory.app shared contacts

2008-04-12 Thread Tito Ciuro
Hi Kyle, On 11 Apr 2008, at 4:50 PM, Kyle Sluder wrote: Hey all, Is there a way to get at the contacts available in Directory.app? The disjunction between Directory.app and Address Book.app is infuriating, to say the least. I really want to develop a quick-and-dirty in house contact manageme

Re: Override AppleScrollBarVariant on NSScroller? [SOLVED]

2008-04-12 Thread slasktrattenator
Problem solved. Anyone looking for the solution can find it in this thread: http://lists.apple.com/archives/cocoa-dev/2008/Apr/msg01083.html On Sat, Apr 12, 2008 at 12:33 PM, <[EMAIL PROTECTED]> wrote: > > No doubt both OP and iTunes have their reasons for screwing around with the > > scroll b

Re: NSApplicationMain arguments [SOLVED]

2008-04-12 Thread slasktrattenator
Thanks Ken! That worked perfectly. Still curious why tweaking the argv[] array didn't, though. I did use a preceding dash for the key, and so it should have been the exact same thing as the code below, no? Anyway, here is a working example for anyone interested. Thanks again. int main(int argc, ch

Re: Tight loop processing

2008-04-12 Thread Don Arnel
I realize NSOperation on it's own does not spawn treads. I was referring to the broader use of it. Surely, you knew that! On Apr 11, 2008, at 8:08 AM, Bill Garrison wrote: On Apr 11, 2008, at 7:35 AM, Don Arnel wrote: Actually, while reading up on NSThread I cam across NSOperation which

Re: struct problem

2008-04-12 Thread Dean Ritchie
On Apr 12, 2008, at 1:37 AM, Hamish Allan wrote: On Sat, Apr 12, 2008 at 2:58 AM, Dean Ritchie <[EMAIL PROTECTED]> wrote: columnCount = [[LASize cellAtIndex:0] intValue]; rowCount = [[LASize cellAtIndex:1] intValue]; When I stop right after initializing the NSRect local var

Re: Core Data and the Document Dirty indicator

2008-04-12 Thread Jonathan Waddilove
Exactly what I needed! Thank you, that has fixed my problem. I wish the Conceptual documents could be made available in a book :) Jonathan On 11 Apr 2008, at 20:07, mmalc crawford wrote: On Apr 11, 2008, at 11:26 AM, Jonathan Waddilove wrote: Could some kind reader point me in the right direc

Re: Core Data and the Document Dirty indicator

2008-04-12 Thread Jonathan Waddilove
Thank you, I hadn't thought of it as an UndoManger issue! Jonathan On 11 Apr 2008, at 19:41, I. Savant wrote: When a Core Data document is opened initialization adds an entity for the basic 'All' smart group. This object is assigned to an in memory store (rather than to the persistent documen

dataWithPDFInsideRect doesn't clip

2008-04-12 Thread Lorenzo
I have subclassed an NSView (myView) and added it within a pageView. Within myView's drawRect method I draw myImage using [myImage drawInRect:mInRect fromRect:mFromRect Even when mInRect is larger than myView's bounds I properly get the clipped image on the screen, but when I get [pageVie

Re: NSApplicationMain arguments

2008-04-12 Thread Ken Thomases
On Apr 12, 2008, at 5:45 AM, Ken Thomases wrote: [[NSUserDefaults sharedUserDefaults] removeVolatileDomainForName:NSArgumentDomain]; [[NSUserDefaults sharedUserDefaults] setVolatileDomain:myValues forName:NSArgumentDomain]; Oops. s/sharedUserDefaults/standardUserDefaults/g -Ken _

Re: NSApplicationMain arguments

2008-04-12 Thread Ken Thomases
On Apr 12, 2008, at 5:08 AM, [EMAIL PROTECTED] wrote: Couldn't you just store your custom args in a global and access them later when you need them? My goal is to replace an existing setting in the NSArgumentDomain, so storing the setting in the application domain isn't good enough as NSArgum

Re: Override AppleScrollBarVariant on NSScroller?

2008-04-12 Thread slasktrattenator
> No doubt both OP and iTunes have their reasons for screwing around with the > scroll bars. They just aren't good reasons. Guys, you are way off-topic, and you are offending me. Of course I have good reasons for wanting to do this. Trust me, I'm not tampering with user defaults for the sheer fun

Re: Constraining a NSSlider to Certain Values

2008-04-12 Thread Brandon Walkin
I have managed to get my slider working the way I want it to by overriding mousedown and mousedragged, however there is still one small detail. I cant see how to make the slider knob show its 'pushed' image while the slider is being dragged. Does anyone know how to do this? thanks! Peter I'

Re: NSApplicationMain arguments

2008-04-12 Thread slasktrattenator
> If you're using NSProccessInfo to get the args, then changing them at runtime > won't work > as far as I know. The args are stored before main is even called. I don't > think passing > args to NSApplicationMain has any kind of effect. No, I'm not getting the args from NSProcessInfo but from

Re: Override AppleScrollBarVariant on NSScroller?

2008-04-12 Thread Bill Monk
I prefer them at one end, together, at bottom. So does iTunes. It now ignores any other choice. A bug, hopefully, not a "feature." On Apr 12, 2008, at 12:27 AM, Clark Cox wrote: This is not true. iTunes' scrollers will work in either of the supported configurations. And now, they'r

Re: Override AppleScrollBarVariant on NSScroller?

2008-04-12 Thread Bill Monk
On Apr 12, 2008, at 12:15 AM, Michael Watson wrote: The bottom line that you're veering away from is that this guy wants to *force* the double variant on users, Apologies for appearing to veer away from the point. I brought up iTunes' scrollbars as an example of why forcing something like t

Re: struct problem

2008-04-12 Thread Hamish Allan
On Sat, Apr 12, 2008 at 2:58 AM, Dean Ritchie <[EMAIL PROTECTED]> wrote: > columnCount = [[LASize cellAtIndex:0] intValue]; > rowCount = [[LASize cellAtIndex:1] intValue]; > When I stop right after initializing the NSRect local variable, the > debugger reports miniscule values fo

Re: Transparent view click-through

2008-04-12 Thread Ron Fleckner
On 12/04/2008, at 9:54 AM, Greg Hoover wrote: Is there a way to prevent click through on a transparent view? Greg Not really the answer you're looking for, but a workaround is to set the colour of the view to be white, then set the transparency to 5%. Anything less than 5% allows click-t

Re: Question about NSTreeController/NSOutlineView instance cleanup

2008-04-12 Thread Markus Spoettl
Well, without knowing the details of what you're doing, it's impossible to be certain, but this code certainly looks *very* wrong. For one thing, 'insertObject' is (according to the documentation) for controller subclasses to use to customize their own behavior, not for other things to use