Re: NSCollectionView, disappearing items on reloadData

2023-01-11 Thread Arved von Brasch via Cocoa-dev
for Mojave. Cheers, Arved > On 2023-01-09, at 08:50, Arved von Brasch wrote: > > Thanks Rob. I can confirm that ‘prepareForReuse()’ is *not* called after the > ‘reloadData()’ call. I can also confirm the Data Source functions still > contain the expected information. Again, this is

Re: NSCollectionView, disappearing items on reloadData

2023-01-08 Thread Arved von Brasch via Cocoa-dev
oadData is a pretty big hammer and can kill performance > with large view hierarchies. It’s better to use API like > -performBatchUpdates:completionHandler: and related methods to > insert/move/remove views as needed. > > Hope that helps & good luck. > > —Rob > >

NSCollectionView, disappearing items on reloadData

2023-01-08 Thread Arved von Brasch via Cocoa-dev
Hello list, I’ve encountered a bug for the life of me I can’t work out. I’m restricted to supporting Mojave (10.14) for the time being, so it is possible this has been fixed / not an issue on later releases. This is a Core Data backed application, with several Xib loaded views that are swapped

UndoManager, NSManagedObjectContext and sheets

2020-11-10 Thread Arved von Brasch via Cocoa-dev
Hello Cocoa list, I’m wondering about the best approach to managing Undo/Redos when presenting a sheet that allows multiple changes to the selected item in an NSArrayController. My approach mostly works as I expect, but there are a few edge cases that seem more difficult to deal with than it

UndoManager setActionNames

2020-07-05 Thread Arved von Brasch via Cocoa-dev
Hi list, Where’s the best place to intercept undo/redo actions to edit the action name (’setActionName()’) for the UndoManager in a CoreData application? In particular, when a particular entity’s attribute's change. Obviously, I want to do this so that when the user edits something, the menu

Re: Subclassing NSCollectionViewFlowLayout

2019-10-24 Thread Arved von Brasch via Cocoa-dev
>> On Oct 21, 2019, at 3:26 AM, Arved von Brasch via Cocoa-dev >> wrote: >> >> Hello list, >> >> Thanks to someone on the list who provided me with a clue, I found that if I >> add this to my NSCollectionViewItem subclass: >> >&

Re: Subclassing NSCollectionViewFlowLayout

2019-10-21 Thread Arved von Brasch via Cocoa-dev
I’m going to resolve this yet, but I thought I’d post it in case anyone else follows in my footsteps. Cheers, Arved > On 2019-10-20, at 21:54, Arved von Brasch wrote: > > Hello Cocoa List, > > I’m in the process of porting a hobby project to up-to-date Swift so it can > b

Subclassing NSCollectionViewFlowLayout

2019-10-20 Thread Arved von Brasch via Cocoa-dev
Hello Cocoa List, I’m in the process of porting a hobby project to up-to-date Swift so it can be used on Catalina (and I can upgrade my work machine - still looking for a QuickTime 7 Pro replacement, though). I’ve encountered a phenomenon subclassing NSCollectionViewFlowLayout that I haven’t

Re: NSTableView

2019-04-21 Thread Arved von Brasch
as you drag multiple files around. That is the multi-image >> drag setup. Single image drags can’t do that. >> >> —Rob >> >> >>> On Apr 20, 2019, at 12:14 AM, Arved von Brasch wrote: >>> >>> Hello list, >>> >>

NSTableView

2019-04-20 Thread Arved von Brasch
Hello list, Anyone know if it is intentionally the case that NSTableView doesn’t call dragImageForRows(with dragRows: IndexSet, tableColumns: [NSTableColumn], event dragEvent: NSEvent, offset dragImageOffset: NSPointPointer) -> NSImage if you implement func tableView(NSTableView,

View-based NSTableView and ending editing with "return"

2016-01-24 Thread Arved von Brasch
Hello list, After putting it off for too long, I’m migrating to view-based NSTableViews. I’ve worked through most of the conversion problems I’ve had, and am generally pretty happy. There is, however, one problem I haven’t been able to solve. I have a NSButton in the same window as my table.

Re: File Permissions - NSFileManager Swift

2015-06-30 Thread Arved von Brasch
On 30 Jun 2015, at 02:29, Jens Alfke j...@mooseyard.com wrote: It always helps people answer questions if you post the exact error you get. Generally when there are mysteriously un-deletable files, it has something to do with filesystem extended attributes like ‘immutable’. You can

File Permissions - NSFileManager Swift

2015-06-29 Thread Arved von Brasch
Dear Cocoa List, I’m trying to remove an application package using NSFileManager.defaultManager().removeItemAtPath(self.appPackage, error: error) The application package was put at this location using NSFileManager.defaultManager().copyItemAtURL(pathURL as! NSURL, toURL: self.appPackage,

Creating selector for nonexistent method

2014-04-29 Thread Arved von Brasch
Hi List, I have a warning that I’m trying to understand. Hopefully someone here can shed some light on it. I have two relevant classes. My window controller: @interface ISWindowController : NSWindowController NSToolbarDelegate … - (IBAction)clear: (id)sender; ... @end This method is

Re: Creating selector for nonexistent method

2014-04-29 Thread Arved von Brasch
On 30 Apr 2014, at 4:38, Charles Srstka cocoa...@charlessoft.com wrote: So it seems that even if the method is defined in a header, you need it to be in the @implementation block of a class for which you have the code in order to use @selector without setting off -Wselector. This means that

Advanced Techniques

2013-07-13 Thread Arved von Brasch
Hello list, I'm hoping the list might have some recommendations on books or other sources. My web searches aren't turning up too much that is helpful, as so much is geared towards iOS these days. I have a MacOS X app that was written quite naively some time ago (small, non-public release,

NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
Hello list, I have a modular single window application, where it has become necessary to put control code into NSViewController subclasses. I have googled extensively on this issue, and it seemed pretty easy. The solution I went with is here:

Re: NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
Thank you both for responding. I am pretty sure I have everything linked up properly. I first noticed a problem when I couldn't get a NSMenuItem to validate, but it seems to also be a problem with buttons. I created a NSButton subclass to test this: @interface ABTestButton : NSButton @end

Re: NSViewController in the responder chain

2013-01-06 Thread Arved von Brasch
. Thanks again. Arved On 2013-01-07, at 12:31 , Ken Thomases k...@codeweavers.com wrote: On Jan 6, 2013, at 6:53 PM, Arved von Brasch wrote: 'showSettings:' is implemented in the ABItemsXibManager class, and it clearly responds to the selector as the above debug shows, but even here

NSTableView setContentMaxSize:

2012-09-10 Thread Arved von Brasch
Dear Dev List, I've noticed strange window resizing behaviour the last couple of weeks, possibly since I upgraded to Mountain Lion. This may also be a resolution thing, as I've only tried this on a Retina MacBook. I have Table Views in a number of views that are swapped in and out by the

Style: NSArrayController communicating with NSViewController

2012-08-03 Thread Arved von Brasch
Hi List, I've been reworking my application and I've found a solution I'm not particularly happy with, and was hoping to get some advice from others. I have several views that are essentially views onto different tables. Each row in the table represents real items in the file system (because

Re: Style: NSArrayController communicating with NSViewController

2012-08-03 Thread Arved von Brasch
On 2012-08-03, at 18:04 , Graham Cox graham@bigpond.com wrote: On 03/08/2012, at 5:56 PM, Arved von Brasch co...@atgo.org wrote: I've settled on having the array controller publish values and having the view controller notice by key-value observing. Sounds reasonable

Re: Bindings crash

2012-01-26 Thread Arved von Brasch
Hi list, This is the error I'm seeing: 2012-01-26 07:54:20.418 FileExplorer[1338:707] NSScanner: nil string argument 2012-01-26 07:54:20.420 FileExplorer[1338:707] NSScanner: nil string argument 2012-01-26 07:54:20.421 FileExplorer[1338:707] NSScanner: nil string argument 2012-01-26

Re: Bindings crash

2012-01-26 Thread Arved von Brasch
Thanks very much for your response. You pointed me in the right direction. On 26/01/2012, at 3:23 PM, Ken Thomases wrote: First, why are you using strings to convert to NSDecimalNumber? Ask the NSNumber for its decimalValue and then use +[NSDecimalNumber decimalNumberWithDecimal:]. That

Bindings crash

2012-01-25 Thread Arved von Brasch
Dear Cocoa List, I'm occasionally seeing a crash when a XIB is loading some of the bindings I've set up. Using a NSViewController subclass, a view is loaded in response to clicking on a NSToolbar item. One of the views displays some disk space usage information. This works fine almost all

Re: lastKeyViewTraversingSubviewsBeginningWithView

2010-02-22 Thread Arved von Brasch
Hi Cocoa List, warning: _lastKeyViewTraversingSubviewsBeginningWithView: encountered 5000 views!!! It usually occurs when a NSCollectionView is being refreshed, but not every time. I believe that NSCollectionView creates all of the item views up front, and doesn't lazily create them or

lastKeyViewTraversingSubviewsBeginningWithView

2010-02-21 Thread Arved von Brasch
Hi Cocoa List, I'm occasionally seeing the following warning from the runtime while testing my application: warning: _lastKeyViewTraversingSubviewsBeginningWithView: encountered 5000 views!!! It usually occurs when a NSCollectionView is being refreshed, but not every time. I've tried

lastKeyViewTraversingSubviewsBeginningWithView

2010-02-21 Thread Arved von Brasch
Hi Cocoa List, I'm occasionally seeing the following warning from the runtime while testing my application: warning: _lastKeyViewTraversingSubviewsBeginningWithView: encountered 5000 views!!! It usually occurs when a NSCollectionView is being refreshed, but not every time. I've tried

NSRulerMarker and dragging

2009-10-17 Thread Arved von Brasch
Hello Cocoa List, My Googling reveals this question has been asked before, but no answer was given. Hopefully someone knows how to do this now. I have a vertical NSRulerView attached to an NSTextView. I have movable NSRulerMarkers and that's all working good. My only problem is that

NSPredicateEditorRowTemplate and switching views

2009-05-04 Thread Arved von Brasch
when this problem occurs. Can anyone shed any light on this? Thanks in advance, Arved von Brasch ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: Live editing an NSTextView

2008-12-27 Thread Arved von Brasch
loop as the typing that just occurred. On 2008-11-27, at 08:58 , Arved von Brasch wrote: On 2008-11-27, at 05:57 , Douglas Davidson wrote: On Nov 26, 2008, at 4:14 AM, Arved von Brasch wrote: I have this working almost perfectly by listening for the NSTextDidChangeNotification

Live editing an NSTextView

2008-11-26 Thread Arved von Brasch
similar, and has an elegant solution, or at least a different direction I could take. Thanks, Arved von Brasch ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Live editing an NSTextView

2008-11-26 Thread Arved von Brasch
On 2008-11-27, at 05:57 , Douglas Davidson wrote: On Nov 26, 2008, at 4:14 AM, Arved von Brasch wrote: I have this working almost perfectly by listening for the NSTextDidChangeNotification and searching the text for the special sequence. I've found this to be the best place to handle

NSPredicateEditorRowTemplate and CoreData

2008-10-16 Thread Arved von Brasch
editor. Is there an elegant solution to this? I appreciate any ideas, Arved von Brasch ___ 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