Re: Changing the model behind contoller's back?

2008-09-04 Thread Oleg Krupnov
You are right, but what KVC messages I should send to the model in case of unordered sets, e.g. if I use Core Data? According to the Core Data docs (http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdAccessorMethods.html#//apple_ref/doc/uid/TP40002154-SW9), I should call

Re: NSPanel: resigning key focus?

2008-09-04 Thread Andrew Merenbach
Hi! Bear in mind that the documentation states, quite particularly, that you should "never invoke this method directly" -- on -resignKeyWindow, -becomeKeyWindow, -resignMainWindow, and -becomeMainWindow -- and, also, that for -resignFirstResponder and -becomeFirstResponder on an NSView:

How to observe NSTreeController in a custom view?

2008-09-04 Thread Oleg Krupnov
In the samples I have seen, custom views observe linear arrays (NSArrayControllers). When the observeValue:forKey: message is sent to the custom view, it checks what happened to the array. Because the change dictionary does not help in this case, the view has to maintain a copy of the previous arra

Re: NSPanel: resigning key focus?

2008-09-04 Thread Vijay Malhan
Peter. Yes, bracketing the calls removes the flicker. But as far as the correct solution goes: There might not be any other window which I should make key. In that case the panel should simply resign the key focus and let application handle the events. It seems this will be the solution for now. T

Re: string convertion: converting getter name to setter

2008-09-04 Thread Sherm Pendley
On Thu, Sep 4, 2008 at 10:51 PM, steph thirion <[EMAIL PROTECTED]> wrote: > > Same with NSInvocation, AFAIK you can only pass objects. > Where'd you get that idea? NSInvocation's -setArgument:atIndex: method takes a void* for its first argument, and describes it as "an untyped buffer." If only ob

Re: string convertion: converting getter name to setter

2008-09-04 Thread Charles Steinman
--- On Thu, 9/4/08, steph thirion <[EMAIL PROTECTED]> wrote: > I'm working on a class that will manage transitions of > properties. > It's for a game on a slower device, so I need the less > costly solution. I can understand your performance constraints, but have you actually profiled your gam

Re: Why do all these methods of measuring string metrics with font attribute fail?

2008-09-04 Thread Henry McGilton (Starbase)
On Sep 3, 2008, at 9:38 AM, Douglas Davidson wrote: On Sep 3, 2008, at 6:01 AM, an0 wrote: So, can anyone tell me why all these fell through so badly, and what is the true straightforward way to do this if any? The true straightforward way to do this is with -sizeToFit. -sizeWithAttribut

Re: string convertion: converting getter name to setter

2008-09-04 Thread Phil
On Fri, Sep 5, 2008 at 2:51 PM, steph thirion <[EMAIL PROTECTED]> wrote: > I was trying to go with performSelector, but just a while ago I was stunned > to find out there's no way to pass along an argument that is a basic type. > Same with NSInvocation, AFAIK you can only pass objects. And I'd rath

Re: Accessing SDL Frameworks Bundled with Leopard...

2008-09-04 Thread Jason Coco
On Sep 5, 2008, at 00:04 , John Joyce wrote: Does anybody know any official or proper way to link to the SDL framework that is bundled in the root library in Leopard? /Library/Frameworks/SDL.framework is surprisingly, there! I don't have any such directory on my installation of Leopard. Ano

Re: Accessing SDL Frameworks Bundled with Leopard...

2008-09-04 Thread Phil
On Fri, Sep 5, 2008 at 4:04 PM, John Joyce <[EMAIL PROTECTED]> wrote: > Does anybody know any official or proper way to link to the SDL framework > that is bundled in the root library in Leopard? > /Library/Frameworks/SDL.framework > is surprisingly, there! > Not on my system. /Library/Frameworks

Accessing SDL Frameworks Bundled with Leopard...

2008-09-04 Thread John Joyce
Does anybody know any official or proper way to link to the SDL framework that is bundled in the root library in Leopard? /Library/Frameworks/SDL.framework is surprisingly, there! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

[MEET] Minnesota CocoaHeads 9/11/08

2008-09-04 Thread Bob McCune
I wanted to announce the next Minnesota CocoaHeads meeting is next Thursday (9/11) from 6:00-8:00pm. We meet at the offices of Synergy Information Services in Bloomington. Troy Gaul will giving a presentation entitled Lightroom Exposed. Troy is Adobe Photoshop Lightroom’s lead and will ta

Re: NSPanel: resigning key focus?

2008-09-04 Thread Peter N Lewis
The correct solution is probably to figure out which should be the key window and make that key, however: If I do: [window orderOut: nil]; [window orderFront: nil]; // Not asking it to be key This results in the behavior I am trying to achieve. But this workaround will not work as there is a f

Animated images in a NSTableView

2008-09-04 Thread Dave Carrigan
I am having problems with animated images in a NSTableView (specifically an animated GIF). After some experimentation, I have determined that the problem seems to be that the view doesn't update itself after the next frame in the animation loads. I determined this after I noticed that the i

Re: string convertion: converting getter name to setter

2008-09-04 Thread steph thirion
On Sep 5, 2008, at 3:34 AM, Phil wrote: I assume you want to do more with the selector than just invoke it---otherwise you can just use KVC and save yourself some grief. Actually, that's all I want! I'm working on a class that will manage transitions of properties. It's for a game on a sl

Re: string convertion: converting getter name to setter

2008-09-04 Thread Phil
On Fri, Sep 5, 2008 at 1:53 PM, Steve Weller <[EMAIL PROTECTED]> wrote: > > From memory I think that does not work: capitalizedString also decapitalizes > all but the first character, so capitalizedString will become > setCapitalizedstring instead of setCapitalizedString. > Gah, you're right! I gu

Re: string convertion: converting getter name to setter

2008-09-04 Thread Steve Weller
On Sep 4, 2008, at 6:37 PM, Phil wrote: On Fri, Sep 5, 2008 at 1:27 PM, Andrew Merenbach <[EMAIL PROTECTED]> wrote: SEL getterSel = @selector(balloonColor); NSString *getterName = NSStringFromSelector(getterSel); NSString *setterName = [@"set" stringByAppendingString:getterName]; SEL setterSel

Re: Changing the model behind contoller's back?

2008-09-04 Thread Rob Keniger
On 04/09/2008, at 9:52 PM, Oleg Krupnov wrote: The question is: am I allowed to alter the model directly, or should I always use the controller? You can change the model directly, but you must use KVC-compliant methods to do so, unless you fire -willChangeValueForKey and - didChangeValueF

Re: string convertion: converting getter name to setter

2008-09-04 Thread Andrew Merenbach
On Sep 4, 2008, at 6:37 PM, Phil wrote: On Fri, Sep 5, 2008 at 1:27 PM, Andrew Merenbach <[EMAIL PROTECTED]> wrote: SEL getterSel = @selector(balloonColor); NSString *getterName = NSStringFromSelector(getterSel); NSString *setterName = [@"set" stringByAppendingString:getterName]; SEL setterSel

Re: string convertion: converting getter name to setter

2008-09-04 Thread Phil
On Fri, Sep 5, 2008 at 1:27 PM, Andrew Merenbach <[EMAIL PROTECTED]> wrote: >> SEL getterSel = @selector(balloonColor); >> NSString *getterName = NSStringFromSelector(getterSel); >> NSString *setterName = [@"set" stringByAppendingString:getterName]; >> SEL setterSel = NSSelectorFromString(setterNam

Re: string convertion: converting getter name to setter

2008-09-04 Thread Phil
On Fri, Sep 5, 2008 at 12:40 PM, steph thirion <[EMAIL PROTECTED]> wrote: > > from the selector of a given getter function, I need to get the selector of > the equivalent setter function. For instance, from color I should get > setColor. > I assume you want to do more with the selector than just i

Re: string convertion: converting getter name to setter

2008-09-04 Thread Andrew Merenbach
On Sep 4, 2008, at 5:40 PM, steph thirion wrote: from the selector of a given getter function, I need to get the selector of the equivalent setter function. For instance, from color I should get setColor. char* getterName = sel_getName(getterSelector); char * setterName = ... ? ... SEL

Re: What Size My Window?

2008-09-04 Thread Gerriet M. Denkmann
On 4 Sep 2008, at 15:49, Uli Kusterer wrote: On 04.09.2008, at 10:10, Gerriet M. Denkmann wrote: 6. Other? So: is there some commonly agreed upon right strategy? Are there some official guidelines for document window sizes? You can save the size of your window in some plist in your docum

string convertion: converting getter name to setter

2008-09-04 Thread steph thirion
from the selector of a given getter function, I need to get the selector of the equivalent setter function. For instance, from color I should get setColor. char* getterName = sel_getName(getterSelector); char * setterName = ... ? ... SEL setterSelector = sel_getUid(setterName); What wou

Re: GDB Problems

2008-09-04 Thread Ken Thomases
On Sep 4, 2008, at 5:49 PM, Bridger Maxwell wrote: On one of my projects any time I try to start the program with a debug point set, GDB crashes before anything happens. It prints out: run [Switching to process 2279 local thread 0x2d03] Running… 2008-09-04 16:32:28.470 MyApp[2279:813] 1.0

Re: NSTableView Protocol Help!

2008-09-04 Thread Keary Suska
9/4/08 5:10 PM, also sprach [EMAIL PROTECTED]: > So, I've written a practice application with NSTableView, and > NSMutableArray. I have NSTableView connected to AppController as a > dataSource, and I connected all outlets. > > I have ALREADY defined the protocols needed, but for some reason, this

NSTableView Protocol Help!

2008-09-04 Thread Eric Lee
So, I've written a practice application with NSTableView, and NSMutableArray. I have NSTableView connected to AppController as a dataSource, and I connected all outlets. I have ALREADY defined the protocols needed, but for some reason, this message keeps on appearing in the debugger: ***

GDB Problems

2008-09-04 Thread Bridger Maxwell
Hey, On one of my projects any time I try to start the program with a debug point set, GDB crashes before anything happens. It prints out: run [Switching to process 2279 local thread 0x2d03] Running… 2008-09-04 16:32:28.470 MyApp[2279:813] 1.0 [Switching to process 2279 thread 0x5603] [Switchi

Circular NSSlider: How to get the same behaviour as in Quartz Composer?

2008-09-04 Thread Marco Masser
Hi! In Quartz Composer, published input ports of type index or number have a text field and a circular NSSlider in the viewer's parameter panel. This NSSlider behaves exactly like I would like mine to behave, but I can't figure out how to do that. What I'm getting: One full rotation clock

Re: NSTask Question

2008-09-04 Thread J. Todd Slack
Hi Nick, Thanks, that seems better, than trying to build it up myself. Thanks, -Jason On Sep 4, 2008, at 2:56 PM, Nick Zitzmann wrote: On Sep 4, 2008, at 3:42 PM, J. Todd Slack wrote: So I need to use NSTask and I am trying to run a small executable command-line app from inside my 'reso

Re: NSTask Question

2008-09-04 Thread Nick Zitzmann
On Sep 4, 2008, at 3:42 PM, J. Todd Slack wrote: So I need to use NSTask and I am trying to run a small executable command-line app from inside my 'resources' directory in my app bundle. But what is the right path to access? The right path is whatever this method returns: [[NSBundle mai

NSTask Question

2008-09-04 Thread J. Todd Slack
So I need to use NSTask and I am trying to run a small executable command-line app from inside my 'resources' directory in my app bundle. But what is the right path to access? The app I want to run is here: /Contents/Resources/to run> And the app I want to access from is at: /Contents/MacOs

Re: Disabled NSButton

2008-09-04 Thread Chris Hanson
On Sep 4, 2008, at 12:33 PM, Ronnie B <[EMAIL PROTECTED]> wrote: I would like to have 'Ok' button disabled as long as the password field is empty. Add a -canLogIn method to the panel's controller that returns YES when the user has entered a password. Then bind your button's enabled state

Re: NSNotificationCenter removeObserver NOT working

2008-09-04 Thread Michael Ash
On Thu, Sep 4, 2008 at 5:51 AM, Valentin Dan <[EMAIL PROTECTED]> wrote: > I'm trying to remove all notifications that have a certain object and I > can't seem to get that to work. I'm doing something like this: > > [[NSNotificationCenter defaultCenter] removeObserver:nil name:nil > object:myObject]

Re: line break in Interface Builder

2008-09-04 Thread John Murphy
That works. Thanks everybody! John ___ 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/Unsubscribe/Upda

Re: Disabled NSButton

2008-09-04 Thread Ronnie B
Thanks Randall. It worked. On Thu, Sep 4, 2008 at 3:42 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > On Sep 4, 2008, at 1:33 PM, Ronnie B wrote: > > Hi All! >> >> I am implementing a login panel. I would like to have 'Ok' button >> disabled >> as long as the password field is empty. Any ad

Re: Launching preference panel of an application from another application

2008-09-04 Thread Nick Zitzmann
On Sep 4, 2008, at 10:59 AM, Arun wrote: Can anyone let me know how can we launch Preference panel of one cocoa application from another cocoa application. You'd have to use AppleScript or DO to do that, pick one. Nick Zitzmann _

Re: line break in Interface Builder

2008-09-04 Thread Randall Meadows
On Sep 4, 2008, at 1:35 PM, I. Savant wrote: On Thu, Sep 4, 2008 at 3:26 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: Option-Return? Well there's an 'option'. Have you tested this in a binding? I'm interested in hearing whether it actually works. Yes, it also works in the single-line "La

Re: Disabled NSButton

2008-09-04 Thread Randall Meadows
On Sep 4, 2008, at 1:33 PM, Ronnie B wrote: Hi All! I am implementing a login panel. I would like to have 'Ok' button disabled as long as the password field is empty. Any advise? -controlTextDidChange: delegate method; in it, [en|dis]able the button according to the length of the passw

Re: line break in Interface Builder

2008-09-04 Thread I. Savant
On Thu, Sep 4, 2008 at 3:44 PM, Uli Kusterer <[EMAIL PROTECTED]> wrote: > Just tried it. Works like a charm. Glad to learn about this. Though the > editing experience leaves a bit to be desired. Hey, great! Glad as well, thanks, guys! -- I.S. ___ C

Re: line break in Interface Builder

2008-09-04 Thread Uli Kusterer
On 04.09.2008, at 21:35, I. Savant wrote: On Thu, Sep 4, 2008 at 3:26 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: Option-Return? Well there's an 'option'. Have you tested this in a binding? I'm interested in hearing whether it actually works. Just tried it. Works like a charm. Glad t

Re: Finder Eject Button in OutlineView

2008-09-04 Thread kiran Sanka
Hi Corbin, Thanks you very much . This is the one I Was looking for . On Sep 2, 2008, at 8:41 AM, Corbin Dunn wrote: On Sep 1, 2008, at 4:25 PM, kiran Sanka wrote: I am trying to figure out how I might be able to do something like Finder does displaying disc Eject Image(When disc in

Launching preference panel of an application from another application

2008-09-04 Thread Arun
Hi I am a newbie into cocoa programming. Can anyone let me know how can we launch Preference panel of one cocoa application from another cocoa application. I am have written a cooca application in which Preference panel can be launched through by clicking on -> "Preferences...". Also i have writt

Core Data Form

2008-09-04 Thread Jon Buys
Hello, I have a problem with my app that is most likely very simple for someone with experience. I have a core data based application that I would like to be able to add objects to via a sheet that drops down when the user clicks the + button (or presses Command-N). On the sheet are two

RE: NSNotificationCenter removeObserver NOT working

2008-09-04 Thread Valentin Dan
Actually I kind of read it but not the right documentation ... in my X-Code (2.4.1) documentation it says it can be used as "nil". Only the documentation on the web says otherwise ... ___ Valentin Dan, Software Developer

Re: line break in Interface Builder

2008-09-04 Thread I. Savant
On Thu, Sep 4, 2008 at 3:26 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: > Option-Return? Well there's an 'option'. Have you tested this in a binding? I'm interested in hearing whether it actually works. -- I.S. ___ Cocoa-dev mailing list (Cocoa-de

Re: line break in Interface Builder

2008-09-04 Thread Randall Meadows
On Sep 4, 2008, at 1:14 PM, John Murphy wrote: I need to know how to create a line break in Interface Builder. "\n" does not work... I have a multiline text field that is populated using bindings, the value is modified using a display pattern: %{value1}@ %{value2}@ I need a line break betwee

Disabled NSButton

2008-09-04 Thread Ronnie B
Hi All! I am implementing a login panel. I would like to have 'Ok' button disabled as long as the password field is empty. Any advise? R. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: line break in Interface Builder

2008-09-04 Thread I. Savant
On Thu, Sep 4, 2008 at 3:26 PM, John Murphy <[EMAIL PROTECTED]> wrote: > This was actually my first thought as well, but I was hoping to avoid this > technique because I am using this as part of a tutorial I want to remain in > Interface Builder as much as possible for this particular lesson.

Re: line break in Interface Builder

2008-09-04 Thread Quincey Morris
On Sep 4, 2008, at 12:14, John Murphy wrote: I need to know how to create a line break in Interface Builder. "\n" does not work... I have a multiline text field that is populated using bindings, the value is modified using a display pattern: %{value1}@ %{value2}@ I need a line break between

Re: line break in Interface Builder

2008-09-04 Thread John Murphy
This was actually my first thought as well, but I was hoping to avoid this technique because I am using this as part of a tutorial I want to remain in Interface Builder as much as possible for this particular lesson. --- On Thu, 9/4/08, I. Savant <[EMAIL PROTECTED]> wrote: > From: I. Savant <

Re: Creating a runloop to handle specific mouse events

2008-09-04 Thread Uli Kusterer
On 04.09.2008, at 17:04, Benjamin Stiglitz wrote: This isn’t really polling as much as taking over the runloop and filtering out some events. There’s nothing really inelegant about this—it’s the call that powers the tracking loop in most of the controls in AppKit. If you really wanted, you c

Re: Notify when file moved

2008-09-04 Thread I. Savant
> Is there a way to have the background process notified when the pref pane is > moved (ie moved to the trash). Google "FSEvents Framework" (Leopard only). For pre-Leopard, google "BDAlias". -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.c

Notify when file moved

2008-09-04 Thread Trygve Inda
I have a pref pane and a background app tied to it. Sometimes, people try to trash the pref pane while the background process is running which orphans things a bit. Is there a way to have the background process notified when the pref pane is moved (ie moved to the trash). Note the background proc

Re: line break in Interface Builder

2008-09-04 Thread I. Savant
On Thu, Sep 4, 2008 at 3:14 PM, John Murphy <[EMAIL PROTECTED]> wrote: > I need to know how to create a line break in Interface Builder. > "\n" does not work... > I have a multiline text field that is populated using bindings, the value is > modified using a display pattern: > %{value1}@ %{value2

line break in Interface Builder

2008-09-04 Thread John Murphy
I need to know how to create a line break in Interface Builder. "\n" does not work... I have a multiline text field that is populated using bindings, the value is modified using a display pattern: %{value1}@ %{value2}@ I need a line break between these two values. Any ideas? __

Re: NSNotificationCenter removeObserver NOT working

2008-09-04 Thread Bill Bumgarner
On Sep 4, 2008, at 3:02 AM, Valentin Dan wrote: Oh, yeah ... I didn't read that part. I would have been easier though if it had acted like a wildcard :-) It would also be extremely problematic. You have no way of knowing what else might be observing that particular notification, nor what m

Re: understanding conversions between CF and NS datatypes

2008-09-04 Thread Michael Ash
On Thu, Sep 4, 2008 at 1:40 PM, Negm-Awad Amin <[EMAIL PROTECTED]> wrote: > > Am Do,04.09.2008 um 18:27 schrieb Michael Ash: > >> On Thu, Sep 4, 2008 at 10:41 AM, Negm-Awad Amin <[EMAIL PROTECTED]> >> wrote: >>> >>> Am Sa,30.08.2008 um 05:22 schrieb Michael Ash: >>> Ultimately the most importa

Re: Can I get a FILE* from Cocoa (NSFileHandle )?

2008-09-04 Thread Paul Archibald
Naturally as soon as I posted my query I noticed that there was a method I had not paid any attention to, and, of course, that is the one Jean-Daniel and Robert already knew about, and have been kind enough to point out to me. Thanks guys, I will be testing this out next. Regards, Paul On

Re: understanding conversions between CF and NS datatypes

2008-09-04 Thread Negm-Awad Amin
Am Do,04.09.2008 um 18:27 schrieb Michael Ash: On Thu, Sep 4, 2008 at 10:41 AM, Negm-Awad Amin <[EMAIL PROTECTED] > wrote: Am Sa,30.08.2008 um 05:22 schrieb Michael Ash: Ultimately the most important thing to understand about toll-free bridging (the link between CF and NS data types) is tha

Re: Can I get a FILE* from Cocoa (NSFileHandle )?

2008-09-04 Thread Dave Carrigan
On Sep 4, 2008, at 10:09 AM, Paul Archibald wrote: I have gotten some suggestions on a problem which require access to standard C calls. In particular, one poster suggested that I use some calls which require a FILE*, when all I have at this point are NSTask, NSPipe, and NSFileHandle objec

Re: Can I get a FILE* from Cocoa (NSFileHandle )?

2008-09-04 Thread Jean-Daniel Dupas
Le 4 sept. 08 à 19:09, Paul Archibald a écrit : I have gotten some suggestions on a problem which require access to standard C calls. In particular, one poster suggested that I use some calls which require a FILE*, when all I have at this point are NSTask, NSPipe, and NSFileHandle objects.

Can I get a FILE* from Cocoa (NSFileHandle )?

2008-09-04 Thread Paul Archibald
I have gotten some suggestions on a problem which require access to standard C calls. In particular, one poster suggested that I use some calls which require a FILE*, when all I have at this point are NSTask, NSPipe, and NSFileHandle objects. Is it possible to get a FILE* from an NSPipe or

Re: NSProgressIndicator drawing

2008-09-04 Thread Michael Ash
2008/9/4 Marcel Borsten <[EMAIL PROTECTED]>: > I'm using a NSProgressIndicator in my interface, but it shows some strange > edges around it when it is visible. The progress indicator is superimposed > over a background picture (which is loaded by a the view as background). > What am I doing wrong h

Re: understanding conversions between CF and NS datatypes

2008-09-04 Thread Michael Ash
On Thu, Sep 4, 2008 at 10:41 AM, Negm-Awad Amin <[EMAIL PROTECTED]> wrote: > > Am Sa,30.08.2008 um 05:22 schrieb Michael Ash: > >> Ultimately the most important thing to understand about toll-free >> bridging (the link between CF and NS data types) is that you don't >> have to convert anything. You

Re: understanding conversions between CF and NS datatypes

2008-09-04 Thread Sean McBride
On 8/29/08 10:38 AM, Allen Curtis said: >I am writing a Cocoa application for accessing a serial device. (IOKit) In >order to do this, you need to translate between CF and NS data types. (I >believe) You could probably make use of the AMSerialPort class (google it) to make thing a lot easier. --

Re: What Size My Window?

2008-09-04 Thread Gerriet M. Denkmann
On 4 Sep 2008, at 15:48, Ken Thomases wrote: On Sep 4, 2008, at 3:10 AM, Gerriet M. Denkmann wrote: For an ordinary window one can set in IB "Auto Save Name:" and everything works as expected. I can give it a nice size and position and the next time I open it, all is fine. But if this wi

Re: Creating a runloop to handle specific mouse events

2008-09-04 Thread Benjamin Stiglitz
At one point, my application blocks the runloop and I have to poll for mouse events by calling [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]. I'm not happy with the polling. It seems to me that creating a separate thread and configuring its runloop to process the events I'

Re: Why do all these methods of measuring string metrics with font attribute fail?

2008-09-04 Thread an0
I know the difference between string and font, and that between grapheme and glyph. However, I might miss the point that the size of the rendered string is not simply the sum the sizes of individual glyphs. There should be some extra space taken by spacing among and around glyphs. And some other mo

Re: Preference panes and Apple Help

2008-09-04 Thread Matt Neuburg
On Wed, 03 Sep 2008 09:27:05 +1000, Andrew White <[EMAIL PROTECTED]> said: >PS: I couldn't see any call to deallocate a FSRef. Does it get correctly >cleaned up as part of normal stack cleanup? > Andrew: Yes. :) Look in Files.h. Despite the "Ref" ending on the name (legacy), an FSRef is not a po

Re: understanding conversions between CF and NS datatypes

2008-09-04 Thread Negm-Awad Amin
Am Do,04.09.2008 um 16:41 schrieb Negm-Awad Amin: Am Sa,30.08.2008 um 05:22 schrieb Michael Ash: On Fri, Aug 29, 2008 at 1:38 PM, Allen Curtis <[EMAIL PROTECTED]> wrote: 1. Where can I get a better understanding of the data conversion between these different frameworks? 2. Ultimately the

Re: understanding conversions between CF and NS datatypes

2008-09-04 Thread Negm-Awad Amin
Am Sa,30.08.2008 um 05:22 schrieb Michael Ash: On Fri, Aug 29, 2008 at 1:38 PM, Allen Curtis <[EMAIL PROTECTED]> wrote: 1. Where can I get a better understanding of the data conversion between these different frameworks? 2. Ultimately the device path names will appear in a ComboBox. Was it

Re: NSProgressIndicator drawing

2008-09-04 Thread Marcel Borsten
The picture is drawn in a custom view with: [[NSColor colorWithPatternImage:image] set]; I don't think I can load the NSProgressIndicator as a subview in this way, so I am going to look at getting the image there in another way. Regards Marcel On 4 sep 2008, at 14:58, Mike Abdullah

Re: Why do all these methods of measuring string metrics with font attribute fail?

2008-09-04 Thread Graham Cox
On 4 Sep 2008, at 11:27 pm, an0 wrote: If they give no useful information for application programmers, Yes they do, but perhaps just not for your application. If you want to use glyphs as a graphic element for example, it's sometimes useful to query these sizes without having to try layi

Re: (no subject)

2008-09-04 Thread I. Savant
On Thu, Sep 4, 2008 at 7:57 AM, Thomas Davie <[EMAIL PROTECTED]> wrote: > As far as I know, you can't add toolbars to Safari. At a guess, this is by > design. ... and a very GOOD design, too: http://blogs.walkerart.org/newmedia/wp-content/uploads/2008/07/too-many-toolbars.jpg (just one exam

Re: Why do all these methods of measuring string metrics with font attribute fail?

2008-09-04 Thread an0
Thank you, Uli. I know there are some other classes and methods I can use and use more effectively and efficiently. But I'm just wondering what all these seemingly promising but actually lame APIs for. Why are they so confusing? In fact, I'm so eager to see what others are using them for and in wha

Re: [NSTableView] Drag and Drop issues with NSButton in Leopard

2008-09-04 Thread Stéphane Sudre
On Sep 3, 2008, at 12:27 AM, Corbin Dunn wrote: On Sep 2, 2008, at 1:59 PM, Stéphane Sudre wrote: I have some code that works OK on Tiger but does not on Leopard. I have a NSTableView with a column whose data cell is a NSButtonCell subclass. The NSButtonCell is set to be a checkbox/swi

Re: Why do all these methods of measuring string metrics with font attribute fail?

2008-09-04 Thread an0
On Thu, Sep 4, 2008 at 11:33 AM, Peter Ammon <[EMAIL PROTECTED]> wrote: > > On Sep 3, 2008, at 6:01 AM, an0 wrote: > >> I should declare up front that I know there are some arcane ways to >> measure string metrics using things like NSTextStorage, >> NSLayoutManager and the kin. >> Given the string

Bluetooth disconnect WiFi

2008-09-04 Thread Macarov Anatoli
I have PowerBook G4 and PowerPC. In Xcode and Obj - C, I use IOBluetooth.framework. Why when bluetooth is working WIFI connection is interrupted, and sometimes quits working. May be both devices use one and the same antenna or use the same frequency? Is there a way out?   __

Re: NSProgressIndicator drawing

2008-09-04 Thread Mike Abdullah
Are you making the progress indicator a subview of the picture? If not, that would explain your screenshot. On 4 Sep 2008, at 13:29, Marcel Borsten wrote: I'm using a NSProgressIndicator in my interface, but it shows some strange edges around it when it is visible. The progress indicator i

NSProgressIndicator drawing

2008-09-04 Thread Marcel Borsten
I'm using a NSProgressIndicator in my interface, but it shows some strange edges around it when it is visible. The progress indicator is superimposed over a background picture (which is loaded by a the view as background). What am I doing wrong here? <> Regards / Met vriendelijke groet,

Re: (no subject)

2008-09-04 Thread Thomas Davie
On 4 Sep 2008, at 12:54, [EMAIL PROTECTED] wrote: Hi All, I need to create a plug-in for safari. It should be a toolbar and when I'm installing it, it has to a prompt user to enter personal info and should be stored in same computer. When I'm using browser, where I need to fill the data

Changing the model behind contoller's back?

2008-09-04 Thread Oleg Krupnov
I am experimenting with Core Data model bound to NSTreeController bound to a custom view. When I change the model via controller like this: Widget* newWidget = [NSEntityDescription insertNewObjectForEntityForName:@"Widget" inManagedObjectContext:[self managedObjectContext]]; NSUInteger path[2] =

Re: NSPanel: resigning key focus?

2008-09-04 Thread Vijay Malhan
> >> This won't work because it doesn't know who should become the responder >> when it resigns. Instead, if you make some other object (window) key, this >> one should lose that status. (i.e. it can only jump if it has somewhere *to* >> jump). > > > The next object in responder chain should become

Re: NSPanel: resigning key focus?

2008-09-04 Thread Vijay Malhan
> > > This won't work because it doesn't know who should become the responder > when it resigns. Instead, if you make some other object (window) key, this > one should lose that status. (i.e. it can only jump if it has somewhere *to* > jump). The next object in responder chain should become first

(no subject)

2008-09-04 Thread mahaboob
Hi All, I need to create a plug-in for safari. It should be a toolbar and when I'm installing it, it has to a prompt user to enter personal info and should be stored in same computer. When I'm using browser, where I need to fill the data on form fields. I have one more thing, when I am clicking on

Re: Creating a runloop to handle specific mouse events

2008-09-04 Thread Berk Özer
It's a big legacy app. Refactoring the blocking routines into separate threads is major work. So I was wondering if I could kind of reverse the concept by controlling which events get channelled to which thread. The rendering functionality of the window server wouldn't need to be thread-saf

Re: NSPanel: resigning key focus?

2008-09-04 Thread Graham Cox
On 4 Sep 2008, at 8:26 pm, Vijay Malhan wrote: How do I make NSPanel(activating utility window) to resign key focus on an event (escape key down). I have tried: - resignFirstResponder - resignKeyWindow etc. None works. I have sub-classed NSPanel to get keydown events. This won't work bec

Re: NSMatrix mouse puzzle

2008-09-04 Thread Graham Cox
On 4 Sep 2008, at 4:14 pm, D.K. Johnston wrote: The reason I want a delay is that the user is supposed to have 10 seconds only to look at the data displayed in the matrix. Then it's cleared. (It's a memory test, to prevent drunks from starting a computer.) I was looking at NSTimer, but i

NSPanel: resigning key focus?

2008-09-04 Thread Vijay Malhan
How do I make NSPanel(activating utility window) to resign key focus on an event (escape key down). I have tried: - resignFirstResponder - resignKeyWindow etc. None works. I have sub-classed NSPanel to get keydown events. Thanks. - Vijay ___ Cocoa-de

RE: NSNotificationCenter removeObserver NOT working

2008-09-04 Thread Valentin Dan
Oh, yeah ... I didn't read that part. I would have been easier though if it had acted like a wildcard :-) Thanks! Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047 Email: [EMAIL PROTECTED] Office: +40 356-710158 Masstech

Re: NSNotificationCenter removeObserver NOT working

2008-09-04 Thread Ken Ferry
Hi Valentin, I think you're hoping that passing nil for the observer acts as a wildcard? It does not, check the docs. "Observer to remove from the dispatch table. Specify an observer to remove only entries for this observer. Must not be nil, or message will have no effect." -Ken On Thu, Sep 4,

NSNotificationCenter removeObserver NOT working

2008-09-04 Thread Valentin Dan
Hi, I'm trying to remove all notifications that have a certain object and I can't seem to get that to work. I'm doing something like this: [[NSNotificationCenter defaultCenter] removeObserver:nil name:nil object:myObject]; The notifications for this sender keep coming and that causes a

Re: What Size My Window?

2008-09-04 Thread Uli Kusterer
On 04.09.2008, at 10:10, Gerriet M. Denkmann wrote: 6. Other? So: is there some commonly agreed upon right strategy? Are there some official guidelines for document window sizes? You can save the size of your window in some plist in your document using -stringWithSavedFrame and restore it

Re: What Size My Window?

2008-09-04 Thread Ken Thomases
On Sep 4, 2008, at 3:10 AM, Gerriet M. Denkmann wrote: For an ordinary window one can set in IB "Auto Save Name:" and everything works as expected. I can give it a nice size and position and the next time I open it, all is fine. But if this window is a document, controlled by some NSDocum

Re: Why do all these methods of measuring string metrics with font attribute fail?

2008-09-04 Thread Uli Kusterer
On 04.09.2008, at 03:57, an0 wrote: IMO, the size of a string with font attribute is an intrinsic property determined only by the string and the font(and the layout of the string on the view, but here let's fix the layout to one single line); and the view used to render the attributed string shou

Re: Selection in NSCollectionView

2008-09-04 Thread Markus Spoettl
On Sep 4, 2008, at 12:56 AM, Quincey Morris wrote: The IconCollection sample code doesn't do this. If you drag over the collection, you get a marquee rectangle that selects everything inside it. I see no code to do this (beyond the hitTest override at the individual view level), so I conclud

Re: Creating a runloop to handle specific mouse events

2008-09-04 Thread Uli Kusterer
On 03.09.2008, at 18:36, Berk Özer wrote: At one point, my application blocks the runloop and I have to poll for mouse events by calling [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]. I'm not happy with the polling. It seems to me that creating a separate thread and confi

What Size My Window?

2008-09-04 Thread Gerriet M. Denkmann
For an ordinary window one can set in IB "Auto Save Name:" and everything works as expected. I can give it a nice size and position and the next time I open it, all is fine. But if this window is a document, controlled by some NSDocumentController, this Auto Save Name seems to be ingnored

Re: Selection in NSCollectionView

2008-09-04 Thread Quincey Morris
On Sep 3, 2008, at 23:32, Markus Spoettl wrote: I don't know about how to make this work with compound views - by that I mean views containing other standard Cocoa subviews. I can imagine things get considerably more difficult because those sub views all have their own event handling implem

  1   2   >