Re: cString

2008-11-27 Thread Mattias Arrelid
On Thu, Nov 27, 2008 at 20:48, Luca Ciciriello [EMAIL PROTECTED] wrote: Hi All.Recently I've installed the new Xcode 3.1.2 and I've removed my old Xcode 2.5.I've compiled with Xcode 3.1.2 (using the optional compiler GCC 4.2) one of the my Objective-C++ project. No problem, but I've got a

Duplicating NSWindow's title bar buttons

2008-11-02 Thread Mattias Arrelid
Hi list, In NSWindow there's the following two functions: - standardWindowButton: + standardWindowButton:forStyleMask: The first one returns a reference to the actual window button in question. The second one, the class method, returns a new instance of a window button. This button (returned

Re: Menu item issues when programmatically updating an application's main menu

2008-09-29 Thread Mattias Arrelid
On Wed, Sep 24, 2008 at 02:32, Kyle Sluder [EMAIL PROTECTED] wrote: Your best bet might be to file a bug report at http://bugreport.apple.com . Done, see rdar://problem/6253819. Thanks Mattias ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Receiving mouseEnter and mouseExit events.

2008-09-24 Thread Mattias Arrelid
On Tue, Aug 19, 2008 at 23:50, David Alter [EMAIL PROTECTED] wrote: I just realized that NSTrackingArea is 10.5 and up. I need to support 10.4. mouseEntered and mouseExited have been part of NSResponder from 10.0. To receive these events in 10.4 what should I do? Sorry for the very late reply,

Menu item issues when programmatically updating an application's main menu

2008-09-23 Thread Mattias Arrelid
Hi list, We have some code in an application of ours that replaces the main menu using NSMenu's setMainMenu:. This has been working just fine since day one but ever since the introduction of Leopard we have noticed some strange behavior with the Help menu. I have also noticed this behavior in

Assert trigged in -[NSEvent eventNumber]

2008-06-23 Thread Mattias Arrelid
After having tried to debug an error related to mouse tracking (using MATrackingAreaw, [1]) a few weeks ago, I occasionally saw an error message from the system in the console log. The error claim that an assert has failed in -[NSEvent eventNumber] - and each time this occured, our custom mouse

Re: Tab-based (document-based?) application

2008-06-19 Thread Mattias Arrelid
On Thu, Jun 19, 2008 at 7:04 AM, Jacob Bandes-Storch [EMAIL PROTECTED] wrote: I'm creating an application that will have an arbitrary number of basically identical windows (document-like) which each have tabs (or something of the sort) in them that represent the actual documents, per se. Would

Re: capture modifier key events

2008-06-18 Thread Mattias Arrelid
Hi Apparao, On Wed, Jun 18, 2008 at 7:55 AM, Apparao Mulpuri [EMAIL PROTECTED] wrote: I have a NSTextField, in which i have to update with new string value when ever user presses Cmd, Control or Option keys. I have tried with keyDown and controlDidChange methods. These are working with

Re: opening default email and browser from the code

2008-06-17 Thread Mattias Arrelid
2008/6/17 Angelo Chen [EMAIL PROTECTED]: Hi, I got two questions: 1) I have an email address in the code, I'd like to open default mailing program from the code with the email address as the recipient. 2) I have a NSImageView, when mouse move over it, the cursor should be changed to a

Re: clickable NSImageView

2008-06-17 Thread Mattias Arrelid
Hi Angelo, 2008/6/17 Angelo Chen [EMAIL PROTECTED]: Hi, I use the code at the end to let user click on an image and open a URL, this works, but not really satisfactory as when the mouse is moved over the image, the cursor was not changed to point-hand shape, any idea to improve this?

Re: NSTextView and changing the selected text's color

2008-06-12 Thread Mattias Arrelid
On Wed, Jun 11, 2008 at 6:15 PM, Mattias Arrelid [EMAIL PROTECTED] wrote: Hi Douglas, On Wed, Jun 11, 2008 at 5:30 PM, Douglas Davidson [EMAIL PROTECTED] wrote: On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote: Haven't anyone stumbled upon something similar, or a solution to this? I

Re: NSTextView and changing the selected text's color

2008-06-12 Thread Mattias Arrelid
On Thu, Jun 12, 2008 at 11:14 AM, Mattias Arrelid [EMAIL PROTECTED] wrote: On Wed, Jun 11, 2008 at 6:15 PM, Mattias Arrelid [EMAIL PROTECTED] wrote: Hi Douglas, On Wed, Jun 11, 2008 at 5:30 PM, Douglas Davidson [EMAIL PROTECTED] wrote: On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote

Re: NSTextView and changing the selected text's color

2008-06-12 Thread Mattias Arrelid
On Thu, Jun 12, 2008 at 5:40 PM, Douglas Davidson [EMAIL PROTECTED] wrote: On Jun 12, 2008, at 2:47 AM, Mattias Arrelid wrote: It turns out that if you set the NSForegroundColorAttributeName of the attributed string in NSTextView's text storage, the call to setSelectedTextAttributes: doesn't

Fwd: NSTextView and changing the selected text's color

2008-06-11 Thread Mattias Arrelid
Haven't anyone stumbled upon something similar, or a solution to this? Best regards Mattias -- Forwarded message -- From: Mattias Arrelid [EMAIL PROTECTED] Date: Fri, May 30, 2008 at 1:25 PM Subject: NSTextView and changing the selected text's color To: cocoa-dev@lists.apple.com

Re: NSTextView and changing the selected text's color

2008-06-11 Thread Mattias Arrelid
Hi Douglas, On Wed, Jun 11, 2008 at 5:30 PM, Douglas Davidson [EMAIL PROTECTED] wrote: On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote: Haven't anyone stumbled upon something similar, or a solution to this? I believe it was answered. You don't want to use setMarkedTextAttributes

NSTextView and changing the selected text's color

2008-05-30 Thread Mattias Arrelid
Hi everyone, We have a subclass of NSTextView (SPTextView). A couple of these have some text with [NSColor grayColor] set as the NSForegroundColorAttributeName. It looks good, but when the user starts selecting text things go bad™. Since grey on light blue (the default system selection color)

[ANN] CocoaHeads, Stockholm (Sweden) - First meeting ever, June 2

2008-05-28 Thread Mattias Arrelid
Hi everyone, It is with great joy I invite you to the very first CocoaHeads Stockholm (Sweden) session. We'll kick of next Monday (June 02) at the Spotify office at Humlegårdsgatan 20 (Stockholm), at 18:00 CET. We'll start with a short introduction of ourselves, and then talk about the coming

Re: NSTextfields and keyboard equivalents - am I missing something?

2008-04-22 Thread Mattias Arrelid
be reasonable if the menu item's target would get the action message). What do you think? Mattias Arrelid wrote: I have a simple test application with a few custom menu items. Let's assume that _none_ of these items has a key equivalent of COMMAND + (right arrow) for now. When the first

NSTextfields and keyboard equivalents - am I missing something?

2008-04-21 Thread Mattias Arrelid
I have a simple test application with a few custom menu items. Let's assume that _none_ of these items has a key equivalent of COMMAND + (right arrow) for now. When the first responder of the application is an NSTextField, and the user produces COMMAND + (right arrow), the insertion point is

mouseMoved: behaving correctly when application isn't frontmost

2008-04-14 Thread Mattias Arrelid
Hi all, Our application it setup to forward all mouse moved events to our content view, regardless if our application is the frontmost one. Now, we have some areas of the content view that are to be highlighted when the mouse hovers over them. This works ok (with work, I mean it looks acceptable)

Re: Relaunching an application

2008-03-03 Thread Mattias Arrelid
On 3 mar 2008, at 18.14, Nir Soffer wrote: On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? A scenario could be that the entire contents of the .app bundle has been replaced with new stuff (e.g. the case

Combining NSLineBreakByWordWrapping + NSLineBreakByTruncatingTail in NSTextView

2008-02-28 Thread Mattias Arrelid
Hi there. Occasionally I need to display some very long strings. These string can have sentences that would span several lines depending on the width of my NSTextView. Example of such texts: This is the first line which spans over to the second line and then it stops. This is another