Re: How to draw text with fade out effect?

2009-02-01 Thread Benjamin Dobson
On 29 Jan 2009, at 06:32:45, Kyle Sluder wrote: Perhaps the better solution is to draw the text as normal and then re-draw the background with the appropriate alpha on top. Am I missing something or could you use an NSGradient object to do this?

Re: Drawing Invalidation Question

2009-02-01 Thread Benjamin Dobson
On 1 Feb 2009, at 05:41:49, Seth Willits wrote: When inside of -[NSView drawRect:], what's the difference between - (void)drawRect:(NSRect)rect; { if ([self needsToDrawRect:someRect]) } ... and ... - (void)drawRect:(NSRect)rect; { if (NSIntersectsRect(rect,

Re: How to draw text with fade out effect?

2009-02-01 Thread Kyle Sluder
On Sun, Feb 1, 2009 at 4:35 AM, Benjamin Dobson importedfromsp...@googlemail.com wrote: Am I missing something or could you use an NSGradient object to do this? Sure, if you used a gradient or solid color to draw the background in the first place. Just give the starting color an alpha of 0 and

Re: Drawing Invalidation Question

2009-02-01 Thread William Jon Shipley
When inside of -[NSView drawRect:], what's the difference between - (void)drawRect:(NSRect)rect; { if ([self needsToDrawRect:someRect]) } - (void)drawRect:(NSRect)rect; { if (NSIntersectsRect(rect, someRect)) } The NSView keeps a list of the actual

Re: Using NSAppleScript With AXMakeProcessTrusted -- and/or, How To Indirectly Launch A Secure Agent

2009-02-01 Thread Bill Cheeseman
on 2009-01-31 4:44 PM, Tobias Zimmerman at automa...@gmail.com wrote: So, I have read up on the AXMakeProcessTrusted function, and seen the example at http://caffeinatedcocoa.com/blog/?p=12 on how to use this function. The problem is, using that approach causes the AppleScripts in my

Re: +[NSColor highlightColor] returns white instead of actual color

2009-02-01 Thread Jerry Krinock
Sorry, there's more to this +[NSColor selectedTextBackgroundColor] definitely gives a color based on System Preferences Appearance Highlight Color (for selected text). However, the color actually used in NSTableView is darker than this. For example, I set the color in System

unable to catch mouseDown

2009-02-01 Thread Jeffrey Goines
Hello. I have a custom view to which I add a NSMatrix as subview. I've set the target and action of the cells and it's working like I want. Now I want to introduce some mode in which the behaviour is different. A mouseclick should no longer trigger the action. I want to catch the click in the

Re: Drawing Invalidation Question

2009-02-01 Thread Kyle Sluder
From the View Programming Guide for Cocoa ( http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaViewsGuide/Optimizing/chapter_8_section_5.html#//apple_ref/doc/uid/TP40002978-CH11-SW4 ): In Mac OS X version 10.3 and later, views can constrain their drawing even further by using the

Re: +[NSColor highlightColor] returns white instead of actual color

2009-02-01 Thread Jerry Krinock
On 2009 Feb 01, at 2:50, Graham Cox wrote: The... colour set in System Preferences Appearance Highlight Color (for selected text) is returned by +[NSColor selectedTextBackgroundColor]. Thanks - indeed it is. And I found another one all by myself, with a good guess!... The

Re: Serial IO seems to be starving UI

2009-02-01 Thread Peter N Lewis
At 0:21 -0500 31/1/09, Michael Ash wrote: And even there, a continuous sequence of 0-delay performs should not lock the user out of your program. Seems to me that most non-user events should be interleaved in with user events based on when they occur, or at the very least given equal time. It's

Re: Core Data relationship disappears

2009-02-01 Thread Ivan C Myrvold
I just found out why, and it was as simple as I didn't check the To- Many Relationship check box in my xcdatamodel for the reverse relationship from Transponder to ServiceItem. After doing that, all the transponder data came into my table view. Ivan Den 1. feb.. 2009 kl. 01:43 skrev Jerry

Re: +[NSColor highlightColor] returns white instead of actual color

2009-02-01 Thread Graham Cox
On 1 Feb 2009, at 6:11 pm, Jerry Krinock wrote: except +[NSColor highlightColor] returns white instead of actual highlight color I have set in System Preferences Appearance, which is green The green (or whatever) colour set in System Preferences is returned by +[NSColor

Re: Drawing Invalidation Question

2009-02-01 Thread Graham Cox
On 1 Feb 2009, at 4:41 pm, Seth Willits wrote: When inside of -[NSView drawRect:], what's the difference between - (void)drawRect:(NSRect)rect; { if ([self needsToDrawRect:someRect]) } ... and ... - (void)drawRect:(NSRect)rect; { if (NSIntersectsRect(rect,

Off topic:Info on stack trace

2009-02-01 Thread Arnab Ganguly
Hi All, I am developing an application using COCOA, which generates stack trace for an application crash. I am able get the stack traces but issue is on the trace, the address information comes correctly but the symbols information is not correct. It is coming in ? format etc. Any idea or

Triggering NSTextView changes and bindings

2009-02-01 Thread Chris Idou
I've got an NSTextView whose attributeValue is bound to a core-data object. I've got a menu item which programmatically modifies the NSTextView's contents. The programmatic changes don't trigger a modification to the underlying object unless the user tabs to and exits the NSTextView manually.

Re: NSTextField with an date formatting

2009-02-01 Thread Matt Neuburg
On Sat, 31 Jan 2009 18:04:48 +, minapre999 minapre...@yahoo.com.au said: I have an NSTextField that is bound to a date in a Core Data program. The text field has an NSDateFormatter attached to it. All connections are set up using IB. The odd thing is that the user needs to enter the date

Minimum System Version Check - With Reliable Notification

2009-02-01 Thread I. Savant
List: Over the years, the standard mechanisms for requiring a minimum system version and displaying a kind message to the user have proven unreliable. I recently had the need to revisit this issue but (as far as I can tell) searching the list archives and all the other usual sources

Re: Triggering NSTextView changes and bindings

2009-02-01 Thread Michael Ash
On Sun, Feb 1, 2009 at 11:45 AM, Chris Idou idou...@yahoo.com wrote: I've got an NSTextView whose attributeValue is bound to a core-data object. I've got a menu item which programmatically modifies the NSTextView's contents. The programmatic changes don't trigger a modification to the

Re: NSTextField with an date formatting

2009-02-01 Thread minapre999
I put together a tiny little project it actually behaves perfectly as it is supposed to! As far as I can tell it is identical to my current project exept it just has the one entity with one attributes and one window with a table view of dates and a couple of text fields. The text

theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Carlo Gulliani
hi all, how can i use (make) the wave effect like in dashboard when i adding new widget? i'm trying to find info in google but i've not result. any ideas? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Mike Abdullah
Dashboard uses Core Image to achieve the effect. You may also be able to do the same thing on Leopard using Core Animation. On 1 Feb 2009, at 18:24, Carlo Gulliani wrote: hi all, how can i use (make) the wave effect like in dashboard when i adding new widget? i'm trying to find info in

Re: theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Carlo Gulliani
ok, thank for info, i'll try 2morrow From: Mike Abdullah cocoa...@mikeabdullah.net To: Carlo Gulliani carlogulli...@yahoo.com Cc: cocoa-dev@lists.apple.com Sent: Sunday, February 1, 2009 9:58:09 PM Subject: Re: theoretical, can i use the same wave effect, which

Re: theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Nathan
Back when I was trying to find tutorials/examples to learn CA, one of the links said it replicated the dashboard ripple effect. I never clicked on the link but it just came up in a google search. Try finding that. Good luck, Nate On Feb 1, 2009, at 1:24 PM, Carlo Gulliani

Re: Using NSAppleScript With AXMakeProcessTrusted -- and/or, How To Indirectly Launch A Secure Agent

2009-02-01 Thread Tobias Zimmerman
Bill- Thank you for the detailed and thoughtful response. I have done some further poking about and found instructions on granting accessibility permissions from the command line. After doing this on my working app, the AppleScripts no longer execute (error -2709), leading me to conclude that

Re: Minimum System Version Check - With Reliable Notification

2009-02-01 Thread Ken Ferry
Hi, I think the primary issue with this approach is that the app may not get as far as main. If the app uses a symbol from the frameworks that is not available at runtime, dyld will fail to load the binary. Aaron Hillegass gives a solution at http://weblog.bignerdranch.com/?p=13that involves

Re: Drawing Invalidation Question

2009-02-01 Thread Seth Willits
On Feb 1, 2009, at 3:07 AM, Graham Cox wrote: As others have mentioned, there is potentially a huge difference. If you invalidate a lot of small rectangles, the update region might be quite complex in shape; the rect passed in -drawRect: is only the bounds of this complex area. Which is

Re: unable to catch mouseDown

2009-02-01 Thread Ken Ferry
Hi Jeffrey, It behaves as if the Matrix lies on top of the view and not as if the click has to get through the custom view to the Matrix which is a subview. That is exactly how clicks work. The first view to receive mouseDown: is the _deepest_ view that it the click hits. Please see the Cocoa

Re: maximum theoretical speedup with dual quad processors

2009-02-01 Thread Michael Ash
On Sat, Jan 31, 2009 at 10:15 PM, Robert Marini wisequ...@gmail.com wrote: Easily reproduced doesn't always translate into guaranteed to occur. In my experience, using a single queue in your application is a sufficient safeguard as no system framework I've encountered causes an issue. Well,

Re: Minimum System Version Check - With Reliable Notification

2009-02-01 Thread I. Savant
On Feb 1, 2009, at 3:54 PM, Ken Ferry wrote: I think the primary issue with this approach is that the app may not get as far as main. If the app uses a symbol from the frameworks that is not available at runtime, dyld will fail to load the binary. Ah *ha* ... you are of course

Re: +[NSColor highlightColor] returns white instead of actual color

2009-02-01 Thread Ken Ferry
Hi jerry, My memory is that this is the alternateSelectedControlColor. I'm not at a mac right now, so I cannot verify. -Ken On Feb 1, 2009, at 6:46 AM, Jerry Krinock je...@ieee.org wrote: Sorry, there's more to this +[NSColor selectedTextBackgroundColor] definitely gives a color

Re: +[NSColor highlightColor] in NSTableView

2009-02-01 Thread Graham Cox
On 2 Feb 2009, at 1:46 am, Jerry Krinock wrote: +[NSColor selectedTextBackgroundColor] definitely gives a color based on System Preferences Appearance Highlight Color (for selected text). However, the color actually used in NSTableView is darker than this. For example, I set the color

Re: Off topic:Info on stack trace

2009-02-01 Thread Rob Keniger
On 02/02/2009, at 2:14 AM, Arnab Ganguly wrote: Hi All, I am developing an application using COCOA, which generates stack trace for an application crash. I am able get the stack traces but issue is on the trace, the address information comes correctly but the symbols information is not

Re: maximum theoretical speedup with dual quad processors

2009-02-01 Thread Rob Keniger
On 02/02/2009, at 7:27 AM, Michael Ash wrote: It crashes reliably on my Mac Pro. Note that it uses only one queue. Note that it only enqueues operations from the main thread. Note that it uses a very simple custom NSOperation subclass, and doesn't use NSInvocationOperation at all. Note that it

[MEET] CocoaHeads Frankfurt, 2.2.2009 8pm

2009-02-01 Thread Torsten Curdt
Just a quick reminder: Cocoa chit-chat, code and beers. Tonight at Club Voltaire. http://cocoaheads.org/de/Frankfurt/index.html Hope to see you there! cheers -- Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Auto-saving documents

2009-02-01 Thread Chris Idou
I want my app to automatically save a document when the user closes its window, without prompting the user. I had thought I'd found a solution by overriding - (void)canCloseDocumentWithDelegate:(id)delegate shouldCloseSelector:(SEL)shouldCloseSelector contextInfo:(void*)contextInfo to call

Re: maximum theoretical speedup with dual quad processors

2009-02-01 Thread Peter N Lewis
At 16:27 -0500 1/2/09, Michael Ash wrote: It crashes reliably on my Mac Pro. Note that it uses only one queue. Note that it only enqueues operations from the main thread. Note that it uses a very simple custom NSOperation subclass, and doesn't use NSInvocationOperation at all. Note that it does

Re: Drawing Invalidation Question

2009-02-01 Thread Graham Cox
On 2 Feb 2009, at 8:05 am, Seth Willits wrote: So it's not optimized to reject anything outside of the sub- rectangles? This sentence really threw me off. In retrospect and I can see that it simply means that it's doing a simple check up front like below, but it's a rather poorly worded

Re: Auto-saving documents

2009-02-01 Thread Kyle Sluder
On Sun, Feb 1, 2009 at 6:52 PM, Chris Idou idou...@yahoo.com wrote: I want my app to automatically save a document when the user closes its window, without prompting the user. What do you want to do if the user hasn't saved the document? Do you want to prompt the user, save to a default

Re: maximum theoretical speedup with dual quad processors

2009-02-01 Thread Michael Ash
On Sun, Feb 1, 2009 at 8:04 PM, Peter N Lewis pe...@stairways.com.au wrote: At 16:27 -0500 1/2/09, Michael Ash wrote: It crashes reliably on my Mac Pro. Note that it uses only one queue. Note that it only enqueues operations from the main thread. Note that it uses a very simple custom

Re: Drawing Invalidation Question

2009-02-01 Thread Michael Ash
On Sun, Feb 1, 2009 at 4:05 PM, Seth Willits sli...@araelium.com wrote: On Feb 1, 2009, at 3:07 AM, Graham Cox wrote: As others have mentioned, there is potentially a huge difference. If you invalidate a lot of small rectangles, the update region might be quite complex in shape; the rect

Re: Can we render QCRenderer in CAOpenGLLayer..?

2009-02-01 Thread Anshul jain
Thanks Gordon for the information but i am not using the garbage collection. Is there any problem with my code is there any sample code for it.. On 31-Jan-09, at 10:31 PM, Gordon Apple wrote: Just curious - are you using garbage collection? We recently determined there is a

Re: Auto-saving documents

2009-02-01 Thread Chris Idou
On Sun, Feb 1, 2009 at 6:52 PM, Chris Idou idou...@yahoo.com wrote: I want my app to automatically save a document when the user closes its window, without prompting the user. What do you want to do if the user hasn't saved the document? Do you want to prompt the user, save to a default

QCRenderer method createSnapshotImageOfType: returning nil

2009-02-01 Thread Anshul jain
I am trying to Play a composition in a OPenGL layer. I have read in Documentation that we can do that using QCRenderer. Here is my initialization code - (CGLContextObj)copyCGLContextForPixelFormat: (CGLPixelFormatObj)pixelFormat { CGLContextObj object = [super

Cg Geometry Shader

2009-02-01 Thread Kaluriel Hargrove
___ 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/Update your Subscription:

Question on insertObject: inKeyAtIndex

2009-02-01 Thread Phillip Hall
I have the following setup 1 custom model class (Vegetable) 1 class (AppController) Has an NSMutableArray (vegetables) property. 1 NSArrayController. Object controller set to Class with Class name set to Vegetable. Content Array is bound to AppController.vegetables I have a button on my

NSXMLParser and Unicode/Foreign Character problems

2009-02-01 Thread Todd Atkins
I'm reading in a validated XML file via NSXMLParser and things work very well except when it comes to elements that contain foreign charcters such as ß, ü, ä, etc. For example, i have an element like so: g:nameGroßefehn-4 - Großefehnkanal/g:name I want to extract the contents, Großefehn-4 -

Receive drop event on dock icon

2009-02-01 Thread Johannes Plunien
Hi, i've been searching without success for a hint how to receive a event when a file was dropped on my applications dock icon. I've already configured my apps properties to allow extensions png jpg jpeg gif with store type Binary and Role viewer. So far i can drop images to the dock

Re: NSXMLParser and Unicode/Foreign Character problems

2009-02-01 Thread Stephen J. Butler
On Sun, Feb 1, 2009 at 1:36 PM, Todd Atkins toddatk...@gmail.com wrote: What happens is that gNames ends up with the truncated string value. The output of NSLog, though, shows: 2009-02-01 12:45:09.538 [320:10b] String: Gro 2009-02-01 12:45:09.538 [320:10b] String: ßefehn-4 - Großefehnkanal

becomeFirstResponder override issue

2009-02-01 Thread Chris Anderson
Hello! I've created a subclass of NSDatePicker to catch when a date picker has focus. I have overridden the becomeFirstResponder method and indeed it detects when it has focus. The code inside the method does work except for any IBOutlets that I may have connected. They don't respond to

Re: Question on insertObject: inKeyAtIndex

2009-02-01 Thread mmalc Crawford
On Jan 31, 2009, at 9:35 PM, Phillip Hall wrote: I then read about the insertObject: inKeyAtIndex: method. Reading the documentation it seems this should be called by the NSArrayController if its implemented by its content array (in my case AppController).

Re: theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Carlo Gulliani
yeah, i've found one f examples which demonstrating CIRippleTransition. thanks From: Nathan lipton_lo...@mac.com To: Carlo Gulliani carlogulli...@yahoo.com Cc: cocoa-dev@lists.apple.com Sent: Sunday, February 1, 2009 11:12:20 PM Subject: Re: theoretical, can i