Window "snapping" to main screen

2012-05-03 Thread Eric Matecki
Hi everybody, I have two screens on my MacPro (10.7.3) When opening a window with the following code : // create a reference rect NSRect contentSize = NSMakeRect( iX, iY, iW, iH ); // allocate window NSUInteger styleMask = NSTitledWindowMask | NSClosableWindow

Re: Are there any way to update NSPanel content during dragging the panel ?

2012-05-03 Thread Yoshiaki Katayanagi
Hi, Jens >-mouseDragged: is called after the mouse button is pressed *within your view* >and the cursor moves. It has nothing to do with the window being dragged, >since after all thatís a mouse-down in the title bar, not your view. > >In general views donít care about and donít get notified ab

Re: NSTableView doesn't show data until I click on a header

2012-05-03 Thread Koen van der Drift
On Wed, May 2, 2012 at 10:15 PM, Koen van der Drift wrote: > Got it, it all works (I think :). > > The only thing that made me scratch my head was how to empty the whole > array. I am of course aware of [myArray removeAllObjects], but is that KVO compliant? I couldn't find that in the docs. - Ko

Re: NSTableView doesn't show data until I click on a header

2012-05-03 Thread Roland King
On May 3, 2012, at 6:33 PM, Koen van der Drift wrote: > On Wed, May 2, 2012 at 10:15 PM, Koen van der Drift > wrote: >> Got it, it all works (I think :). >> >> The only thing that made me scratch my head was how to empty the whole >> array. > > I am of course aware of [myArray removeAllObjects

Re: NSTableView doesn't show data until I click on a header

2012-05-03 Thread Koen van der Drift
On May 3, 2012, at 6:45 AM, Roland King wrote: > It's not, no. If you want a KVO way of removing all the objects use the > removeAtIndexes: or just set: with an empty array. You'll get > different types of KVO message (NSKeyValueChangeRemoval vs > NSKeyValueChangeSetting). Thanks! I was indee

Drawing unicode glpyhs

2012-05-03 Thread Thomas Davie
Hi all, I'm having an issue with drawing text via CGContextShowGlyphs, whereby it doesn't draw cyrilic (and presumably a variety of other exciting) characters. The code at https://github.com/beelsebob/OpenStreetPad/blob/master/OpenStreetPad/OSPMetaTileView.m#L710 (which goes via CTLineDraw) su

Re: Minimal document-based app

2012-05-03 Thread colo0logo
I feel that there should be a long blog +video post that new devs should be pointed to everytime this question(view/bad choice) crops up that keeps all of the details of the many emails points that could be like an Apple best of doc. I know for sure that I have gone that route as well and still ne

Re: Drawing unicode glpyhs

2012-05-03 Thread Kyle Sluder
On May 3, 2012, at 8:04 AM, Thomas Davie wrote: > It appears that this text path doesn't deal with font fallbacks correctly; > the docs for CTLineDraw though say that it's just an alias for repeatedly > calling CGContextShowGlyphs. That's not precisely what the docs say: "This is a convenienc

Re: NSTableView doesn't show data until I click on a header

2012-05-03 Thread Quincey Morris
On May 3, 2012, at 03:52 , Koen van der Drift wrote: > Thanks! I was indeed using removeAtIndexes: , but set seems a bit > easier to do. The setter is not quite so easy at it seems. You should declare the property with the 'copy' option, so that the parameter is copied by any @synthesized sett

Re: How can I prevent UITableViewRowAnimationAutomatic to slide down my UISearchBar?

2012-05-03 Thread Florian Pilz
After an extensive search on Google & StackOverFlow I found the right clue: the `UIScrollView`. The actual solution I was looking for and finally implemented can be found in an stackoverflow question: http://stackoverflow.com/questions/664781/change-default-scrolling-behavior-of-uitableview-sect

how to prevent TableView update on key repeat?

2012-05-03 Thread Marc Respass
Hi All, I have a master/detail table setup. When I select a row in the master, there are one or two detail tables that need to be updated. There are also a bunch of conditions that need to be checked to know what you can do to the master and the details. I have just finished a lot of optimizati

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Quincey Morris
On May 3, 2012, at 13:46 , Marc Respass wrote: > Can anyone point me in the right direction on this? How can I prevent > tableViewSelectionDidChange: from being called when the user is holding the > up or down arrow and trying to scroll rapidly through the table so I only > update when they sto

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-05-03 Thread Florian Pilz
Hi again. I just stumbled about this problem for another time and rethought Ulis explanation. The point of my writing is: Ulis explanation is wrong. The program compiles (with a warning) and runs perfectly fine. So basically Xcode tells me, that it must know the implementation details, which are

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-05-03 Thread Kyle Sluder
On May 3, 2012, at 2:54 PM, Florian Pilz wrote: > Hi again. I just stumbled about this problem for another time and rethought > Ulis explanation. The point of my writing is: Ulis explanation is wrong. The > program compiles (with a warning) and runs perfectly fine. So basically Xcode > tells m

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-05-03 Thread Marco S Hyman
> I just tried this, and it gives me a warning: That is what he's complaining about... the warning. To the OP: there is no way a compiler can tell if a class conforms to a protocol when the only thing it knows is the name of the protocol. Thus the warning. Maybe it will compile and run... maybe

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-05-03 Thread Kyle Sluder
On May 3, 2012, at 3:08 PM, Marco S Hyman wrote: >> I just tried this, and it gives me a warning: > > That is what he's complaining about... the warning. Except he just said he got it to compile without a warning, which means that whatever he's got going on is more complicated than the situati

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Marc Respass
Thanks Quincey (and Alex), I ended up finding a solution that almost works perfectly. - (void)tableViewSelectionDidChange:(NSNotification *)aNotification; { NSEvent *event = [NSApp currentEvent]; if(event != nil && [event type] == NSKeyDown && [event isARepeat]) { return;

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-05-03 Thread Quincey Morris
On May 3, 2012, at 15:13 , Kyle Sluder wrote: > Except the compiler produces the warning on the @interface, which provides no > information about whether the class actually implements the required protocol > methods. You don't need to redeclare methods from protocols you adopt. The > logical pl

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-05-03 Thread Kyle Sluder
On May 3, 2012, at 3:33 PM, Quincey Morris wrote: > On May 3, 2012, at 15:13 , Kyle Sluder wrote: > >> Except the compiler produces the warning on the @interface, which provides >> no information about whether the class actually implements the required >> protocol methods. You don't need to red

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Quincey Morris
On May 3, 2012, at 15:27 , Marc Respass wrote: > I ended up finding a solution that almost works perfectly. > > - (void)tableViewSelectionDidChange:(NSNotification *)aNotification; > { > NSEvent *event = [NSApp currentEvent]; > > if(event != nil && [event type] == NSKeyDown && [event isA

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Marc Respass
El may 3, 2012, a las 6:47 p.m., Quincey Morris escribió: > On May 3, 2012, at 15:27 , Marc Respass wrote: > >> I ended up finding a solution that almost works perfectly. >> >> - (void)tableViewSelectionDidChange:(NSNotification *)aNotification; >> { >> NSEvent *event = [NSApp currentEvent]

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Quincey Morris
On May 3, 2012, at 16:07 , Marc Respass wrote: > Do I have that correct? Yes, you do. :) Another way to think about it is this: the cancel suppresses all the selector performs except the last one. (There's *always* a last one because the cancel is done first.) The last one is the only one you

[Sandbox]Question on Design Guide

2012-05-03 Thread Yingshen Yu
Hi, In Apple's App Sandbox Design Guide, Powerbox and File System Access Outside of Your Container section, there's a paragraph. When a user of your app specifies they want to use file or a folder, Powerbox adds the associated path to your app’s sandbox. Say, for example, a user specifies

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-03 Thread Ben Kennedy
On 01 May 2012, at 9:09 pm, Quincey Morris wrote: > When you bind one or more table columns to an array controller, the table > view automatically binds its own content binding to the array controller > (presumably with some heuristic for choosing one out of several, if you > happened to bind d

Core Data: Setting attribute of deleted object causes it to remain in store

2012-05-03 Thread Jerry Krinock
I use Core Data to model an ordered tree of objects. Delete Rule from parent to children is Cascade. Because this is pre-Lion, ordering is done by my own 'index' attribute. Store type is In Memory. Deleting children with many siblings was expensive because, as each child was deleted, busines

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-05-03 Thread Jens Alfke
On May 3, 2012, at 2:54 PM, Florian Pilz wrote: > Hi again. I just stumbled about this problem for another time and rethought > Ulis explanation. The point of my writing is: Ulis explanation is wrong. The > program compiles (with a warning) and runs perfectly fine. Well, Uli was wrong in imply

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Marc Respass
El may 3, 2012, a las 7:27 p.m., Quincey Morris escribió: > On May 3, 2012, at 16:07 , Marc Respass wrote: > >> Do I have that correct? > > Yes, you do. :) > > Another way to think about it is this: the cancel suppresses all the selector > performs except the last one. (There's *always* a last

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Graham Cox
On 04/05/2012, at 11:25 AM, Marc Respass wrote: > Excellent. Thank you again. [NSEvent keyRepeatInterval] returned 0.83 so > I set the delay to 0.9 and it works perfectly. What was a slow process is now > as smooth as can be. It even works correctly if I hold the up/down arrow > until I ge

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-03 Thread Keary Suska
On May 3, 2012, at 6:11 PM, Ben Kennedy wrote: > I have re-worked things to take full advantage of bindings now, so as to get > the more desirable automated validation handling. However, I've now come up > against another challenge. > > As I may have alluded in an earlier posting, I need to be

Re: how to prevent TableView update on key repeat?

2012-05-03 Thread Marc Respass
El may 3, 2012, a las 10:38 p.m., Graham Cox escribió: > > On 04/05/2012, at 11:25 AM, Marc Respass wrote: > >> Excellent. Thank you again. [NSEvent keyRepeatInterval] returned 0.83 so >> I set the delay to 0.9 and it works perfectly. What was a slow process is >> now as smooth as can be.