Re: how to wait the finish of NSURLDownload

2008-04-17 Thread Andrew Farmer
On 16 Apr 08, at 23:41, Ken Thomases wrote: On the other hand, you should consider if you really want/need to synchronize on the download. Blocking your main thread for an indefinite wait seems likely to cause poor user experience. Even if your server is _usually_ quick to serve the file,

Menu validation problem with Font Manager menu items

2008-04-17 Thread Graham Cox
My app can respond to changeFont: and friends in various places. When those places have focus, the text menu items such as Bold, Italic and so on are enabled, and when they are not focused, they are disabled. All great. However, there are some places in my app that selectively respond to

Re: WebKit+AppleScript+JavaScript

2008-04-17 Thread Praveen Kumar
NSWorkspace launch the application but loads the url in the default browser. What i have to do to make the url open in the my application (webkit +cocoa). Please give me the suggestions. On 16-Apr-08, at 8:26 PM, Mike Abdullah wrote: If it is absolutely necessary to use NSTask for launchin

Implicit animation duration

2008-04-17 Thread Mike Manzano
Is there an easy way to change the duration of an implicit animation-- the kind you get when you do something like this? [[myWindow animator] setFrame:newFrame display:NO] ; Thanks, Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Implicit animation duration

2008-04-17 Thread Michael Vannorsdel
I'm not sure what the animator method returns. If you're asking how to control the duration of an NSWindow resize animation, you need to subclass NSWindow and override animationResizeTime: to return the duration you want. On Apr 17, 2008, at 1:32 AM, Mike Manzano wrote: Is there an easy

Re: Propagation of KVO through bindings

2008-04-17 Thread Hamish Allan
On Wed, Apr 16, 2008 at 4:49 PM, Hamish Allan <[EMAIL PROTECTED]> wrote: > [myArrayController addObserver:self forKeyPath:@"arrangedObjects" > options:(NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew) > context:nil]; > myDictionary = [[NSMutableDictionary alloc] init]; > [myD

Re: WebKit+AppleScript+JavaScript

2008-04-17 Thread Jean-Daniel Dupas
You can use -[NSWorkspace openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers :]; Le 17 avr. 08 à 09:24, Praveen Kumar a écrit : NSWorkspace launch the application but loads the url in the default browser. What i have to do to make the url open in th

Re: Core Data for managing subtree?

2008-04-17 Thread Hamish Allan
On Wed, Apr 16, 2008 at 2:31 AM, Hamish Allan <[EMAIL PROTECTED]> wrote: > How can I make the tree controller observe changes to this "children" > key? Is it failing because the key value does not exist in its own > right, but is bound to another? FYI, I tracked this down to a bug in NSArrayCo

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-17 Thread Heinrich Giesen
Sorry, pressed the wrong button. And: if the bezier path shall always be drawn 1 pixel wide, independent of resolution and scaling the lineWidth should be set to 0 (zero) -- Heinrich Giesen [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@l

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-17 Thread Heinrich Giesen
Graham Cox wrote: Offsetting by 0.5 makes it draw such that the exact pixel is filled. When a bezier path is more complicated it can become very ugly to add 0.5 to all coordinates. To avoid this the NSBezierPath class offers the method - transformUsingAffineTransform: So you can create a bez

Re: 1-bit NSBitmapImageRep?

2008-04-17 Thread Heinrich Giesen
On 17.04.2008, at 08:32, Graham Cox wrote: Is it possible to create a 1-bit (black and white) NSBitMapImageRep? If so, what are the magic parameters? If not, what is the smallest number of bits per pixel supported? You can create 1-bit NSBitMapImageReps, but you have to fill it yourself. A

Re: Implicit animation duration

2008-04-17 Thread Scott Anguish
wrap the change in a NSAnimationContext See the NSAnimationContext reference for a snippet that shows you how. http://developer.apple.com/documentation/Cocoa/Reference/NSAnimationContext_class/index.html#/ /apple_ref/doc/uid/TP40004682 On Apr 17, 2008, at 3:32 AM, Mike Manzano wrote: Is the

How does bind:toObject:withKeyPath:options: work?

2008-04-17 Thread Hamish Allan
Hi, I am attempting to work around a bug in NSArrayController by trying to propagate change notifications for arrangedObjects manually, as if I had bound the key path of another object to it (see http://www.cocoabuilder.com/archive/message/cocoa/2008/4/17/204421 for why that doesn't work). Howeve

Re: Implicit animation duration

2008-04-17 Thread Scott Anguish
On Apr 17, 2008, at 3:45 AM, Michael Vannorsdel wrote: I'm not sure what the animator method returns. If you're asking how to control the duration of an NSWindow resize animation, you need to subclass NSWindow and override animationResizeTime: to return the duration you want. no, thi

Re: Implicit animation duration

2008-04-17 Thread Michael Vannorsdel
Ah ok, missed that protocol. Thanks for clearing it up. On Apr 17, 2008, at 3:47 AM, Scott Anguish wrote: On Apr 17, 2008, at 3:45 AM, Michael Vannorsdel wrote: I'm not sure what the animator method returns. If you're asking how to control the duration of an NSWindow resize animation, you

Re: 1-bit NSBitmapImageRep?

2008-04-17 Thread Graham Cox
Mmmm, I read them, but not very enlightening for my situation. When you say I have to "fill it myself", what does that mean? Can't I just fill or stroke a path with that rep as a context? If not then there's no point in proceeding with this question as that is what needs to work. I don't ca

Re: How does bind:toObject:withKeyPath:options: work?

2008-04-17 Thread Pierre Molinaro
Hi, It seems that -willChangeValueForKey and -didChangeValueForKey of NSArrayController are called on arrangedObjects change. I think you can use of a class that inherits from NSArrayController where theses methods are redefined to send manually change notifications: - (void) willChang

Re: NSAllocateCollectable() questions

2008-04-17 Thread Alastair Houghton
On 16 Apr 2008, at 17:22, Michael Ash wrote: On Wed, Apr 16, 2008 at 5:28 AM, Alastair Houghton <[EMAIL PROTECTED]> wrote: On 16 Apr 2008, at 03:29, Michael Ash wrote: If this is the case then how does the collector know that you have cleared the memory. It seems to me that without a write ba

Re: How does bind:toObject:withKeyPath:options: work?

2008-04-17 Thread Hamish Allan
Hi Pierre, On Thu, Apr 17, 2008 at 12:17 PM, Pierre Molinaro <[EMAIL PROTECTED]> wrote: > I think you can use of a class that inherits from NSArrayController Thanks for your reply. Subclassing and caching did occur to me (which I should have mentioned), but having to do that sort of thing rathe

Re: binary search trees & binning

2008-04-17 Thread Army Research Lab
But the question is, does it solve your problem? Your original message said that you were doing something _like_ binning, but that it wasn't. This actually _is_ binning. Is it good enough, or do you need something else? Thanks, Cem Karan On 4/16/08 12:25 PM, "John Stiles" <[EMAIL PROTECTED]>

Re: 1-bit NSBitmapImageRep?

2008-04-17 Thread Heinrich Giesen
Hi, Can't I just fill or stroke a path with that rep as a context? no, you can't. If you try to create a context with: [NSGraphicsContext graphicsContextWithBitmapImageRep:oneBitRep]; it is not accepted. The errormessage is: CGBitmapContextCreate: unsupported parameter combination: 1 intege

Re: 1-bit NSBitmapImageRep?

2008-04-17 Thread Graham Cox
Ah, OK, thanks for confirming that. The process you outline will probably take too long for what I'm doing, so it looks like I'll have to just use 8-bit reps - shame, it's 8 times more memory than the job requires :-( -- S.O.S. On 17 Apr 2008, at 8:45 pm, Heinrich Giesen wrote: Hi,

Re: Chained Migration of Leopard CoreData stores

2008-04-17 Thread Ruotger Skupin
Am 17.04.2008 um 02:30 schrieb Ben Trumbull: Hi, let's say I have four versions of my data model: DataModel1.xcdatamodel DataModel2.xcdatamodel DataModel3.xcdatamodel DataModel4.xcdatamodel (this is the current one) and three model mapping files which always map from version n to version n+

Re: 1-bit NSBitmapImageRep?

2008-04-17 Thread Uli Kusterer
Am 17.04.2008 um 03:57 schrieb Graham Cox: Is it possible to create a 1-bit (black and white) NSBitMapImageRep? If so, what are the magic parameters? If not, what is the smallest number of bits per pixel supported? Others have already given you options, but what I'm wondering is what you

Re: Quartz.framework Catch-22 on Panther

2008-04-17 Thread Nick Nallick
I've been able to solve my problem by taking Quartz.framework out of my project and loading QuartzComposer.framework directly at runtime with NSBundle. For example: Instead of: QCRenderer* renderer = [QCRenderer alloc]; I have: static Class QCRendererClass = nil; i

Vended Object Setters

2008-04-17 Thread Justin Giboney
Is there something special that I need to do when calling a setter method on a vended object? I have a Customer object that I am vending. From the client app I call the setName method with a value of @"Justin", but when it gets to the server app, it says it is an invalid object. Thank you

Re: Vended Object Setters

2008-04-17 Thread Ken Thomases
On Apr 17, 2008, at 9:19 AM, Justin Giboney wrote: Is there something special that I need to do when calling a setter method on a vended object? I assume you're referring to Distributed Objects. Right? I have a Customer object that I am vending. From the client app I call the setName meth

to make NSOutlineView faster

2008-04-17 Thread Nick Rogers
Hi, I have NSOutlineView display a tree of files and folders in the root "/" filesystem. I also have checkboxes in the first column. whenever a item is clicked, say first time, then this item and all its children are also marked internally. so the check/uncheck mechanism also works internally

Re: how to wait the finish of NSURLDownload

2008-04-17 Thread Sherm Pendley
On Thu, Apr 17, 2008 at 2:16 AM, xiaobin <[EMAIL PROTECTED]> wrote: > hi, all > > In my application, I want to download a file from internet. so I use > NSURLDownload to do it. and using NSRunLoop to wait until finish the > downloading action. for example 2 seconds. codes as the following By man

Re: Vended Object Setters

2008-04-17 Thread Justin Giboney
bycopy worked, thank you. Does this mean though that I need to duplicate all of methods, with one set for internal commands and one for remote commands? Thank Justin Giboney ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not pos

Re: to make NSOutlineView faster

2008-04-17 Thread Sherm Pendley
On Thu, Apr 17, 2008 at 10:48 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: > Hi, > I have NSOutlineView display a tree of files and folders in the root "/" > filesystem. > I also have checkboxes in the first column. > whenever a item is clicked, say first time, then this item and all its > children

Re: Vended Object Setters

2008-04-17 Thread Shawn Erickson
On Thu, Apr 17, 2008 at 8:01 AM, Justin Giboney <[EMAIL PROTECTED]> wrote: > bycopy worked, thank you. > > Does this mean though that I need to duplicate all of methods, with one set > for internal commands and one for remote commands? You need an interface that has the needed bycopy, etc. qualif

Re: to make NSOutlineView faster

2008-04-17 Thread Hamish Allan
On Thu, Apr 17, 2008 at 4:48 PM, Nick Rogers <[EMAIL PROTECTED]> wrote: > This shows that my internal checking/unchecking mechanism is fast. as the > second time the time is considerably less. Not necessarily... it may simply be that your data is being cached closer to where it is needed. The o

Re: Vended Object Setters

2008-04-17 Thread Jean-Daniel Dupas
To declare a vended object, you should first declare a protocol that contains the methods you want to expose and that defines the methods behaviors (bycopy, byref, in, out, etc...) Then, you create a class that conforms to this protocol. You may omit the bycopy, byref and other modifiers in y

Re: Vended Object Setters

2008-04-17 Thread Ken Thomases
On Apr 17, 2008, at 10:01 AM, Justin Giboney wrote: bycopy worked, thank you. Uh, OK. Glad it helped, but your original problem is still mysterious. I don't know about you, but I don't like blindly fixing things without understanding them. Does this mean though that I need to duplicate

Re: NSValue value:withObjCType:

2008-04-17 Thread Jens Alfke
On 16 Apr '08, at 1:46 AM, Gerriet M. Denkmann wrote: NSValue has two methods: value:withObjCType: and valueWithBytes:objCType: . What is the difference between these two methods? When do I have to use the first, when the second? I am rather confused. Read the documentation. For the fir

Re: How does bind:toObject:withKeyPath:options: work?

2008-04-17 Thread Keary Suska
on 4/17/08 4:50 AM, [EMAIL PROTECTED] purportedly said: >> I think you can use of a class that inherits from NSArrayController > > Thanks for your reply. Subclassing and caching did occur to me (which > I should have mentioned), but having to do that sort of thing rather > defeats the purpose of

Re: NSValue value:withObjCType:

2008-04-17 Thread Keary Suska
on 4/17/08 9:31 AM, [EMAIL PROTECTED] purportedly said: >> NSValue has two methods: value:withObjCType: and >> valueWithBytes:objCType: . >> >> What is the difference between these two methods? When do I have to >> use the first, when the second? >> I am rather confused. > > Read the documentati

-charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
I have an NSEvent and I need to know what key the user has pressed, minus any of the modifiers. NSEvent -charactersIgnoringModifiers seems like a good place to start, but it has one serious flaw—it does not ignore the Shift key. So, for instance, it won't change ~ to `, ! to 1 or { to [. I ne

Re: WebKit+AppleScript+JavaScript

2008-04-17 Thread Praveen Kumar
I used that one Jean-Daniel Dupas specified. -[NSWorkspace openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers :]; where i gave nil for last two arguments. I created a sample cocoa+webkit application and added apple scriptability. I execute the script

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread Greg Titus
I think you'd ask the NSEvent for its -keyCode, then pass that key code to UCKeyTranslate() with all the modifier key state (including shift) turned off in order to get a unicode string for what that key would mean if the user hadn't been pressing any modifiers. Hope that helps, - G

Setting the value of an array element

2008-04-17 Thread Johnny Lundy
I imagine this is a very dumb question, but I am perplexed. NSArray says you can change the values of elements, but not add/ subtract/replace elements. Let's say I have an NSArray @"Tom", @"Dick", @"Harry", nil And I want to change Tom and Dick to Mutt and Jeff. Is my only option to make it

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
Sweet, I will take a look at this and post back when I have results or questions. Thanks! Greg Titus wrote: I think you'd ask the NSEvent for its -keyCode, then pass that key code to UCKeyTranslate() with all the modifier key state (including shift) turned off in order to get a unicode string

Re: Vended Object Setters

2008-04-17 Thread Justin Giboney
Actually that didn't work... it appears to be setting it as I go through the set method, but when I go to get it it is almost as if it is calling an object in a different memory set. I set up the protocol, and I am using bycopy. Thanks, Justin Giboney On Apr 17, 2008, at 9:25 AM, Ken Thom

Re: Capsule-Style Toolbar Controls

2008-04-17 Thread Stefan Hafeneger
Hi Peter, I uploaded two screenshots from Mail (in the background) and a demo app (in the foreground) designed just in Interface Builder. The size of the segmented control is exactly the same but there is a difference in the baseline. http://homepage.mac.com/stefan.hafeneger/.cv/stefan.ha

Re: WebKit+AppleScript+JavaScript

2008-04-17 Thread Jens Alfke
On 17 Apr '08, at 9:08 AM, Praveen Kumar wrote: I created a sample cocoa+webkit application and added apple scriptability. I execute the script on this application from script editor. The application opened the given url successfully, but i can't able to quit the application from the dock

Re: NSArrayController bound to @unionOfArrays not updating

2008-04-17 Thread Quincey Morris
On Apr 17, 2008, at 01:42, William Towe wrote: Yep, that took care of it. Just so I understand, should I surround calls to any of the standard KVC method calls (in my case, insertObject:atIndex:) with [self willChangeValueForKey:@"affectedKey"]; and [self didChangeValueForKey:@"affected

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread Jean-Daniel Dupas
Le 17 avr. 08 à 18:18, John Stiles a écrit : Sweet, I will take a look at this and post back when I have results or questions. Thanks! Greg Titus wrote: I think you'd ask the NSEvent for its -keyCode, then pass that key code to UCKeyTranslate() with all the modifier key state (including

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
Quick question: in Leopard, are there any keyboards left which don't have a uchr? I found some sample code which includes a fallback case for if no 'uchr' resource is found (it uses plain KeyTranslate in this case) and I'm wondering whether this is still relevant in the Leopard-and-above timef

Re: Setting the value of an array element

2008-04-17 Thread Jens Alfke
On 17 Apr '08, at 9:15 AM, Johnny Lundy wrote: NSArray says you can change the values of elements, but not add/ subtract/replace elements. Nope; NSArrays are completely immutable. To make any modifications you first have to make a mutable copy, and then modify that. (The same goes for NSD

Re: Setting the value of an array element

2008-04-17 Thread Gregory Weston
Johnny Lundy wrote: I imagine this is a very dumb question, but I am perplexed. NSArray says you can change the values of elements, but not add/ subtract/replace elements. Right. Meaning if a contained object it mutable, you can mutate it and the NSArray won't care. Let's say I have an N

RE: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
I'm currently cribbing from here: http://lists.apple.com/archives/carbon-dev/2005/May/msg01062.html And I got rid of the non-uchr section. I can require Leopard in this case. From: Jean-Daniel Dupas [mailto:[EMAIL PROTECTED] Sent: Thursday, April 17, 2008 9:37 AM To: John Stiles Cc: co

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
OK, I've got this implemented. Good news: it seems to work great for punctuation and letters. Bad news: it doesn't seem to work for other keys, like F-keys or arrow keys. Or rather, it generates a result, but not the same values as NSF1FunctionKey or NSUpArrowFunctionKey. It's coming up with low

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread Jean-Daniel Dupas
I don't think so. The API to retreive KCHR is deprecated and does not exists on 64 bits, so it would mean that a kchr keyboard cannot be used with 64 bits software. Le 17 avr. 08 à 18:38, John Stiles a écrit : Quick question: in Leopard, are there any keyboards left which don't have a u

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread Hank Heijink (Mailinglists)
I assume you picked cmd-shift-[ because the curly brace makes sense, in which case you really are looking for cmd-{. If someone has a keyboard where the shifted version of [ is @ (no idea if such a keyboard actually exists), you might not want your shortcut to be cmd- shift-[. So, I think

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
I think you missed the part where I explained about how the user can customize the hotkeys to whatever they want :) Right now the UI is set up so that they pick a key, then they pick what modifiers they want. It makes way more sense from an end-user perspective to choose the "1" key and then c

Re: Setting the value of an array element

2008-04-17 Thread Sherm Pendley
On Thu, Apr 17, 2008 at 12:15 PM, Johnny Lundy <[EMAIL PROTECTED]> wrote: > I imagine this is a very dumb question, but I am perplexed. > > NSArray says you can change the values of elements, but not > add/subtract/replace elements. > > Let's say I have an NSArray @"Tom", @"Dick", @"Harry", nil

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread Jean-Daniel Dupas
Now that you say it, "[" is produced using "alt + shift + (" on french keyboard, and "alt + (" output "{". So "cmd + [" is actualy on french keyboard "cmd + alt + shift + (" shortcut are really not good candidate for internationalization. Le 17 avr. 08 à 19:11, Hank Heijink (Mailinglists) a

Re: NSArrayController bound to @unionOfArrays not updating

2008-04-17 Thread mmalc crawford
On Apr 17, 2008, at 9:36 AM, Quincey Morris wrote: Just so I understand, should I surround calls to any of the standard KVC method calls (in my case, insertObject:atIndex:) with [self willChangeValueForKey:@"affectedKey"]; and [self didChangeValueForKey:@"affectedKey"] if the standard KVC

Re: Cannot Remove Observer Error

2008-04-17 Thread Thaddeus Cooper
Mark -- Thanks for the input. The code for the accessor methods are shown below: - (NSManagedObject *)wineType { id tmpObject; DebugMessage(@"entering"); [self willAccessValueForKey: @"wineType"]; tmpObject = [self primitiveValueForKey: @"wineType"]; [self didAccessValu

Re: to make NSOutlineView faster

2008-04-17 Thread Corbin Dunn
On Apr 17, 2008, at 7:48 AM, Nick Rogers wrote: Hi, I have NSOutlineView display a tree of files and folders in the root "/" filesystem. I also have checkboxes in the first column. whenever a item is clicked, say first time, then this item and all its children are also marked internally. so

Simulating menu bar blink in Cocoa

2008-04-17 Thread John Stiles
As previously explained here, I'm handling hotkeys in my app via custom code in order to work around some AppKit bugs. How can I simulate the menu-title blink effect using Cocoa? In Carbon, it's FlashMenuBar(menuID) but I don't see a Cocoa equivalent. _

Re: Simulating menu bar blink in Cocoa

2008-04-17 Thread Randall Meadows
On Apr 17, 2008, at 11:54 AM, John Stiles wrote: As previously explained here, I'm handling hotkeys in my app via custom code in order to work around some AppKit bugs. How can I simulate the menu-title blink effect using Cocoa? In Carbon, it's FlashMenuBar(menuID) but I don't see a Cocoa equ

Re: Simulating menu bar blink in Cocoa

2008-04-17 Thread John Stiles
Randall Meadows wrote: On Apr 17, 2008, at 11:54 AM, John Stiles wrote: As previously explained here, I'm handling hotkeys in my app via custom code in order to work around some AppKit bugs. How can I simulate the menu-title blink effect using Cocoa? In Carbon, it's FlashMenuBar(menuID) but I

Re: Simulating menu bar blink in Cocoa

2008-04-17 Thread John Stiles
John Stiles wrote: Randall Meadows wrote: On Apr 17, 2008, at 11:54 AM, John Stiles wrote: As previously explained here, I'm handling hotkeys in my app via custom code in order to work around some AppKit bugs. How can I simulate the menu-title blink effect using Cocoa? In Carbon, it's FlashM

Re: Simulating menu bar blink in Cocoa

2008-04-17 Thread Randall Meadows
On Apr 17, 2008, at 12:05 PM, John Stiles wrote: Randall Meadows wrote: On Apr 17, 2008, at 11:54 AM, John Stiles wrote: As previously explained here, I'm handling hotkeys in my app via custom code in order to work around some AppKit bugs. How can I simulate the menu-title blink effect using

Re: NSTextField vertical sizeToFit

2008-04-17 Thread Rob Napier
On Apr 13, 2008, at 4:38 AM, Jeff wrote: Any way to take an NSTextField containing some amount of text, and resize it vertically so all the text fits within the frame? The sizeToFit message seems to do this, except on the horizontal axis. Thank you! It's a little easier to do this with an N

Re: Cannot Remove Observer Error

2008-04-17 Thread mmalc crawford
On Apr 17, 2008, at 10:45 AM, Thaddeus Cooper wrote: As far as I know these are correct. But I'm sure someone will tell me if they aren't ;-) Just for reassurance, they look OK to me. I can't remember if you're targeting 10.5+? If so, you should try to avoid writing your own accessor meth

Re: printing in Cocoa

2008-04-17 Thread Chris Hanson
On Apr 16, 2008, at 9:03 AM, Victor Bovio wrote: Does anyone knows a good book or tutorial that covers printing (in- depth) in Cocoa apps ??, I have Hillegass book but just covers the minimal steps for printing.. When I was learning how printing worked in Cocoa, I read the parts of Aaron's

Implementing NSHUDWindowMask on NSDrawer

2008-04-17 Thread Sam Krishna
Just for fun, I'm trying to implement an NSDrawer object with a HUD- style look'n'feel to it. As it turns out, it is not a subclass of NSWindow that lets me do what I need to do. If NSDrawer was that, it would be easy, otherwise, not so much. SO, here's my Q: (1) *Can* I implement a subcl

Re: Core Animation/Layers and Borderless Windows

2008-04-17 Thread David Duncan
On Apr 16, 2008, at 6:49 PM, Karl Goiser wrote: I'm creating a borderless window whose content view uses Core Animation... When I do this, the window is drawn without any shadow no matter the alpha of the content. - a borderless window with a normal view draws the window's shadow. - a no

Re: NSArrayController bound to @unionOfArrays not updating

2008-04-17 Thread Quincey Morris
On Apr 17, 2008, at 10:31, mmalc crawford wrote: On Apr 17, 2008, at 9:36 AM, Quincey Morris wrote: Just so I understand, should I surround calls to any of the standard KVC method calls (in my case, insertObject:atIndex:) with [self willChangeValueForKey:@"affectedKey"]; and [self didChan

OpenGL in a Visual iTunes Plugin

2008-04-17 Thread J. Todd Slack
Hi All, I wish to create a UI using OpenGL for use in an ITunes Visualizer Plugin. Can anyone tell me how to get started? I have the Visualizer SDK already. Is there anything OpenGL wise that I have to download? Is there a tool, like Interface Builder, that I can drag and drop the interf

Re: Vended Object Setters

2008-04-17 Thread Ken Thomases
On Apr 17, 2008, at 11:19 AM, Justin Giboney wrote: Actually that didn't work... it appears to be setting it as I go through the set method, but when I go to get it it is almost as if it is calling an object in a different memory set. Sounds like you're getting the memory management wrong.

Determining which sheet closed with panels in separate nibs

2008-04-17 Thread Michael Watson
Inside of MainMenu.nib, I have my application's main window. Also in MainMenu.nib is an NSObject subclass instance that is the main window's delegate. In another nib, I have a panel and an NSObject subclass instance that is the panel's delegate. The panel is opened attached as a sheet to

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread Ken Thomases
On Apr 17, 2008, at 11:38 AM, John Stiles wrote: Quick question: in Leopard, are there any keyboards left which don't have a uchr? I found some sample code which includes a fallback case for if no 'uchr' resource is found (it uses plain KeyTranslate in this case) and I'm wondering whether

Unregistering KVO observers

2008-04-17 Thread Steve Nicholson
I'm using NSDocument/NSWindowController with bindings in the NSWindowController subclass set up in Interface Builder. When I close the window, I get the message "An instance 0x306860 of class Problem is being deallocated while key value observers are still registered with it." I'd like to u

adding Quicklook preview to my app

2008-04-17 Thread Victor Bovio
Hi, I have a document based Cocoa app (CAD-like), to which I like to add the Leopard quicklook plugin feature. I tried first looking at the Documentation, but looks overwhelming to me, is there a simple tutorial or examples somewhere I can look at ?? Basically I just want to embed a snapshot

Mounting AFP Volume using Cocoa

2008-04-17 Thread JanakiRam
Hi All, I'm working on a cocoa application which needs to mount a afp volume. I've found a way to mount a volume using AppleScript with Finder object. Example using mount volume command. Is there any cocoa way to mount a volume silently by passing the user name and password. Please h

Re: adding Quicklook preview to my app

2008-04-17 Thread Brandon Walkin
On 17-Apr-08, at 4:07 PM, Victor Bovio wrote: Hi, I have a document based Cocoa app (CAD-like), to which I like to add the Leopard quicklook plugin feature. I tried first looking at the Documentation, but looks overwhelming to me, is there a simple tutorial or examples somewhere I can look

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
Hmm, OK. I guess there's no harm in leaving in the KCHR handling code. I was hoping to simplify things (this routine is already big and yucky) but I guess that's just not in the cards. Nothing about this whole hotkey ordeal has been simple! Ken Thomases wrote: On Apr 17, 2008, at 11:38 AM, J

Re: Determining which sheet closed with panels in separate nibs

2008-04-17 Thread Sherm Pendley
On Thu, Apr 17, 2008 at 3:49 PM, Michael Watson <[EMAIL PROTECTED]> wrote: > Inside of MainMenu.nib, I have my application's main window. Also in > MainMenu.nib is an NSObject subclass instance that is the main window's > delegate. > > In another nib, I have a panel and an NSObject subclass instan

Re: -charactersIgnoringModifiers and the shift key

2008-04-17 Thread John Stiles
Here's what I ended up with. It's really not pretty but I think it should handle everything. I derived this from code on Carbon-dev (see "iGetKeys sample code problems in Tiger") so I think it's only fair to give back :) BTW, word to the wise, the Carbon-dev code looks like it has an endian bug,

Re: Determining which sheet closed with panels in separate nibs

2008-04-17 Thread Jean-Daniel Dupas
Le 17 avr. 08 à 22:44, Sherm Pendley a écrit : On Thu, Apr 17, 2008 at 3:49 PM, Michael Watson <[EMAIL PROTECTED]> wrote: Inside of MainMenu.nib, I have my application's main window. Also in MainMenu.nib is an NSObject subclass instance that is the main window's delegate. In another nib, I

Re: NSValue value:withObjCType:

2008-04-17 Thread Gerriet M. Denkmann
On 17 Apr 2008, at 17:56, Keary Suska wrote: on 4/17/08 9:31 AM, [EMAIL PROTECTED] purportedly said: NSValue has two methods: value:withObjCType: and valueWithBytes:objCType: . What is the difference between these two methods? When do I have to use the first, when the second? I am rather conf

Why is [nil aMessage] a no-op?

2008-04-17 Thread Adam P Jenkins
I'm curious if anyone knows the rationale behind the decision to make sending messages to nil be a no-op in ObjC. I've used a number of other OO languages, including C++, Java, Python, Ruby, Smalltalk, and Javascript, and in all of them, trying to invoke a method on whatever their equival

Weird build error

2008-04-17 Thread Don Arnel
I've been working on a project for a few weeks now and suddenly today I get this error while building (see below). I was getting this same error in one of my real classes so after commenting out almost every bit of code and still seeing the error, I decided to just create a new TestClass an

Re: Using Properties at Outlets

2008-04-17 Thread Adam P Jenkins
The only potential problem I can see with this is whether IB will use the generated accessor methods to set the outlets, or if it will just access the ivars directly. If it does the latter, then no property change notifications will be sent to observers when IB sets the outlet. If that's

Re: Weird build error

2008-04-17 Thread Robert Kukuchka
you forgot the break; On 17-Apr-08, at 3:47 PM, Don Arnel wrote: I've been working on a project for a few weeks now and suddenly today I get this error while building (see below). I was getting this same error in one of my real classes so after commenting out almost every bit of code and st

Re: Weird build error

2008-04-17 Thread Hamish Allan
On Fri, Apr 18, 2008 at 12:47 AM, Don Arnel <[EMAIL PROTECTED]> wrote: > switch (1) { > default: > } > (x)(error: label at end of compound statement) You need a statement to execute for the default case. The code you have written is equivalent to: - (vo

Re: Weird build error

2008-04-17 Thread Don Arnel
A break; is not required, but it does cause the compound statement error to go away. Even with the break; inserted the other error still occurs if the comments are removed. On Apr 17, 2008, at 6:50 PM, Robert Kukuchka wrote: you forgot the break; ___

Re: Weird build error

2008-04-17 Thread Jonathan del Strother
On Thu, Apr 17, 2008 at 11:47 PM, Don Arnel <[EMAIL PROTECTED]> wrote: > I've been working on a project for a few weeks now and suddenly today I get > this error while building (see below). I was getting this same error in one > of my real classes so after commenting out almost every bit of code an

Re: Why is [nil aMessage] a no-op?

2008-04-17 Thread Nick Zitzmann
On Apr 17, 2008, at 4:42 PM, Adam P Jenkins wrote: I'm curious if anyone knows the rationale behind the decision to make sending messages to nil be a no-op in ObjC. I've used a number of other OO languages, including C++, Java, Python, Ruby, Smalltalk, and Javascript, and in all of them,

Re: Why is [nil aMessage] a no-op?

2008-04-17 Thread Bill Bumgarner
On Apr 17, 2008, at 5:42 PM, Adam P Jenkins wrote: I'm curious if anyone knows the rationale behind the decision to make sending messages to nil be a no-op in ObjC. I've used a number of other OO languages, including C++, Java, Python, Ruby, Smalltalk, and Javascript, and in all of them, t

Re: Weird build error

2008-04-17 Thread Keary Suska
on 4/17/08 4:56 PM, [EMAIL PROTECTED] purportedly said: > A break; is not required, but it does cause the compound statement > error to go away. Even with the break; inserted the other error still > occurs if the comments are removed. > > On Apr 17, 2008, at 6:50 PM, Robert Kukuchka wrote: > >>

Re: Weird build error

2008-04-17 Thread Wayne Packard
The break isn't required, but something is. You could put NSLog(@"defaulting"); after default:. Or you could put a semicolon; or a lovely set of empty braces. To fix the other problem, try this: switch (1) { case 1: { NSMutableArray *myArray=[[NSMutableArray a

Re: Weird build error

2008-04-17 Thread Michael Vannorsdel
Change it to: - (void)TestFunction { switch (1) { case 1: { NSMutableArray *myArray=[[NSMutableArray alloc] init]; break; } } } No need to declare defa

Re: Weird build error

2008-04-17 Thread Don Arnel
Ah, that did the trick! I love mailing lists! Many thanks to all who responded. On Apr 17, 2008, at 7:15 PM, Michael Vannorsdel wrote: Change it to: - (void)TestFunction { switch (1) { case 1: { NSMutableArray *my

Re: Weird build error

2008-04-17 Thread Chris Suter
On 18/04/2008, at 9:15 AM, Michael Vannorsdel wrote: Change it to: - (void)TestFunction { switch (1) { case 1: { NSMutableArray *myArray=[[NSMutableArray alloc] init]; break;

Re: Weird build error

2008-04-17 Thread Kyle Sluder
GCC is alerting you to the fact that the switch at the end of the statement is unnecessary. If you really want to do something for all cases, use default. Otherwise just omit it. Using the empty statement (; by itself) will fool GCC, but an empty default case is useless. --Kyle Sluder _

  1   2   >