Re: [NSMutableData resetDataRangeTo:(NSRange)range];

2014-07-12 Thread SevenBits
On Saturday, July 12, 2014, Carl Hoefs wrote: > On Jul 12, 2014, at 1:51 PM, Matt Gough > wrote: > > > [bigData replaceBytesInRange:NSMakeRange(0, 1024) withBytes:NULL > length:0]; > > Wow, I would never have thought to do that! Works perfectly! You could also declare a category on NSMutableDa

Re: having both cell based and view based outline views in one project

2014-07-12 Thread Shane Stanley
On 13 Jul 2014, at 7:58 am, Ken Thomases wrote: > It's changing the prototype objects. Makes sense, thanks. On my first try I spent ages trying to delete the old text cell, until I checked the example again... -- Shane Stanley ___ Cocoa-dev ma

Re: having both cell based and view based outline views in one project

2014-07-12 Thread Ken Thomases
On Jul 12, 2014, at 4:47 PM, Shane Stanley wrote: > On 13 Jul 2014, at 1:32 am, Keary Suska wrote: > >> As far as I can tell, there is no public property that tells an NSTableView >> whether it is cell-based or view-based > > Yet there's a popup in IB (the very first one), so it's presumably

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-12 Thread Ken Thomases
On Jul 12, 2014, at 3:50 PM, Bill Cheeseman wrote: > The interesting method is -outlineView:itemForPersistentObject:. It > unarchives the archived UUID string. Then it uses recursive blocks to search > the data source array through all nested levels until it finds the item with > the same UUID

Re: [NSMutableData resetDataRangeTo:(NSRange)range];

2014-07-12 Thread Carl Hoefs
On Jul 12, 2014, at 1:51 PM, Matt Gough wrote: > [bigData replaceBytesInRange:NSMakeRange(0, 1024) withBytes:NULL length:0]; Wow, I would never have thought to do that! Works perfectly! Thx, -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-12 Thread Quincey Morris
On Jul 12, 2014, at 13:50 , Bill Cheeseman wrote: >__block id returnItem = nil; >__block void (^findItemForIdentifierInArray)(NSArray *) = ^(NSArray > *contents) { >[contents enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL > *stop) { >if ([[obj objectForKey

Re: having both cell based and view based outline views in one project

2014-07-12 Thread Shane Stanley
On 13 Jul 2014, at 1:32 am, Keary Suska wrote: > As far as I can tell, there is no public property that tells an NSTableView > whether it is cell-based or view-based Yet there's a popup in IB (the very first one), so it's presumably doing something. -- Shane Stanley _

Re: [NSMutableData resetDataRangeTo:(NSRange)range];

2014-07-12 Thread Matt Gough
don’t you just want: [bigData replaceBytesInRange:NSMakeRange(0, 1024) withBytes:NULL length:0]; ?? I am sure NSMutableData is well optimized for shunting its contents around internally. Matt On 12 Jul 2014, at 20:36, Carl Hoefs wrote: > Basically what I would like is an NSMutableData meth

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-12 Thread Bill Cheeseman
On Jul 11, 2014, at 4:29 PM, Bill Cheeseman wrote: > And I've discovered another difficulty, although I think I can handle it. > When you add, remove or edit a row that is a child of an expanded parent > item, AppKit does not automatically call > -outlineView:persistentObjectForItem: to updat

Re: having both cell based and view based outline views in one project

2014-07-12 Thread Navneet Kumar
Hi, Thanks for the valuable insight. For now I'll try separating the data source & delegate, for the two outline views, just to save time. And will switch to view based, in due time. Thanks very much. Navneet Sent from my iPhone > On 12-Jul-2014, at 9:02 pm, Keary Suska wrote: > >> On Jul 12

[NSMutableData resetDataRangeTo:(NSRange)range];

2014-07-12 Thread Carl Hoefs
Basically what I would like is an NSMutableData method like this: - (void)resetDataRangeTo:(NSRange)range Parameters range The range within the contents of the receiver to be considered the new contents. But, since that doesn't exist yet, is it safe to "shift" the contents in place of an NSMut

Re: having both cell based and view based outline views in one project

2014-07-12 Thread Keary Suska
On Jul 12, 2014, at 9:20 AM, Navneet Kumar wrote: > I had one (set cell-based in IB) outline view in my project using custom cell > for one table Column (identifier : “Description”). > And it was working fine with my AppDelegate implementing the required > datasource and some delegate methods. >

having both cell based and view based outline views in one project

2014-07-12 Thread Navneet Kumar
Hi, I had one (set cell-based in IB) outline view in my project using custom cell for one table Column (identifier : “Description”). And it was working fine with my AppDelegate implementing the required datasource and some delegate methods. I added another (set view-based in IB) outline view an

Re: Unwanted enclosingScrollView

2014-07-12 Thread Leonardo
I have just discovered that overriding enclosingScrollView and returning nil, doesn't let me longer see and edit the paragraph demiliters and tabs on the ruler view. In facts, when the user is editing the textView, the page's scrolling view should display the paragraph delimiters and tabs on its r

Re: Converting database to Core Data

2014-07-12 Thread Willeke
Perhaps I don't see the problem but what is preventing you from creating the second inverse relationship? Op 10 jul 2014, om 22:00 heeft William Squires het volgende geschreven: > I'm trying to convert the following. I have two tables in a database, > "TransactionEntry", and "ReasonCode". A "

Re: KVC, binding multiple properties, top level object

2014-07-12 Thread Graham Cox
On 12 Jul 2014, at 10:05 pm, Trygve Inda wrote: > ---someProperty (Custom NSObject) > --propertyA (NSNumber) > --propertyB (NSNumber) > --propertyC (NSNumber) > > Properties A, B and C use a binding to connect them to a user interface item > with something like: > > Bind to MyObjec

Re: KVC, binding multiple properties, top level object

2014-07-12 Thread Ken Thomases
On Jul 12, 2014, at 7:05 AM, Trygve Inda wrote: > My object layout looks like: > > -MyObject (custom NSObject) > ---someProperty (Custom NSObject) > --propertyA (NSNumber) > --propertyB (NSNumber) > --propertyC (NSNumber) > > Properties A, B and C use a binding to connect them to a

NSAccessibilityPressAction on NSMenuItem

2014-07-12 Thread Remco Poelstra
Hi, I'm trying to perform an NSAccessibilityPressAction on a NSMenuItem in my own app. Currently I've this: [[[NSApplication sharedApplication].menu itemAtIndex:2] accessibilityPerformAction:NSAccessibilityPressAction]; I get back an "unrecognised selector sent" message. When I try to traver

KVC, binding multiple properties, top level object

2014-07-12 Thread Trygve Inda
My object layout looks like: -MyObject (custom NSObject) ---someProperty (Custom NSObject) --propertyA (NSNumber) --propertyB (NSNumber) --propertyC (NSNumber) Properties A, B and C use a binding to connect them to a user interface item with something like: Bind to MyObject with key

Re: Issue with -[NSOutlineView autosaveExpandedItems] - SOLVED

2014-07-12 Thread Bill Cheeseman
On Jul 11, 2014, at 4:45 PM, Gary L. Wade wrote: > Sounds like it’s time to update Cocoa Recipes to a 3rd edition to fully > share these nuggets. ;) That's been suggested from time to time, but I'm afraid I don't have another book in me. -- Bill Cheeseman - b...@cheeseman.name ___