Re: Close Modal window after sheet ends

2015-08-24 Thread Ken Thomases
On Aug 24, 2015, at 12:53 PM, Alex Kac wrote: > > I’ve also tried this…and the code in the dispatch_async never gets called. > I’ve seen other code on github that does something similar so obviously it > *should* work. > > - (IBAction)enterRegCode:(id)sender { > > registrationWind

Re: NSSegmentedControl & NSSegmentStyleSeparated & autolayout

2015-08-26 Thread Ken Thomases
On Aug 26, 2015, at 7:04 AM, Jacek Oleksy wrote: > I want to set NSSegmentStyleSeparated on my NSSegmentedControl > (managed by autolayout). However, when I create constraints for the > parent view, I get an exception: > > Assertion failure in -[NSSegmentedControl ns_widgetType], > /SourceCache/

Re: Auto-Layout Again

2015-08-27 Thread Ken Thomases
On Aug 27, 2015, at 8:41 AM, Dave wrote: > I’m trying to setup a StackView inside a ScrollView, I’ve based by code on > the InfoBarView and the TSInfoBarView sample Apps. Basically I have the > following elements: > > LTWDetailWindowController This is the main Window Controller, the Windo

Re: Auto-Layout Again

2015-08-27 Thread Ken Thomases
On Aug 27, 2015, at 10:46 AM, Dave wrote: > >> On 27 Aug 2015, at 16:29, Ken Thomases wrote: >> >> You want the stack view to size itself to match the scroll view? Why? That >> would mean that the scroll view would never scroll, defeating the purpose of >>

Re: Autolayout requiring NSDisableScreenUpdates

2015-08-30 Thread Ken Thomases
On Aug 30, 2015, at 5:57 PM, Seth Willits wrote: > My window's UI mainly consists of a stack view, but in the window's xib, > there's nothing in the stack view to begin with. This means that after the > xib loads, the window is tiny (like 70 x40). > > In windowDidLoad I'm adding views to the s

Re: How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Ken Thomases
On Aug 31, 2015, at 9:50 PM, Scott Ribe wrote: > > Normally, when a parent exits, all child processes are killed. This is not true. > This is not specific to terminal/tty sessions. Yes, it is. Try the following program. The parent will print the child's PID and exit (by falling out of main(

Re: How to intercept the space key in an NSTextField

2015-09-04 Thread Ken Thomases
On Jun 8, 2015, at 8:01 AM, Frank Bitterlich wrote: > I’m having trouble finding a solution for a seemingly simple problem. This email is kind of old and just emerged from moderation limbo, but in case you're still stuck… > I need an NSTextField that will „catch“ the space key, and instead of

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Ken Thomases
On Sep 6, 2015, at 10:59 AM, Alex Hall wrote: > Since I'm using arrays, albeit retrieved from a dictionary, I thought an > NSArrayController would do the job. I'm not sure what to enter for the key > path, though. My view controller has a reference to both my table and my data > model object,

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Ken Thomases
On Sep 7, 2015, at 12:01 AM, Alex Hall wrote: > My first step is to make a KVO-compliant backing store, because Swift arrays > won't do the job. As you said, my goal of updating an array and having my > table automagically update itself to match the array just won't happen. What > I need is a

Re: Auto Layout, NSScrollView and NSStackView - Adding View to StackView

2015-09-07 Thread Ken Thomases
On Sep 7, 2015, at 2:40 PM, Dave wrote: > The ScrollView/StackView combo that myDetailView added to on the > addView:inGravity call, is wider than the DetailView. What I’d like to happen > is that the Detail is Stretched/Shrunk to match the width of the Scroll > View/StackView. I think I need

Re: Auto Layout, NSScrollView and NSStackView - Adding View to StackView

2015-09-07 Thread Ken Thomases
On Sep 7, 2015, at 3:14 PM, Dave wrote: > Thanks a lot for this. You're welcome. >> You should set leading and trailing constraints between the stack view and >> the clip view so that the stack view is as wide as the clip view. > > I’ve got the following constraints on the StackView: > > Ho

Re: Getting started with Cocoa Bindings in My Project?

2015-09-07 Thread Ken Thomases
On Sep 7, 2015, at 7:25 AM, Alex Hall wrote: > Sure. This is a Twitter app, which shows one type of tweet at a time. That > is, the table can show one of home, mentions, DMs, favorites, RTs of the > user, Twitter searches, tweets from a different user, etc. When an array is > "active", right n

Re: Getting started with Cocoa Bindings in My Project?

2015-09-07 Thread Ken Thomases
On Sep 7, 2015, at 12:01 AM, Alex Hall wrote: > Next is the problem of accessing the current MyKVOCClass object from the view > controller, where my model is instantiated. I'll need a computed property for > this, which I'll call currentModelArray. This should return a reference to > the curre

Re: NSTextView Question

2015-09-08 Thread Ken Thomases
On Sep 8, 2015, at 9:22 AM, Dave wrote: > I’ve got an NSTextView that’s working in that it Scrolls ok vertically, but > If I have a long line, it wraps instead of clipping the line and allowing > Horizontal Scrolling. I’ve looked at the properties of the ScrollView and the > underlying TextVie

Re: Basics of Cocoa Bindings

2015-09-08 Thread Ken Thomases
On Sep 8, 2015, at 11:04 PM, Alex Hall wrote: > I've created a new thread, because I obviously don't understand nearly as > much about Cocoa Bindings as I thought I did. Bindings is a complex and advanced topic. It's built on top of other technologies, which you need to understand and be com

Re: Lost memory, GCD, dispatch sources, Cocoa bindings & User interface

2015-09-16 Thread Ken Thomases
On Sep 16, 2015, at 12:56 PM, Charles Srstka wrote: > - (void)setFoo:(MyObject *)foo { > dispatch_async(dispatch_get_main_queue(), ^{ > [self willChangeValueForKey:@“foo”]; > }); > > self.privateFoo = foo; > > dispatch_async(dispatch_get_main_queue(), ^{ >

Re: NSTableView update issue

2015-09-26 Thread Ken Thomases
On Sep 26, 2015, at 5:13 AM, Peter Hudson wrote: > I have an NSTableView in my app which has started to behave differently on > 10.10. > > I periodically change the datasource and delegate to the table view ( which > is on screen ) > This has worked perfectly up until recently. > > > After h

Re: -[NSThread start] blocks ?!?

2015-09-27 Thread Ken Thomases
On Sep 26, 2015, at 5:33 PM, Jerry Krinock wrote: > In a OS X app, predating Grand Central Dispatch, in the main thread, I create > and start a new thread > > NSThread* worker ; > worker = [[NSThread alloc] initWithTarget:instance > selector:@selector(beginWithIn

Re: -[NSThread start] blocks ?!?

2015-09-27 Thread Ken Thomases
> On Sep 27, 2015, at 8:49 PM, Jerry Krinock wrote: > > My point is that if we can’t at least rely on -[NSThread start] returning > before the secondary starts, there is no way for a seconary thread to call > back to the main thread without possibility of deadlock. No, this isn't true. The on

Re: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Ken Thomases
On Sep 28, 2015, at 4:22 PM, Alex Kac wrote: > > I guess I need more help than that. Here is what I’ve got: > > NSViewController - with a NIB that has a plain NSView, with an NSTextField in > it. Using an NSPopover, the NSViewController is the content for the popover. > > My only two classes a

Re: NSGraphicsContext currentContext() returns nil on OSX 10.11

2015-10-12 Thread Ken Thomases
On Oct 12, 2015, at 6:45 AM, Lakshmi P Shanmugam wrote: > I'm running our application on OSX 10.11. NSGraphicsContext > currentContext() returns nil in one of the drawing methods. What drawing method and who called it, you or the framework? For example, I recently worked with somebody who was

Re: NSGraphicsContext currentContext() returns nil on OSX 10.11

2015-10-14 Thread Ken Thomases
On Oct 14, 2015, at 5:44 AM, Lakshmi P Shanmugam wrote: > Thanks for your response. You're welcome. > Hover over a cell in a Table. Framework calls NSCell > expansionFrameWithFrame:inView. And then calls NSCell cellSize. In our > overridden implementation of cellSize, we try to get the graph

Re: Debugging Faux Delegate calls

2015-10-19 Thread Ken Thomases
On Oct 19, 2015, at 4:11 PM, livinginlosange...@mac.com wrote: > > I have 4 NSComboBoxes in a view. I have a controller class which acts as the > delegate for these ComboBoxes. For some reason, after a period of time, and I > am trying to figure out why this is happening, when I enter ComboBoxA

Re: viewDidLoad not called for an NSViewController's subclass (separate XIB)

2015-10-25 Thread Ken Thomases
On Oct 25, 2015, at 1:58 AM, Nick wrote: > I am having a weird problem that viewDidLoad isn't called. Actually it's > not a problem - I can use -awakeFromNib initializator instead, but I am > wondering why viewDidLoad is not called (as it is automatically generated > by xcode with a comment "plac

Re: Updated View Bounds After Orientation Change...

2015-10-26 Thread Ken Thomases
Read these lines over and over until you see it: On Oct 26, 2015, at 9:49 PM, Peters, Brandon wrote: > > (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't > understand, refer to the documentation for the UIView property > translatesAutoresizingMaskIntoConstraints) > (

Re: How to completely destroy/close a Window

2015-10-27 Thread Ken Thomases
On Oct 27, 2015, at 2:58 PM, Jens Alfke wrote: > On Oct 27, 2015, at 12:13 PM, Dave wrote: >> >> I know I’ve seen a property that controls if a Window’s storage is released >> etc and the window properly closed or if it just “hides” but I can’t seem to >> find it? I’ve looked in NSWindowContr

Re: debugging AutoLayout exception with no build errors

2015-11-05 Thread Ken Thomases
It's definitely encountering unsatisfiable constraints. It's trying to log the problem, but getting an exception while composing a description string for one of the constraints. This is happening when the view is being added to its window. You've truncated the stack trace so we can't tell why

Re: NSSegmentedControl's sizing behaviour

2015-11-09 Thread Ken Thomases
On Nov 9, 2015, at 9:36 PM, Graham Cox wrote: > > I’m struggling to get the behaviour I want from NSSegmentedControl. > > I want each segment to have the same width, which is the overall width of the > control divided into equal parts. When the overall control is resized, the > segment sizes s

Re: Detecting when a text view becomes First Responder

2015-11-11 Thread Ken Thomases
On Nov 11, 2015, at 5:04 PM, Graham Cox wrote: > > I need to know when a text view becomes First Responder. I thought the > notification NSTextDidBeginEditingNotification would do it, but that’s only > sent when the user starts typing in the text view, which is too late for my > purposes. > >

Re: Stack View Question

2015-11-11 Thread Ken Thomases
On Nov 11, 2015, at 6:43 PM, Michael de Haan  wrote: > > Because there are 5 buttons in the top and bottom rows, and 3 in the vertical > left and right rows, the spacing in the vertical stack views are not as > “tight” as I want it to be. > > What I want is this. Lets call the space between t

Re: Customising NSFontManager

2015-11-11 Thread Ken Thomases
On Nov 11, 2015, at 7:51 PM, Graham Cox wrote: > > According to the docs for NSFontManager: > > > + setFontPanelFactory: > Sets the class used to create the Font panel to the given class. > > Discussion > Invoke this method before accessing the Font panel in any way, such as in the > applicat

Re: Yet another autolayout question

2015-11-12 Thread Ken Thomases
On Nov 12, 2015, at 6:13 PM, Dragan Milić wrote: > > What I want to achieve currently is a simple media player view (and instance > of AVPlayerView) within some superview hierarchy. I want this playerView to > behave as follows: > > * it must be horizontally centred inside its superview > * it

Re: Yet another autolayout question

2015-11-13 Thread Ken Thomases
On Nov 13, 2015, at 3:43 AM, Dragan Milić wrote: > > Thanks for the suggestion, but unfortunately that didn’t help :-( Hmm. Oh well. Your screencast of the failing case shows that you have some additional views (boxes, it looks like) in the hierarchy, and you haven't explained fully the cons

Re: Images in NSOutlineView disappear on dataReload

2015-11-16 Thread Ken Thomases
On Nov 13, 2015, at 11:48 AM, Nick wrote: > > I've encountered a strange behavior in a source list NSOutlineView. > Basically, whenever I call "reloadData", an image, that was set for a > currently selected row (NSTableCellView's imageview.image), disappears (I > set image in outlineView:viewForT

Re: KVO question

2015-11-18 Thread Ken Thomases
On Nov 17, 2015, at 7:18 PM, Graham Cox wrote: > > I’m using KVO to observe a bunch of properties. > > Most of these properties are split out into simple things that set a single > value, but internal to my object, some end up setting a common dictionary of > attributes, which is also a proper

Re: Making custom table cells for view-based tables on mac?

2015-11-24 Thread Ken Thomases
On Nov 24, 2015, at 12:08 AM, Quincey Morris wrote: > >> Furthermore, I want my image on the right, not the left, unless there's a >> HIG reason not to do that? Even if the thumbnails end up being on the left, >> I want to understand how to change that if I ever wanted to. > > The image is go

Re: Non-deprecated way to determine Process Type (LSUIElement etc.) ?

2015-11-26 Thread Ken Thomases
On Nov 27, 2015, at 1:08 AM, Ken Heglund wrote: > > On Nov 26, 2015, at 11:58 PM, Jerry Krinock wrote: >> >> Several years ago I succumbed to a few users who wanted the ability to >> switch my OS X apps between foreground (regular app) and background >> (LSUIElement) on the fly. Switching ha

Re: debugging questions on NSScroll view with NSSpllit view

2015-12-05 Thread Ken Thomases
Hi, On Dec 5, 2015, at 3:16 PM, yu...@aim.com wrote: > > I am trying to develop a Finder app like the mac Finder. I am using NSSplit > view adding one vertical panel at a time dynamically in the code. > basically, trying to simulate file directories drill down. I am also having > an NSScroll

Re: Best way to get a file path for presentation to the user

2015-12-18 Thread Ken Thomases
On Dec 18, 2015, at 12:23 PM, Jens Alfke wrote: > >> On Dec 18, 2015, at 1:24 AM, Graham Cox wrote: >> >> I want to display a path to the user. I have a URL, I need to show the local >> file path that represents (it’s always a local file path), where the >> /Users// is replaced by ~/ > > The

Re: Translating offset from crash dump

2015-12-19 Thread Ken Thomases
On Dec 19, 2015, at 10:05 AM, Aandi Inston wrote: > > I have a crash dump from a customer. I cannot reproduce the problem, and I > cannot expect the customer to have endless patience to run test versions > etc. The crash dump identifies the crash location as Routine+offset as I > would expect. Th

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Ken Thomases
On Dec 29, 2015, at 5:44 AM, Graham Cox wrote: > > On 29 Dec 2015, at 7:44 PM, Roland King wrote: >> >> I can subclass NSSlider or possibly NSSliderCell but that sounds like a >> whole world of pain, if I have to do that I’ll probably just put a >> coalescing delay into the whole thing which

Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Ken Thomases
On Jan 14, 2016, at 4:38 PM, Alex Kac wrote: > > I have a NIB with two views that I want to use depending on circumstances. I > call one “weatherCell” and one “weatherCellNarrow”. > > I register it like this: > > - (NSString*)identifierForWeatherCell { > return _narrowView ? @"weatherCe

Re: Screen <--> View Coordinate system conversion

2016-01-15 Thread Ken Thomases
On Jan 15, 2016, at 10:27 PM, Graham Cox wrote: > > I have a need to draw as if to the entire screen as an overlay. > Where I’m having a problem is that I need the overlay content to match up to > objects drawn in another view, in another window. This view can be scrolled > and zoomed arbitrar

Re: Screen <--> View Coordinate system conversion

2016-01-15 Thread Ken Thomases
On Jan 15, 2016, at 11:31 PM, Graham Cox wrote: > > What isn’t working is correctly setting the dirty rects when part of the view > needs to be refreshed. This is what has been leading me astray - because the > dirty region is misaligned, the drawing I’m doing is clipped, so it doesn’t > appea

Re: Screen <--> View Coordinate system conversion

2016-01-19 Thread Ken Thomases
On Jan 19, 2016, at 6:30 PM, Graham Cox wrote: > > OK, I got this working - thanks for all the help. > > There is a follow-up issue though. On 10.11 (others not yet tried), the > drawing only appears on the main screen. When I make my transparent window, I > size it to the union of all NSScree

Re: Using an anchor in NSURL file url

2016-01-21 Thread Ken Thomases
On Jan 21, 2016, at 7:17 PM, Jeff Evans wrote: > > Colleagues, > > In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works > fine unless I try to add an anchor to the path, for example, > > [path]/filename.html#anchorname The most correct way would be to use NSURLCompone

Re: Removing Observers eats up memory

2016-01-25 Thread Ken Thomases
On Jan 25, 2016, at 3:10 AM, Markus Spoettl wrote: > > I have a view controller with a table view that is bound to an array > containing around 1000-1 model objects. The same view controller > registers itself as observer of all the objects' properties. These objects > are actually proxie

Re: Removing Observers eats up memory

2016-01-25 Thread Ken Thomases
On Jan 25, 2016, at 1:05 PM, Markus Spoettl wrote: > > When I break in the debugger I end up in various different library functions > concerned with hash tables and the like, such as > > #00x7fff9ddc6d03 in weak_entry_for_referent(weak_table_t*, > objc_object*) () > #10x7fff9dd

Re: Removing Observers eats up memory

2016-01-25 Thread Ken Thomases
On Jan 25, 2016, at 3:22 PM, Markus Spoettl wrote: > > Thanks for the suggestion and explanation, I would never have thought of > using this. You're welcome. I'm glad I could help. > I wonder if there's a downside to implementing this in all my model objects > other than adding an additional

Re: Strange Analyser Warning/Error

2016-02-08 Thread Ken Thomases
On Feb 8, 2016, at 7:15 AM, Dave wrote: > > myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID]; > if (myUserInfo != nil) > { > LTWAssertAlways(@"myUserInfo - Dupe ID!!"); > } > > if (theUserInfo.pUserID != nil)

Re: Strange Analyser Warning/Error

2016-02-08 Thread Ken Thomases
On Feb 8, 2016, at 8:31 AM, Dave wrote: > >> >> In the case where you do not see a warning, you are calling -[NSDictionary >> objectForKey:] which accepts a nil key value (returning nil). > > Ah, for some reason I thought that is was illegal to pass a nil key to > objectForkey: It is ill

Re: CoreImage filters spam the log on El-Capitan?

2016-02-08 Thread Ken Thomases
On Feb 8, 2016, at 2:41 PM, Motti Shneor wrote: > > […] I see strange warnings in the console: "Fallingback to pbuffer. FBO > status is 36054” for every captured video frame (30 a sec…). > Can someone tell me what is the source of this error line? what is FBO, and > what has fallen-back? wher

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-09 Thread Ken Thomases
On Feb 9, 2016, at 11:45 PM, sqwarqDev wrote: > > >> On 10 Feb 2016, at 09:08, Charles Srstka wrote: >> >> If your app is accessing your appcast via HTTP, that could be intercepted >> just the same as your relnotes, and then the attacker could set the relnotes >> URL to whatever s/he wants.

Re: Contextual menu for NSTableCellView in NSOutlineView

2016-02-10 Thread Ken Thomases
Any connection you make from a table cell view to something outside of the table column is suspect. It probably doesn't work. The views "inside" of a table column are actually in a sub-NIB. There's a NIB archived to a data blob that's embedded in the NIB holding the outline view. That NIB is

Re: Contextual menu for NSTableCellView in NSOutlineView

2016-02-10 Thread Ken Thomases
On Feb 10, 2016, at 4:26 PM, Konidaris Christos wrote: > > Thanks for the insight Ken. I’ll try setting the menu manually tomorrow (it’s > half past midnight here) and let you know. But shouldn’t the > -menuForEvent:(NSEvent *)event for my NSTableCellView subclass work instead ? Well, the -rig

Re: TreeController and "selection" Binding

2016-02-12 Thread Ken Thomases
On Feb 12, 2016, at 9:04 AM, Michael de Haan wrote: > > The interface consists of 2 textViews and 1 outlineView. Lets call the one > textView “source”, and the other “pattern”. > The model represents regex matches found in the “source” textView by a regex > in the “pattern” textView. > The mode

Re: How to bind OS-X UI to display the App Bundle "CFShortVersionString" value?

2016-02-21 Thread Ken Thomases
On Feb 21, 2016, at 2:30 PM, Motti Shneor wrote: > > I simply want an NSTextField (Label) in one of my windows, to display the > “short version string” which is in the App Bundle’s info-plist, at the > “CFShortVersionString”. I hoped to do this via binding in my .xib - directly > against the A

Re: Image data from pasteboard?

2016-02-21 Thread Ken Thomases
On Feb 21, 2016, at 6:47 PM, Graham Cox wrote: > > So is there a way, given that if +canInitWithPasteboard: returns YES, to get > the (NS)data off the pasteboard in whatever format it’s in, knowing that it’s > good for making an image? You can use [NSImage readableTypesForPasteboard:pasteboard

Re: Getting displayName out of font file

2016-02-26 Thread Ken Thomases
On Feb 26, 2016, at 4:16 AM, Gerriet M. Denkmann wrote: > > I have a file “Some Font.ttf” and I want to know the displayName of this > font, which might be “Some-Font” or “Nice Font” or anything else. > Or nil if this is not a well-formatted font file. > I do NOT want to install the font nor do

Re: Getting displayName out of font file

2016-02-26 Thread Ken Thomases
On Feb 26, 2016, at 7:17 AM, Gerriet M. Denkmann wrote: > > On 26 Feb 2016, at 17:33, Ken Thomases wrote: >> >> On Feb 26, 2016, at 4:16 AM, Gerriet M. Denkmann >> wrote: >>> >>> I have a file “Some Font.ttf” and I want to know the displayName of

Re: Is calling "-applicationOpenUntitledFile:" for app-open (but not app-reopen) out of fashion?

2016-03-02 Thread Ken Thomases
On Mar 2, 2016, at 12:00 PM, Daryle Walker wrote: > > The Apple-Event handling guide says that “-applicationOpenUntitledFile:” (at > least on OS X 10.4) is supposed to be called on app-open. That didn’t happen > when creating a default project on Xcode 7 using Swift and without documents > nor

Re: App opens in wrong language on some users' machines

2016-03-05 Thread Ken Thomases
On Mar 5, 2016, at 3:32 PM, SevenBits wrote: > > Some users of my app have reported to me that, despite their Mac being set to > English, the program opens in German (it’s always German, never any other > language). I have never been able to reproduce this on any Mac I’ve tried on. > I’m not s

Re: Apple Bug no response

2016-03-09 Thread Ken Thomases
On Mar 9, 2016, at 2:32 PM, Trygve Inda wrote: > > I have an open bug report > > rdar://24316348 > > Apple asked for an example to reproduce which I sent on January 27, but I > have heard nothing since. This is a fairly simple bug (NSTextFields can't > fully justify on 10.11). > > How long sho

Re: Move views relative to other view with Autolayout

2016-03-10 Thread Ken Thomases
On Mar 10, 2016, at 3:21 PM, Doug Hill wrote: > > I can see that people use multiple constraints when moving between different > layouts. But what I don’t get is how there can be an alignment constraint > that doesn’t cause a layout update when views move? How does autolayout > decide to use t

Re: Window updates stall on headless Mac mini

2016-03-18 Thread Ken Thomases
On Mar 18, 2016, at 3:25 PM, Steve Mills wrote: > > Here's the stalled thread's backtrace: > > * thread #1: tid = 0xf3b18, 0x7fff89524136 > libsystem_kernel.dylib`__psynch_cvwait + 10, queue = 'com.apple.main-thread', > stop reason = signal SIGSTOP > * frame #0: 0x7fff89524136 libsyste

Re: Window updates stall on headless Mac mini

2016-03-19 Thread Ken Thomases
On Mar 19, 2016, at 3:01 AM, Steve Mills wrote: > > On Mar 19, 2016, at 00:12:39, Ken Thomases wrote: >> >> >> Why are you running the main run loop? For how long are you running it? >> Why aren't you running it in a private mode if it's for private

Re: stop NSSearchField editing selected row in NSOutlineView

2016-03-20 Thread Ken Thomases
On Mar 20, 2016, at 4:48 AM, sqwarqDev wrote: > > I have an OutlineView inside a SplitView in an NSPanel. > > I've been trying to implement an NSSearchField for the OutlineView. The > behaviour I want is simply for the outline view to select the first hit that > matches the search term. I've h

Re: UIStackView full of labels doesn't add up

2016-03-20 Thread Ken Thomases
On Mar 20, 2016, at 7:57 AM, Roland King wrote: > > I have a UIStackView, vertical, set to ‘fill equally’ with a number of > UILabels in it. The stackview in this instance happens to be 300pts high. If > I put 1 UILabel in it, the UILabel is 300pts high. This is what I would > expect. > > If

Re: Window updates stall on headless Mac mini

2016-03-21 Thread Ken Thomases
On Mar 21, 2016, at 11:23 AM, Steve Mills wrote: > > On Mar 19, 2016, at 03:27 AM, Ken Thomases wrote: > >> No. The main thread is blocked waiting for another Cocoa thread. It's >> waiting on an internal pthread condition variable. >> >> There must

Re: override NSTextField paste behavior

2016-03-24 Thread Ken Thomases
On Mar 24, 2016, at 9:29 PM, Rick C. wrote: > > I have an NSPanel with 2 NSTextFields and my controller is the delegate of > the panel. I want to override the paste behavior of the 2 text fields so > that the user doesn’t paste unnecessary spaces and other characters into > these fields. Is

Re: Strange Delay

2016-03-30 Thread Ken Thomases
On Mar 30, 2016, at 1:44 AM, Gerriet M. Denkmann wrote: > > This is done once (OS X 10.10.5): > commonSendQueue = dispatch_queue_create( “common socket queue", > DISPATCH_QUEUE_SERIAL); > > Several objects do this quite often: > > NSDate *dax0 = [ NSDate date ]; > dispatch_async(

Re: Does NSOutlineView's highlightedTableColumn work?

2016-04-04 Thread Ken Thomases
On Apr 4, 2016, at 8:39 AM, David Catmull wrote: > > Is setting the highlightedTableColumn property on an NSOutlineView supposed > to work? I’m expecting the column background to darken, but nothing seems to > happen. > > Showing the column headers didn’t help (I normally have them hidden), an

Re: Proper target for table cell view buttons

2016-04-08 Thread Ken Thomases
On Apr 8, 2016, at 11:48 AM, Quincey Morris wrote: > > You could verify this by simply removing the target connection that’s causing > the warning, and see if the action method still ends up in the right place. This doesn't make sense, since the connection is also what specifies the action.

Re: CFBridgingRetain does not leak memory

2016-04-15 Thread Ken Thomases
On Apr 15, 2016, at 4:34 AM, Tamas Nagy wrote: > > I have an ongoing project where I’m using a CFMessagePort some sort of IPC > communication. The CFMessagePort has a callback, something like this: > > static CFDataRef Callback(CFMessagePortRef port, > SInt32 messageID,

Re: BOOL parameter passed as nil object

2016-04-18 Thread Ken Thomases
On Apr 18, 2016, at 8:56 PM, Carl Hoefs wrote: > > Suppose I have an object with a declared method signature: > -(void)myMethod:(BOOL)a_bool; > > Q1: If I invoke it like this: > [self performSelector:@selector(myMethod:) withObject:nil]; // nil obj > Will argument a_bool end up with a 0 value

Re: BOOL parameter passed as nil object

2016-04-22 Thread Ken Thomases
On Apr 22, 2016, at 6:19 PM, Quincey Morris wrote: > > On Apr 22, 2016, at 16:12 , Carl Hoefs wrote: >> >> Yes, CFRunLoopPerformBlock: works well! > > But it sounded like you *didn’t* want to prevent the block from running. In > that case, dispatch_async would be all you’d need. (AFAIK, it d

Re: Split view priority

2016-04-22 Thread Ken Thomases
On Apr 22, 2016, at 7:15 PM, Quincey Morris wrote: > > I have a window that contains a split view of 2 split items. The item on the > left is a source list whose width constraint is '>= 70’ @priority 1000. The > item on the right is a view whose width constraint is '>= 700’ @priority > 1000.

Re: Custom window disappears dragging to second display

2016-05-02 Thread Ken Thomases
On May 2, 2016, at 9:26 PM, Trygve Inda wrote: > > I have a custom window that basically eliminates the large title area. > > When you drag a normal window to a second screen, as the drag is in > progress, the window appears semi-transparent on the second screen until > enough of the window cove

Re: Progress bar problems on server persist

2016-05-05 Thread Ken Thomases
On May 5, 2016, at 9:15 AM, Steve Mills wrote: > > A while back I started a thread about NSProgressIndicator locking up on a Mac > with no monitor. The suggested fix was to change them to use timers instead > of threads for animation. Where did the idea to use timers come from? > We thought t

Re: Progress bar problems on server persist

2016-05-05 Thread Ken Thomases
On May 5, 2016, at 9:55 AM, Steve Mills wrote: > > On May 05, 2016, at 09:31 AM, Ken Thomases wrote: > >> Where did the idea to use timers come from? > > From you, man! March 21. :) You also mentioned turning off the animation as > one way of working around this prob

Re: Progress bar problems on server persist

2016-05-05 Thread Ken Thomases
On May 5, 2016, at 10:16 AM, Steve Mills wrote: > > On May 05, 2016, at 10:07 AM, Ken Thomases wrote: > >> Don't do that. You must always shunt such work to the main thread. > > Hmm. Has that always been the case with OS X and/or Cocoa? Yes. > I know an app s

Re: Application Activation Problem

2016-05-14 Thread Ken Thomases
On May 13, 2016, at 10:21 AM, Dave wrote: > > That’s actually what I am doing. I monitor > NSWorkspaceApplicationWllLaunchNotification, > NSWorkspaceApplicatioDidLaunchNotification and > NSWorkspaceDidActivateApplicationNotification (as well as others). For each > notification I get I add th

Re: All threads in app periodically blocked

2016-05-22 Thread Ken Thomases
On May 22, 2016, at 12:48 PM, Seth Willits wrote: > > I'm thoroughly confused and increasingly desperate. *All* of the threads in > my application periodically are blocked for 30-50 ms pretty regularly, about > every 150 ms. Whenever I read about symptoms like this, I think of App Nap. Try us

Re: When can String.enumerateSubstringsInRange ever pass in NIL?

2016-05-28 Thread Ken Thomases
On May 28, 2016, at 8:27 PM, Daryle Walker wrote: > > The last argument to the method is a closure with four parameters. The first > argument is an optional String. I can't think of a circumstance where it'll > be NIL. (I need to know for testing.) Especially since it can be recreated in > ter

Re: When can String.enumerateSubstringsInRange ever pass in NIL?

2016-05-29 Thread Ken Thomases
On May 29, 2016, at 9:54 PM, Quincey Morris wrote: > > On May 29, 2016, at 19:16 , Daryle Walker > wrote: >> >> Since I am using the substring and not including “.SubstringNotRequired”, I >> can just remove the “guard” block, tack on a “!” to substring’s identifier, >

Re: Selected value binding in popups

2016-06-16 Thread Ken Thomases
On Jun 15, 2016, at 11:15 PM, Rick Mann wrote: > > I have a popup menu that's bound to an NSArrayController of AVCaptureDevice > objects. These objects have a "localizedName" property that I use for the > content values, and the content and content objects point to the > NSArrayController. >

Re: unnamed function586 $$ AMDRadeon X4000GLDriver

2016-06-23 Thread Ken Thomases
On Jun 23, 2016, at 2:56 PM, Jonathan Mitchell wrote: > > On a rare occasion I encounter the following abort while rendering an image > in an NSImage category. > The method (shown below) gets called frequently to render resources as > grayscale. > Looks like the driver has issues but beyond tha

Re: WWDC 2016 direct download

2016-06-27 Thread Ken Thomases
On Jun 27, 2016, at 1:54 AM, Roland King wrote: > > On 27 Jun 2016, at 14:47, tridiak wrote: >> >> Where do you download the 2016 WWDC videos directly? >> Or is that not possible (why)? >> I want to watch them on my iPod touch while on work breaks. > > If you can’t run the WWDC app then go to

Re: Issue with read/write to NSFileHandle

2016-06-30 Thread Ken Thomases
On Jun 30, 2016, at 8:17 PM, Graham Cox wrote: > > What still seems a bit unclear is what a file handle “for update” is meant > for, if separate read and write handles are needed. You can use a single file handle for both reading and writing. It's just that you will have to seek around to rea

Re: Mixed-state checkboxes

2016-07-08 Thread Ken Thomases
On Jul 8, 2016, at 7:36 AM, Jonathan Taylor wrote: > > I'm trying to work out the correct way to handle a mixed-state checkbox > (NSButton checkbox with allowsMixedState=YES), bound to a property on my > controller. I am intending it to serve as an "applies to all" type control at > the head

Re: Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process?

2016-07-11 Thread Ken Thomases
On Jul 11, 2016, at 11:44 AM, Alastair Houghton wrote: > > On 11 Jul 2016, at 15:04, Motti Shneor wrote: >> >> I develop a global daemon, maintained by launchd. Obviously It cannot be >> distributed in the Mac App Store. To collect crash-reports from customers, I >> integrated a mainstream 3

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Ken Thomases
On Jul 22, 2016, at 12:37 AM, Trygve Inda wrote: > > I create an NSBitmapImageRep: > > [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL > pixelsWide:pixelSize.width > pixelsHigh:pixelSize.height > bitsPerSample:8 > samplesPerPixel:4 > hasAlpha:YES > isPlanar:NO > colorSpaceName:NSDeviceR

Re: NSImage from bitmap - then delete bitmap

2016-07-21 Thread Ken Thomases
On Jul 22, 2016, at 1:08 AM, Trygve Inda wrote: > >> But that’s not a great way to do this. You’ve made an image, you’ve encoded >> it >> as TIFF data, then you’ve made a new image, which has decoded the TIFF data >> to >> make a new image rep/bitmap. >> >> You could just add the representatio

Re: NSImage from bitmap - then delete bitmap

2016-07-22 Thread Ken Thomases
On Jul 22, 2016, at 9:29 PM, Graham Cox wrote: > > >> On 23 Jul 2016, at 12:45 AM, Trygve Inda wrote: >> >> Because the main thread sometimes needs to ask the worker threads to >> terminate. If it does this after performOnMainThread has been called by a >> worker thread, but before the main th

Re: NSTableView Drag/Drop - Which Column?

2016-07-23 Thread Ken Thomases
On Jul 23, 2016, at 7:53 AM, Frank D. Engel, Jr. wrote: > > Does anyone know if there is a way to determine which column of an > NSTableView something being dragged is dropped onto? > > I have drag and drop from one table in my application onto a row of another > table working, but I would lik

Re: validateUserInterfaceItem not called

2016-07-23 Thread Ken Thomases
On Jul 23, 2016, at 10:12 PM, livinginlosange...@mac.com wrote: > > I have a simple AppDelegate that instantiates an NSWindowController and > Window. I have an NSMenuItem that invokes an IBAction on the firstResponder > in my xib. This works as expected. When I press command+1, the IBAction > f

Re: Reading in one window's frame auto-save size for another?

2016-08-01 Thread Ken Thomases
On Aug 1, 2016, at 7:09 PM, Alex Kac wrote: > > I have a popover that can be detached and turned into a window. When the > window is resized, its size/position is saved. Great! However I want the > popover to be the same size as the detached window when the user reopens that > popover. > > I

Re: odd drawInsertionPointInRect behavior

2016-08-19 Thread Ken Thomases
On Aug 16, 2016, at 9:31 PM, David Young wrote: > > I'm trying to draw my own NSTextView cursor. I expect that for each > pulse of the cursor, drawInsertionPointInRect(_:color:turnedOn:) will be > called twice, once with turnedOn == true and, shortly afterward, again > with turnedOn == false. >

Re: NSResizableWindowMask for borderless windows

2016-08-21 Thread Ken Thomases
On Aug 21, 2016, at 6:36 AM, Andreas Falkenhahn wrote: > > There seems to be some conflicting behaviour in OS X versions concerning what > happens when combining NSBorderlessWindowMask and NSResizableWindowMask: > > - on my 10.6 system, setting NSResizableWindowMask seems to override > NSBorder

Re: NSAlert::runModal doesn't work on 10.6

2016-08-22 Thread Ken Thomases
On Aug 22, 2016, at 8:26 AM, Andreas Falkenhahn wrote: > > I've created an NSAlert dialog as described here: > https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Dialog/Tasks/UsingAlerts.html#//apple_ref/doc/uid/2871-129009-BCIFAAEJ > > > When I run it using > > [ale

  1   2   3   4   5   6   7   8   9   10   >