Re: Crashing in NSTabView

2019-05-22 Thread Daniel DeCovnick
wrote: > > >> On May 22, 2019, at 11:31 AM, Daniel DeCovnick > <mailto:danhd...@mac.com>> wrote: >> >> You can always subclass, turn off ARC for that file, and override -release >> or -autorelease to breakpoint in. > >

Re: Crashing in NSTabView

2019-05-22 Thread Daniel DeCovnick
You can always subclass, turn off ARC for that file, and override -release or -autorelease to breakpoint in. I’ve done that on occasion with particularly tricky overrelease bugs (which actually turned out to be an under-autorelease bug in some non-ARC code). Daniel > On May 22, 2019, at 11:20

Re: What is overwriting 'isa' with 0xbaddc0dedeadbead ?

2015-05-25 Thread Daniel DeCovnick
Do you have an OpenRadar for it? Sounds like a fascinating bug. Daniel On May 23, 2015, at 6:26 PM, Jens Alfke wrote: > >> On May 23, 2015, at 3:31 PM, Jens Alfke wrote: >> >> I’m not sure I can simplify this into a test case, but I’ll try. > > FYI, I’ve boiled it down into a small test ca

Re: Send msg to object by nameed NSString;

2014-06-20 Thread Daniel DeCovnick
On Jun 18, 2014, at 4:54 PM, Graham Cox wrote: > > On 19 Jun 2014, at 4:53 am, Daniel DeCovnick wrote: > >> Yes. You can either use key-value coding: [[self valueForKey:myString] >> release]; > > >> [value release]; > > > > These invocatio

Re: Send msg to object by nameed NSString;

2014-06-18 Thread Daniel DeCovnick
Yes. You can either use key-value coding: [[self valueForKey:myString] release]; or you can use the ObjC runtime functions to do exactly that. #import id value = nil; object_getInstanceVariable(self, [myStr UTF8String], &value); // if your ivar is auto synthesized from a property, you’d need t

Re: Public API method naming for NSString * / const char * parameters

2014-03-03 Thread Daniel DeCovnick
On Mar 3, 2014, at 5:09 PM, jonat...@mugginsoft.com wrote: > > Hmm.That’s a good point. I was hung up on the Cocoa side of things. > > Commonly the char *strings represent a C# identifier > http://msdn.microsoft.com/en-us/library/aa664670.aspx > The rules for identifiers given in this section

Re: Public API method naming for NSString * / const char * parameters

2014-03-03 Thread Daniel DeCovnick
”, the framework can cache UTF8 representations, just like the consumer was going to have to do anyway. Daniel On Mar 3, 2014, at 5:18 PM, Jens Alfke wrote: > > On Mar 3, 2014, at 7:19 AM, Daniel DeCovnick wrote: > >> Are these selectors bound to library functions that must ta

Re: Public API method naming for NSString * / const char * parameters

2014-03-03 Thread Daniel DeCovnick
Forgot to add, if your framework *does* expect and will continue to expect UTF8 strings, then yes, “UTF8Name” is a fine choice. Daniel On Mar 3, 2014, at 4:19 PM, Daniel DeCovnick wrote: > First, why not have just the NSString versions? > > Are you working in an environm

Re: Public API method naming for NSString * / const char * parameters

2014-03-03 Thread Daniel DeCovnick
First, why not have just the NSString versions? Are you working in an environment where Foundation might not/will not be linked? Are these selectors bound to library functions that must take char *’s and you can’t afford the overhead of a second method dispatch or function call (bearing in min

Re: 3rd party executable in iOS project

2013-10-21 Thread Daniel DeCovnick
Import the headers and call the functions, if you're linking your application against it. Daniel On Oct 21, 2013, at 6:26 PM, Koen van der Drift wrote: > Ok, I figured it out. I was able to build three different static libraries > for armv7, armv7s and i386 and combined them with lipo into

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Daniel DeCovnick
You did not miss anything. Since a queue can run on any or multiple threads (except the main queue), creating a runloop on it - and runloops are thread-specific - means that one dispatched block may run on a thread that doesn’t have the runloop created in another by a previously dispatched block

Re: private redeclaration of an instance variable

2013-06-29 Thread Daniel DeCovnick
Trying this again, reply all this time... Jens, I think you’ve got the question backwards: the public ivar is in the base class, and the private one is in the subclass, and it works, even though they should both be in scope in the subclass’s implementation. I suppose it could be basically C-sty

Re: NSComparisonPredicate vs. predicateWithFormat

2012-11-24 Thread Daniel DeCovnick
The rightExpression should be [NSExpression expressionForConstantValue:deletedAlertIDs]. The collection passed to expressionForAggregate: should itself contain expressions, according to the docs. I'm not exactly sure what that's for, but expressionForConstantValue: is definitely what you want h

Re: Manual reference counting and doubly-linked lists

2012-11-14 Thread Daniel DeCovnick
Strong/retain for next, weak/assign for previous. On Nov 14, 2012, at 7:59 PM, William Squires wrote: > Let's say I have: > > @interface Thing : NSObject > > @property (nonatomic, ???) Thing *nextThing; > @property (nonatomic, ???) Thing *prevThing; > > @end > > and somewhere I keep a referen

Re: Using #define a good way for String constants, like enums for NSIntegers?

2011-08-10 Thread Daniel DeCovnick
The disadvantage is if you need to use string constants across binaries (such as constants used by plugins). If you strip symbols, you can't use them at all (whereas you can use #defines from an imported header file). If you don't strip symbols, you still need to declare them as follows: extern

PSClientDelegate

2010-12-03 Thread Daniel DeCovnick
Has anyone got any experience using the PubSub framework, specifically the PSClientDelegate API? There's no documentation on it whatsoever (except for one mention that it exists) (rdar://8395669). Looking in the header file, I see the following methods: - (void) feedDidBeginRefresh:(PSFeed *)f

Re: Linked List

2010-09-19 Thread Daniel DeCovnick
On Sep 18, 2010, at 4:53 PM, Sherm Pendley wrote: > On Sat, Sep 18, 2010 at 7:36 PM, Fritz Anderson > wrote: >> On 18 Sep 2010, at 6:09 PM, k...@highrolls.net wrote: >> >>> What is the Cocoa equivalent of a doubly linked list? Should I consider >>> NSMutablearray as the analog? >> >> Yes. >>

Re: iTunes 10 UI

2010-09-02 Thread Daniel DeCovnick
On Sep 2, 2010, at 12:07 AM, Iceberg-Dev wrote: > > 2. The NSButton Apple uses for NSWindow buttons are not simple NSButtons. And > you can not display the mouse over version of the button rendering (as far as > I've tried and Apple's DTS was not able to provide a solution either). > Apparen

Re: Documentation for -release is not quite true

2010-08-23 Thread Daniel DeCovnick
That's exactly what Jerry just suggested was happening, however the documentation implies that it's implemented more like -(oneway void)release { self->retainCount--; if (0 == self->retainCount) [self dealloc]; } But it doesn't really matter since you should neve

Re: Command-line parsing

2010-07-21 Thread Daniel DeCovnick
I for one had no idea that existed. -Daniel On Jul 21, 2010, at 8:03 AM, Alastair Houghton wrote: On 21 Jul 2010, at 15:54, Fritz Anderson wrote: I'm writing a Foundation tool that will take both options and pathname arguments. If you use NSUserDefaults, you can handle key-value options (

Re: Source file paths showing up in strings of executable

2010-07-20 Thread Daniel DeCovnick
7;t want assertions to be complied into the app, you can > define NS_BLOCK_ASSERTIONS. > > -Jeff > > > On Jul 21, 2010, at 12:05 AM, Daniel DeCovnick wrote: > >> Not sure if this is the right list, but since it seems to be exclusive to >> Obj-C, I'm sending

Source file paths showing up in strings of executable

2010-07-20 Thread Daniel DeCovnick
Not sure if this is the right list, but since it seems to be exclusive to Obj-C, I'm sending it here. Recently I've noticed that running the command line program "strings" against a release build (with debugging or all symbols stripped) reveals several full paths of source code files, speci

-processPendingChanges removing changed objects from -updatedObjects list

2010-07-08 Thread Daniel DeCovnick
perly. Any help or insight would be greatly appreciated! Thanks, Daniel Daniel DeCovnick danhd123 at mac dot com___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: Nil items in NSMutableSet

2010-03-16 Thread Daniel DeCovnick
There was a thread on this list a few days ago about effective method swizzling into Apple classes. Despite being replete with warnings about "Don't use it in production code," it IS doable, and very, very cool, IMHO. -Dan On Mar 16, 2010, at 2:18 PM, Alejandro Rodriguez wrote: You were

Re: Switching methods in private classes in Apple frameworks

2010-03-12 Thread Daniel DeCovnick
Wow, that's really, really awesome. Do you have any more details on why you can't use ivars? Not calling super makes sense. Can you access properties? On Mar 11, 2010, at 8:58 PM, Gideon King wrote: Thanks Jerry, I should mention that I did get this caveat note from Greg Parker (Apple's "ru

Re: constructing an NSString with va_list?

2010-02-27 Thread Daniel DeCovnick
+ (NSString *)stringWithFormat:(NSString *)format, ... On Feb 27, 2010, at 4:02 PM, Rick Mann wrote: I'm trying to improve our logging a bit. We have some logging code that calls NSLog(), but that prepends a bunch of fairly useless stuff for our purposes, taking up a significant portion of

Re: Finder-like icon view (MIT license)

2010-02-02 Thread Daniel DeCovnick
still disconcerting to watch multiple-hundred megabytes of RAM disappear for 10 seconds or so. -Daniel Daniel DeCovnick danhd...@mac.com On Feb 2, 2010, at 2:40 AM, Alastair Houghton wrote: Hi all, I thought I'd just post a link to some code I just posted on Google Code. It's

Re: Core Data completely unable to find the source object model for migration

2009-08-05 Thread Daniel DeCovnick
I had this exact problem. I did exactly what he did, and to continue this, yes, I did create a mapping model. Never got it to work, but I had a user base of 1 and a database of about 10 objects at the time, so I just abandoned attempting migration entirely and recreated the DB with the new

The mystery of the missing inverse relationship (was: Re: Fun (or not) with NSArrayControllers and CoreData.)

2009-07-31 Thread Daniel DeCovnick
On Jul 31, 2009, at 3:41 PM, Quincey Morris wrote: Still, it's slightly disconcerting that setting the property doesn't set the inverse relationship. How are you supposed to change it later? I believe it *was* setting the inverse correctly, just not KVO- compliantly. That is, your data m

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Daniel DeCovnick
On Jul 31, 2009, at 2:26 PM, Quincey Morris wrote: On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote: -(IBAction)newJob:(id)sender { id folder = [self currentFolder]; CCCEJob *newJob = [NSEntityDescription insertNewObjectForEntityForName:@"CCCEJob" inManagedObjectConte

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Daniel DeCovnick
On Jul 31, 2009, at 11:01 AM, Quincey Morris wrote: On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote: What is selected in FolderTreeController's outline view? Your code above implies that you select a non-root folder prior to adding a new job (to the non-root folder)

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Daniel DeCovnick
Try this: -- Add an "allDescendantJobs" Core Data to-many relationship to the Folder entity in your Core Data model. Set its delete rule to Nullify. -- Add a "rootFolder" Core Data to-one relationship to the Job entity, and make it the inverse of "allDescendantJobs". Set its delete rule

Re: Application Preferences - a general question

2009-07-31 Thread Daniel DeCovnick
Correct in practice, although the principle is more that preferences shouldn't be that onerous to change back to how they were. The lack of needing to click "Apply" helps here too: since each change is reflected instantly, if something goes horribly wrong, the user knows EXACTLY what made i

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-29 Thread Daniel DeCovnick
On Jul 29, 2009, at 12:40 PM, Quincey Morris wrote: On Jul 29, 2009, at 11:27, Daniel DeCovnick wrote: I read over the Ensuring KVO compliance docs, and I have to say, I don't think I understand it. At first glance it looks fine to me, but obviously it's not. Do I have to

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-29 Thread Daniel DeCovnick
On Jul 28, 2009, at 5:23 PM, Quincey Morris wrote: On Jul 28, 2009, at 16:44, Daniel DeCovnick wrote: -(NSSet *)allDescendentsJobs { ... } But I can't bind JobsArrayController's content set to this because "entity Folder does not support Key Value Codi

Fun (or not) with NSArrayControllers and CoreData.

2009-07-28 Thread Daniel DeCovnick
My entities and relationships are set up as follows Folder<<-- children--parent-->Folder and Folder<--folder--jobs-->>Job. My nib has a tree controller for the Folders. This part works fine. If I create an Array Controller for the Jobs (JobsArrayController), and set the Content Set to Folder

[solved] Outline view bound to an NSTreeController's content shows all children at the top level

2009-07-23 Thread Daniel DeCovnick
FTA: Adding parent == nil to the fetch predicate in IB solves this problem. Replace parent with your relationship name. -Daniel On Jul 23, 2009, at 3:32 AM, Daniel DeCovnick wrote: Hi all, Subject is pretty self-explanatory. The problem: I don't want that behavior. A little l

Outline view bound to an NSTreeController's content shows all children at the top level

2009-07-23 Thread Daniel DeCovnick
stance at the top level. I get the feeling there's a simple fix for this, but I can't figure out what it is. If it's relevant, I'm not calling add/insertChild: (is there a difference, BTW?) in code, but rather hooking up a button to the treecontroller directly in I

NSMigrationMissingSourceModelError, and now I can't set the current model version

2009-07-08 Thread Daniel DeCovnick
I'm trying to do a Core Data migration. I've got my .xcmappingmodel, I've created a new version of the MOM, and both are under the same xcdatamodeld. When I launch my application, I get the following error: "Persistant store migration failed, missing source managed object model." A little g

Re: Display the elements of array in a tablview ?

2009-07-07 Thread Daniel DeCovnick
Point of order, you CAN use bindings in code, it's just far more convenient to do so in IB. On Jul 7, 2009, at 1:59 PM, I. Savant wrote: On Jul 7, 2009, at 4:48 PM, Jesse Armand wrote: I'm not even familiar with Bindings, is it convenient to use ? Once you understand all of its prerequis

Singleton Entities?

2009-06-30 Thread Daniel DeCovnick
, are there any gotchas for making singletons of NSManagedObject subclasses? -Daniel Daniel DeCovnick danhd...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

Re: SSH Tunnel

2009-02-22 Thread Daniel DeCovnick
I wrote an app for exactly this purpose (ended up being able to configure any of ssh's options). I ended up just writing a .command file to the application support folder, and then launching either Terminal or X11, depending on whether X11 forwarding was needed or not. I let the user handle

[not solved] Re: Framework for IB Plugin and app

2008-04-25 Thread Daniel DeCovnick
Never mind on that, it still doesn't work. I don't know why it worked one time, but it doesn't now. Suggestions? -Dan On Apr 25, 2008, at 6:43 PM, Daniel DeCovnick wrote: That was supposed to be struck-through. Oops. -Dan On Apr 25, 2008, at 6:09 PM, Daniel DeCovnick wrote:

Re: [solved]? Re: Framework for IB Plugin and app

2008-04-25 Thread Daniel DeCovnick
That was supposed to be struck-through. Oops. -Dan On Apr 25, 2008, at 6:09 PM, Daniel DeCovnick wrote: But you can't then embed the framework in the app, AFAICT. IB gives a "plugin corrupted" error message when you change the settings in the target to those for an embedde

[solved]? Re: Framework for IB Plugin and app

2008-04-25 Thread Daniel DeCovnick
2008, at 5:28 PM, Ricky Sharp wrote: On Apr 25, 2008, at 2:53 PM, Daniel DeCovnick wrote: I've got a framework project, currently set up to create an embedded framework for an application, with a view class that I'd like to turn into an IB Plugin. Can the framework be embedde

Framework for IB Plugin and app

2008-04-25 Thread Daniel DeCovnick
I've got a framework project, currently set up to create an embedded framework for an application, with a view class that I'd like to turn into an IB Plugin. Can the framework be embedded in the IB Plugin? If so, how? Embedding it like in an app doesn't seem to work: IB doesn't seem to see

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-24 Thread Daniel DeCovnick
Er... either my calculator's broken or (65535 - 30 - 8 )/12 = 5458, not 2727, where 30 and 8 are the resource map header and a single reference type. -Dan On Apr 24, 2008, at 8:41 AM, glenn andreas wrote: On Apr 24, 2008, at 6:08 AM, Daniel DeCovnick wrote: The tips are apprec

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-24 Thread Daniel DeCovnick
curious. -Dan On Apr 24, 2008, at 5:52 AM, Uli Kusterer wrote: Am 24.04.2008 um 09:16 schrieb Daniel DeCovnick: I read that. I'm not sure I completely know what the resource map is. The resource manager keeps track of a table of resource types, and subtables of resource names or ID&#

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-24 Thread Daniel DeCovnick
moral is I ended up writing "I will not paste 3 images into ResEdit PICT resources and then email the plugin to someone on dialup" 50 times in penance using a SimpleText copy with the Paste menu item removed. On Apr 24, 2008, at 2:27 AM, Chris Suter wrote: On 24/04/2008, at 4:14 PM, D

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
Honestly, I don't care how the data is stored, as long as I've got some reliable place to store file-specific data such that it can be reliably tied to the file (cross-user/cross-computer concerns are primary, cross-platform concerns are secondary - I'm only writing this for OS X currently,

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
The problem with that is, as I wrote in my first message, the real data files aren't mine, and won't be opened by my app exclusively. The data that I need to save ought to be invisible to the file's owner. Imagine, for example, that when working on a file in HexEdit, it allowed you to highl

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
You may want to look at the size limits on resource forks, though. I thought I'd blogged about that ages ago, but can't find the posting right now. The resource fork format is documented, though, so it shouldn't be too hard to figure out. There's for example a 2727 resources limit on ea

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
Actually it is possible, at least according to the OSXBook, to add arbitrary key-value paired metadata to a file (IIRC, all MDItem keys share a flat namespace). It theoretically works without Spotlight, but nothing uses metadata that doesn't use Spotlight currently, AFAIK, and my data isn't

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
That the Resource Manager is still around in 64-bit definitely alleviates one of my concerns - "will whatever I use still be around in the future?" Thanks much, Dan On Apr 23, 2008, at 10:12 AM, Sean McBride wrote: On 4/23/08 1:21 AM, Daniel DeCovnick said: I'm writing

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
That's pretty much option 1, albeit implemented slightly more robustly than I was thinking of. But my data's not sensitive, so there's no advantage in losing it on sending it to someone else, and in fact I'd much prefer it was retained if possible. -Dan On Apr 23, 2008, at 11:10 AM, Jens

Re: [ANN] TransactionKit, Lockless Multi-Reader, Multi-Writer Transaction Capable Hash Tables

2008-04-23 Thread Daniel DeCovnick
On Apr 22, 2008, at 7:48 PM, John Engelhart wrote: *applause* ___ 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.c

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Daniel DeCovnick
On Apr 23, 2008, at 2:07 AM, Jens Alfke wrote: On 22 Apr '08, at 10:21 PM, Daniel DeCovnick wrote: Through a lot of thought experiments, I've come to the conclusion that the best place to save this sort of thing would be in the resource fork of the file being opened, but

Resource Fork - is this a good use/the right thing to do?

2008-04-22 Thread Daniel DeCovnick
es everywhere. Decidedly unappealing, requiring the file to never move or else lose its graphical rep. Daniel DeCovnick danhd123 at mac dot com Softyards Software http://www.softyards.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas