Re: TableView crash with Delegate
> On 13 Jun 2016, at 21:43, Alastair Houghton> wrote: > > On 12 Jun 2016, at 10:10, Gerriet M. Denkmann wrote: >> >> OS X 10.11.5, Xcode Version 7.3.1 (7D1014). >> >> App with TableView (View based). Works fine. >> But when I give the TableView a delegate (even without implementing any >> NSTableViewDelegate methods) it crashes (see below). >> >> How to debug this? >> Tried a symbolic breakpoint in -[__NSArrayM objectAtIndex:] - but it >> crashes before reaching breakpoint. > > Set it to break on exceptions (or put a breakpoint on objc_exception_throw), > then go back up the call stack? This ultimately let me to the root of the problem: My app has only one TableView, which is bound to Array Controller. Array Controller binds its Content Array to AppDelegate with Model Key Path self.someUniqueObject.aMutableArray. When the app starts a unique someUniqueObject gets created. But I had: - (void)awakeFromNib { self.someUniqueObject = [ [ UniqueObject alloc ] init ]; } The problem: awakeFromNib gets called twice: once before applicationDidFinishLaunching:, once after. This obviously created a total mess. Solution: move the creation of someUniqueObject to applicationDidFinishLaunching: Thanks for your help! Kind regards, Gerriet. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: KERN_INVALID_ADDRESS
___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Tick marks on scroll bars
> On Jun 13, 2016, at 9:18 AM, じょいすじょん> wrote: > > Did you do run into any issues with rubberbanding and responsive/momentum > scrolling? Why would I? I just overrode the method that draws the background. —Jens ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: KERN_INVALID_ADDRESS
Or , how can an address held in a variable be checked for validity? -rags > On Jun 13, 2016, at 1:08 PM, Raglan T. Tigerwrote: > > > How can one find the variable containing the KERN_INVALID_ADDRESS s indicated > by > > Exception Codes: KERN_INVALID_ADDRESS at 0x01a9 > > from a crash report? > > -rags > > > > > ___ > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net > > This email sent to k...@highrolls.net ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
KERN_INVALID_ADDRESS
How can one find the variable containing the KERN_INVALID_ADDRESS s indicated by Exception Codes: KERN_INVALID_ADDRESS at 0x01a9 from a crash report? -rags ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Tick marks on scroll bars
Did you do run into any issues with rubberbanding and responsive/momentum scrolling? > On Jun 14, 2016, at 1:03 AM, Jens Alfkewrote: > > I've done it by subclassing NSScroller. (The code's not open-source, though.) > As far as I know, that's the only way to do it. It's fairly easy. > > —Jens > > ___ > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/dangerwillrobinsondanger%40gmail.com > > This email sent to dangerwillrobinsondan...@gmail.com ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Tick marks on scroll bars
I've done it by subclassing NSScroller. (The code's not open-source, though.) As far as I know, that's the only way to do it. It's fairly easy. —Jens ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: TableView crash with Delegate
On 12 Jun 2016, at 10:10, Gerriet M. Denkmannwrote: > > OS X 10.11.5, Xcode Version 7.3.1 (7D1014). > > App with TableView (View based). Works fine. > But when I give the TableView a delegate (even without implementing any > NSTableViewDelegate methods) it crashes (see below). > > How to debug this? > Tried a symbolic breakpoint in -[__NSArrayM objectAtIndex:] - but it crashes > before reaching breakpoint. Set it to break on exceptions (or put a breakpoint on objc_exception_throw), then go back up the call stack? Alternatively, if that isn’t helpful (and it might well not be), I’d start looking to see whether I was doing anything I shouldn’t; for instance, changing the number of items in the table view from a data source or delegate method where doing that isn't safe. Not sure how much of that is documented; some of it might be assumed to be “obvious”. Pretty sure I’ve crashed NSTableView before that way, and with an index beyond bounds error at that. Kind regards, Alastair. -- http://alastairs-place.net ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
CGWindowList Documentation bug?
Hi All, I got this from CGWindow Reference manual: Window List Option Constants Specifies which windows in the current user session to include in a generated list. enum { kCGWindowListOptionAll = 0, kCGWindowListOptionOnScreenOnly = (1 << 0), kCGWindowListOptionOnScreenAboveWindow = (1 << 1), kCGWindowListOptionOnScreenBelowWindow = (1 << 2), kCGWindowListOptionIncludingWindow = (1 << 3), kCGWindowListExcludeDesktopElements = (1 << 4) } Constants kCGWindowListOptionAll List all windows, including both onscreen and offscreen windows. When retrieving a list with this option, the relativeToWindow parameter should be set to kCGNullWindowID. kCGWindowListOptionOnScreenOnly List all windows that are currently onscreen. Windows are returned in order from front to back. When retrieving a list with this option, the relativeToWindow parameter should be set to kCGNullWindowID. kCGWindowListOptionOnScreenAboveWindow List all windows that are currently onscreen and in front of the window specified in the relativeToWindow parameter. Windows are returned in order from front to back. kCGWindowListOptionOnScreenBelowWindow List all windows that are currently onscreen and in behind the window specified in the relativeToWindow parameter. Windows are returned in order from front to back. kCGWindowListOptionIncludingWindow Include the specified window (from the relativeToWindow parameter) in the returned list. You must combine this option with the kCGWindowListOptionOnScreenAboveWindow or kCGWindowListOptionOnScreenBelowWindow option to retrieve meaningful results. kCGWindowListExcludeDesktopElements Exclude any windows from the list that are elements of the desktop, including the background picture and desktop icons. You may combine this option with the other options. Discussion The kCGWindowListOptionIncludingWindow and kCGWindowListExcludeDesktopElements constants may be combined with the other constants by adding (or ORing) them together and passing the resulting value to the appropriate function. These constants let you retrieve windows in the current user session only. You cannot use them to retrieve windows from other active user sessions running on the system. Note this: kCGWindowListOptionIncludingWindow Include the specified window (from the relativeToWindow parameter) in the returned list. You must combine this option with the kCGWindowListOptionOnScreenAboveWindow or kCGWindowListOptionOnScreenBelowWindow option to retrieve meaningful results. Reading the above led me to believe that I had to specify kCGWindowListOptionOnScreenAboveWindow or kCGWindowListOptionOnScreenBelowWindow in order to retrieve the *one* window I was interested in. From experimenting it seems that THIS IS NOT THE CASE, as: myWindowListOptions = kCGWindowListExcludeDesktopElements | kCGWindowListOptionIncludingWindow; myWindowArray = (NSArray*) CFBridgingRelease(CGWindowListCopyWindowInfo(myWindowListOptions,theWindowID)); myWindowInfoDictionary = [myWindowArray lastObject]; Returns the *ONE* info dictionary for the *ONE* window specified by “theWindowID”. I’ve tested this and it works on 10.10.5 and 10.11 and it works ok. Is this a Bug in the documentation? I’m wondering if I should rely on this, if not I’m at a loss how to retrieve the Info for the one window I want? When I include the Above or Below option, it returns a while load of window info dictionaries I don’t care about and this is enough to slow it down so as to cause a “juddering” effect. Any suggestions or help on the would be greatly appreciated. All the Best Dave ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Tick marks on scroll bars
Hi all, Does anyone know a way of implementing "tick marks" on a scroll bar, in the way that Xcode does to mark code lines where there is an error/warning? From reading header files, I can't see any obvious built-in API to implement this feature, but perhaps somebody knows of a custom class that somebody has written to implement this functionality? It's something I would like to use, and would do if it was comparatively simple to do so, but it's not crucial enough that it would be worth my time to write a custom subclass from scratch to do it I suspect (I have no experience of customizing controls, even if to an expert it might be comparatively simple!). Thanks for any suggestions... Jonny ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com