Re: Drawing when app is in active

2012-04-01 Thread Graham Cox
On 24/03/2012, at 9:30 PM, Jonathan Guy wrote: > Hi all > This is must be the most simple a puzzling problem I've had. Take a new app, > create a custom view class with a drawrect of > > - (void)drawRect:(NSRect)dirtyRect > { >if ([NSApp isActive]) { > [[NSColor redColor] set]

Re: Stenography

2012-04-01 Thread Graham Cox
On 28/03/2012, at 7:19 AM, deoxy t2 wrote: > > > Hello friends. > I'm new to the list and new in Objective-C and Apple programming and I have a > very timely question, I want to manipulate images to develop stenography, but > do not know where begin. I'm reading:1.-vImage Programming Guide2 C

Re: drawRect using a Category

2012-04-01 Thread Per Bull Holmen
Den 03:46 1. april 2012 skrev Peter Teeson følgende: > Thanks very much for your input guys. > > David: > I had carefully read the Categories and Extensions page in OBJ-C Programming > Language. > And, based on the first paragraph, assumed I could add functionality to > drawRect for my particula

Re: drawing lines in and NSTextView

2012-04-01 Thread jonat...@mugginsoft.com
On 31 Mar 2012, at 13:08, Koen van der Drift wrote: > I have an NSTextView to which I want to add some lines that connect > certain words. When the text changes, either by editing, or scrolling, > that lines should follow the words. I thought about using > CoreAnimation, but text in a CATextLay

Re: NSDocument disc undo stack

2012-04-01 Thread Mike Abdullah
I think it's fair to say this is only true for a 64 bit app. In a 32 bit app, it's fairly easy to exhaust your address space if all deleted files are kept in-memory. On 26 Mar 2012, at 00:57, Steven wrote: > Thanks for the info Graham. > I'm using NSUndoManager. I thought that many large objec

Re: Stenography

2012-04-01 Thread Gregory Weston
deoxy t2 wrote: > I'm new to the list and new in Objective-C and Apple programming and I have a > very timely question, I want to manipulate images to develop stenography, but > do not know where begin. I'm reading:1.-vImage Programming Guide2 Core Image > Programming Guide > But it is not clea

Re: drawing lines in and NSTextView

2012-04-01 Thread Koen van der Drift
Thanks for the response, very helpful. Also the link to the iTunes U session. There is a wealth of info I was not aware of that it is available for non-WWDC attendees. - Koen. On Mar 31, 2012, at 9:41 PM, Douglas Davidson wrote: > > > On Mar 31, 2012, at 6:09 PM, Graham Cox wrote: > >> >

Re: NSDocument disc undo stack

2012-04-01 Thread Graham Cox
On 25/03/2012, at 5:34 AM, Doug Clinton wrote: > I don't know if this was the issue that Steven was asking about, but I've > been wondering if there is a recommended way to persist the undo stack so > that it's still available if you restart the app, or close and re-open the > document. It's a

Re: NSDocument disc undo stack

2012-04-01 Thread James Montgomerie
I don't think it's likely to be true in practice on 64-bit systems either. In theory, yes, the old data could get paged out, and will not be paged back in until the user uses it. In practice though, unless these pieces of old data are big, contiguous buffers taking up pages by themselves, the o

"Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Nick
Hello I am trying to implement a zooming of a content view (actually it is a PDFView page) using a mouse scrolling wheel. What I want to have in the end - is to have the final content view zoomed in or out in a way that the point, where the mouse was located, does not move during this zooming oper

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Dave Fernandes
Just a comment about the UI… I find this behavior horribly counter-intuitive. I always end up zooming when I mean to pan. On 2012-04-01, at 11:28 AM, Nick wrote: > Hello > > I am trying to implement a zooming of a content view (actually it is a > PDFView page) using a mouse scrolling wheel. > W

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Alex Zavatone
Dave, while I can see that you may want the mouse wheel to navigate the current map, does it not make more sense to allow the mouse wheel to zoom in or out and then hold the mouse button down and drag left and right to pan? If you use the mouse wheel to pan, what is naturally your zoom control?

crash on OS X when popover closes

2012-04-01 Thread Martin Hewitson
Dear list, I've received a crash report from a customer which I'm unable to reproduce and have not heard of from any other user. The action needed for the customer to reproduce the crash is such a common one, that it seems that all other customers should hit the same issue. That makes me wonder

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Nick
This is a very customized application, it is not intended for public use. Just wondering if someone could help me with the math to create this zooming effect.. Alex Zavatone wrote: > Dave, while I can see that you may want the mouse wheel to navigate the > current map, does it not make more sens

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Per Bull Holmen
Den 17:28 1. april 2012 skrev Nick følgende: > However, I can't figure out how to make zooming like google maps does, > preserving that mouse "anchor" point's location. Could you give me a > hint? > > Thank you I can't give you readymade example code, but here's the steps: 1) Find the mouse loc

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Alex Zavatone
There is code from Paul Hegarty's class on UImageView that works really easily with the pinch gesture. I'll look to see if I have any code handy. On Apr 1, 2012, at 12:42 PM, Nick wrote: > This is a very customized application, it is not intended for public use. > Just wondering if someone coul

Re: crash on OS X when popover closes

2012-04-01 Thread Kyle Sluder
On Apr 1, 2012, at 9:38 AM, Martin Hewitson wrote: > Dear list, > > I've received a crash report from a customer which I'm unable to reproduce > and have not heard of from any other user. The action needed for the customer > to reproduce the crash is such a common one, that it seems that all o

Re: crash on OS X when popover closes

2012-04-01 Thread Martin Hewitson
Not sure. I'll ask the customer. That's a bit the problem at the moment - I'm unsure what to ask them to do next. Thanks for the idea, Martin On Apr 1, 2012, at 07:03 PM, Kyle Sluder wrote: > On Apr 1, 2012, at 9:38 AM, Martin Hewitson > wrote: > >> Dear list, >> >> I've received a crash r

Re: Order of Finder labels

2012-04-01 Thread Fritz Anderson
On 31 Mar 2012, at 7:53 PM, Seth Willits wrote: > On Mar 31, 2012, at 5:29 PM, Fritz Anderson wrote: > >> +[NSWorkspace fileLabelColors] returns the available label colors in the >> same order as the index. >> >> What I'd really like is to use the same order as appears in the preferences, >> a

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Per Bull Holmen
Den 18:51 1. april 2012 skrev Per Bull Holmen følgende: > Den 17:28 1. april 2012 skrev Nick følgende: > >> However, I can't figure out how to make zooming like google maps does, >> preserving that mouse "anchor" point's location. Could you give me a >> hint? >> >> Thank you > > I can't give you

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Dave Fernandes
I guess it makes some sense with a mouse wheel, but doesn't seem right with a Magic Mouse. On a trackpad, at least there is a pinch zoom gesture. On 2012-04-01, at 12:05 PM, Alex Zavatone wrote: > Dave, while I can see that you may want the mouse wheel to navigate the > current map, does it not

Re: crash on OS X when popover closes

2012-04-01 Thread Ken Thomases
On Apr 1, 2012, at 11:38 AM, Martin Hewitson wrote: > I've received a crash report from a customer which I'm unable to reproduce > and have not heard of from any other user. The action needed for the customer > to reproduce the crash is such a common one, that it seems that all other > customer

Re: "Google maps"-like zooming of NSScrollView's content view

2012-04-01 Thread Alex Zavatone
On Apr 1, 2012, at 3:59 PM, Dave Fernandes wrote: > I guess it makes some sense with a mouse wheel, but doesn't seem right with a > Magic Mouse. On a trackpad, at least there is a pinch zoom gesture. > You could have buttons on the screen to zoom in and out , as in google maps and use the scr

Re: Convert to Objective-C ARC Syntax Error

2012-04-01 Thread Dave Zarzycki
Brad, This looks similar to Radar 10434539. Let me know if this works: simplify the header includes in your code to just #import and just link against Quartz. If your code is already doing this, then let us know. Thanks! davez On Mar 31, 2012, at 3:39 PM, Brad Stone wrote: > I used "Edit

Re: Order of Finder labels

2012-04-01 Thread Seth Willits
On Apr 1, 2012, at 10:33 AM, Fritz Anderson wrote: >> Why wouldn't it be? Just display them in the same order as Finder and don't >> rely on the display index being the same as the label index you use in the >> assignment. I don't really see the problem. (I've done this.) > > Hard-coding the or

Re: crash on OS X when popover closes

2012-04-01 Thread Alex Zavatone
On Apr 1, 2012, at 4:54 PM, Ken Thomases wrote: > On Apr 1, 2012, at 11:38 AM, Martin Hewitson wrote: > >> I've received a crash report from a customer which I'm unable to reproduce >> and have not heard of from any other user. The action needed for the >> customer to reproduce the crash is su

Re: drawRect using a Category

2012-04-01 Thread Jens Alfke
On Mar 31, 2012, at 6:46 PM, Peter Teeson wrote: > In my app there is only the one NSMatrix instance There's no way to tell, really. For all I know, the Open or Save panels might use NSMatrix. Or the Find panel or the font panel. Heck, I believe in the old days of OpenStep, menus were impleme

Re: Drawing when app is in active

2012-04-01 Thread Jens Alfke
On Mar 24, 2012, at 3:30 AM, Jonathan Guy wrote: > If I resize the window it suddenly draws red but deactivating a reactivating > the app is not redrawing the view with the correct color. What is going on > here? Activating/deactivating an app does not force all of its views to redraw! That w