Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Keary Suska
On Jul 11, 2012, at 6:53 PM, Dave DeLong wrote: > > On Jul 11, 2012, at 4:54 PM, Keary Suska wrote: > >> On Jul 11, 2012, at 2:45 PM, Motti Shneor wrote: >>> Of what I read from everyone, and after examining the suggested code from >>> Jens Alfke, I think I'm inclined to something simpler, hint

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Dave DeLong
On Jul 11, 2012, at 4:54 PM, Keary Suska wrote: > On Jul 11, 2012, at 2:45 PM, Motti Shneor wrote: >> Of what I read from everyone, and after examining the suggested code from >> Jens Alfke, I think I'm inclined to something simpler, hinted by Keary >> Suska. Could you spare a few more words

iChat plugin sample code ?

2012-07-11 Thread Jean-Daniel Dupas
Hello, Does someone has a copy of the Apple IRCServicePlugIn sample code. It look like it has been removed from the ADC web site, and I need it. Thanks. -- Jean-Daniel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: View-based NSTableView question

2012-07-11 Thread Quincey Morris
On Jul 11, 2012, at 15:06 , TJ wrote: > The problem here is that I don't have any idea where and how to get and set > the frame of the cell. As you can see during the creation of NSTableCellView > I'm basically using an NSZeroRect because [cellView frame] is nil. I > subclassed NSTableCellView

Re: View-based NSTableView question

2012-07-11 Thread Laurent Daudelin
On Mac OS X, look for NSTableViewDelegate tableView:heightOfRow:. The width is set through the NSTableColumn which has an entire set of methods to set the minimum width, the width and the maximum width. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Keary Suska
On Jul 11, 2012, at 2:45 PM, Motti Shneor wrote: > Of what I read from everyone, and after examining the suggested code from > Jens Alfke, I think I'm inclined to something simpler, hinted by Keary > Suska. Could you spare a few more words on the "undefinedKey" override? I would create a base

Re: View-based NSTableView question

2012-07-11 Thread Chuck Soper
This isn't an answer but, if you didn't find it, the Table View Programming Guide has been quite useful for me: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Tab leView/ You can find it with the following link, then filtering the results by unchecking the boxes on the lef

View-based NSTableView question

2012-07-11 Thread TJ
Hey guys, I'm trying to replace my old cell-based NSTableView system with the new 10.7+ view-based one without using Xcode's Interface Builder for the table view and column creation. What I am doing now is creating an NSTableCellView inside NSTableView's delegate method [-NSTableView tableView:

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Jens Alfke
On Jul 11, 2012, at 1:45 PM, Motti Shneor wrote: > I'd like to avoid dynamic auto-generation of methods at runtime. I can't see > why this is needed --- ALL my getters and setters will look exactly the same. It isn't strictly _needed_, but it's the only alternative to creating all the methods

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Dave DeLong
On Jul 11, 2012, at 1:45 PM, Motti Shneor wrote: > Wow, and thanks, everyone. BTW, what does "OP" stand for? (obviously, its > me...) OP = original poster > Of what I read from everyone, and after examining the suggested code from > Jens Alfke, I think I'm inclined to something simpler, hinte

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Eric Gorr
OP = original poster (i.e the person who started the thread) On Jul 11, 2012, at 4:45 PM, Motti Shneor wrote: > Wow, and thanks, everyone. BTW, what does "OP" stand for? (obviously, its > me...) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Motti Shneor
Wow, and thanks, everyone. BTW, what does "OP" stand for? (obviously, its me...) Of what I read from everyone, and after examining the suggested code from Jens Alfke, I think I'm inclined to something simpler, hinted by Keary Suska. Could you spare a few more words on the "undefinedKey" overri

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Quincey Morris
On Jul 11, 2012, at 07:28 , Ken Thomases wrote: > (By the way, you're using the term "proxy" in a manner which I find > confusing.) The term "collection proxy object" is used in NSKeyValueCoding.h -- there's an immutable one from 'valueForKey:' and a mutable one from 'mutableValueForKey:'. By

Re: Custom Reuse Queue

2012-07-11 Thread Joseph Dixon
That seems to be just what I was looking for. Thanks! On Wed, Jul 11, 2012 at 11:15 AM, Andreas Grosam wrote: > > On 11.07.2012, at 18:01, Joseph Dixon wrote: > > > How can I get a notification when an UITableViewCell is about to be > queued > > for reuse (e.g. leaves the screen)? I need to perfo

Re: Custom Reuse Queue

2012-07-11 Thread Andreas Grosam
On 11.07.2012, at 18:01, Joseph Dixon wrote: > How can I get a notification when an UITableViewCell is about to be queued > for reuse (e.g. leaves the screen)? I need to perform some work before the > cell is placed back in the reuse queue. I don't think there is a notification. But you may poss

Custom Reuse Queue

2012-07-11 Thread Joseph Dixon
How can I get a notification when an UITableViewCell is about to be queued for reuse (e.g. leaves the screen)? I need to perform some work before the cell is placed back in the reuse queue. Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Instance not responding to selector

2012-07-11 Thread Jens Alfke
On Jul 10, 2012, at 11:11 PM, Erik Stainsby wrote: > - (void) loadFromRule: (RSReactionRule*) rule; The method I was asking about is -[RSReactionRule loadFromPlugin:]. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Jens Alfke
On Jul 11, 2012, at 7:03 AM, Dave DeLong wrote: > You'll have to override +resolveInstanceMethod: to figure out what the user > is trying to do: get or set. You'll use the selector passed in to derive the > key under which you're storing the data in the dictionary. With this > information, yo

Re: Limited-access, KVO-compliant mutable array ?,

2012-07-11 Thread Lane Roathe
On Jul 11, 2012, at 7:34 AM, cocoa-dev-requ...@lists.apple.com wrote: > I still disagree, in the sense that, as a client, I would never expect the > contents of an NSArray to change (only the array assigned to the property). > In practice, that may not matter. In any case, I can live with it. A

Re: Save photo taken by UIImagePickerController

2012-07-11 Thread Vavelin Kevin
Hi Fritz, > By "no longer" called, I assume you mean that it had been called, but the > calls stopped coming. No i mean the function is never called. I've found something who can work perfectly but i need to reopen my PhotoLibrary for using the photo who was just taken. I'm waiting for this

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Ken Thomases
On Jul 11, 2012, at 9:28 AM, Ken Thomases wrote: > On Jul 11, 2012, at 1:45 AM, Quincey Morris wrote: > >> There isn't AFAIK a really easy way to prevent clients that aren't >> supposed to mutate the property from just invoking 'mutableArrayValueForKey: >> @""' by themselves. > Another ap

Re: Instance not responding to selector

2012-07-11 Thread Erik Stainsby
On 2012-07-11, at 7:13 AM, Fritz Anderson wrote: > On 11 Jul 2012, at 1:33 AM, Erik Stainsby wrote: > >> I should have stated that I am building against 10.8, and using ARC, and >> using Xcode 4.4DP6 > > Then I can't help. Aside from the fact that my problem-solving technique* > would requi

Re: Instance not responding to selector

2012-07-11 Thread Erik Stainsby
On 2012-07-10, at 11:47 PM, Quincey Morris wrote: > On Jul 10, 2012, at 23:11 , Erik Stainsby wrote: > >> @interface RSReactionPlugin : RSTrixiePlugin >> >> // various properties >> >> - (void) loadFromRule: (RSReactionRule*) rule; >> >> @end > > Are you sure that's what you mean? Accordi

Re: Save photo taken by UIImagePickerController

2012-07-11 Thread Fritz Anderson
On 11 Jul 2012, at 7:18 AM, Vavelin Kevin wrote: > As you can see, i'm french :) This code works perfectly, I can access to my > PhotoLibrary and save the picture in my app but here's the problem : > - (void) imagePickerController:(UIImagePickerController *)picker > didFinishPickingMediaWithInf

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Ken Thomases
On Jul 11, 2012, at 1:45 AM, Quincey Morris wrote: > There isn't AFAIK a really easy way to prevent clients that aren't > supposed to mutate the property from just invoking 'mutableArrayValueForKey: > @""' by themselves. > > One alternative approach is to use *two* property names: and >

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Keary Suska
On Jul 11, 2012, at 8:03 AM, Dave DeLong wrote: > It sounds like the OP is looking for a model object that uses an > NSMutableDictionary as the backing store for its properties, as opposed to > individual ivars. You can do this. > > You declare all your properties, and you declare a single NSM

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Marco Tabini
On 2012-07-11, at 10:03 AM, Dave DeLong wrote: > It sounds like the OP is looking for a model object that uses an > NSMutableDictionary as the backing store for its properties, as opposed to > individual ivars. You can do this. > > You declare all your properties, and you declare a single NS

Re: Instance not responding to selector

2012-07-11 Thread Fritz Anderson
On 11 Jul 2012, at 1:33 AM, Erik Stainsby wrote: > I should have stated that I am building against 10.8, and using ARC, and > using Xcode 4.4DP6 Then I can't help. Aside from the fact that my problem-solving technique* would require me to sit down for an hour or two and grope around your projec

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Ken Thomases
On Jul 11, 2012, at 2:36 AM, Rick Mann wrote: > I still disagree, in the sense that, as a client, I would never expect the > contents of an NSArray to change (only the array assigned to the property). That expectation was/is unfounded. In fact, I suspect you don't even expect it as often as yo

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Dave DeLong
It sounds like the OP is looking for a model object that uses an NSMutableDictionary as the backing store for its properties, as opposed to individual ivars. You can do this. You declare all your properties, and you declare a single NSMutableDictionary ivar. All of the properties should be imp

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Keary Suska
On Jul 11, 2012, at 6:34 AM, Motti Shneor wrote: > Hi. I guess many have already stumped into this one, but my wildest phrasing > attempts in web-searches didn't yield. > > I'd like to have a "data" object, similar to (but much simpler than) CoreData > entity, which only exports a bunch of pro

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread William Squires
This is (one) application of the "wrapper" design pattern - make a class that wraps (contains) an NSMutableArray, and only expose those properties and methods you want clients to have access to. This is possible by declaring public readonly @properties, but redeclaring them in your implementatio

How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Motti Shneor
Hi. I guess many have already stumped into this one, but my wildest phrasing attempts in web-searches didn't yield. I'd like to have a "data" object, similar to (but much simpler than) CoreData entity, which only exports a bunch of properties. Something like @interface MSPersonalData :NSObject

Save photo taken by UIImagePickerController

2012-07-11 Thread Vavelin Kevin
Hi there, I've in my code on method for getting image from UIImagePickerController and another one for taking Picture but i have a problem. It seems that my app don't know what method he has to call. I don't know how to explain so here's the code : //L'utilisateur a selectionner une image. -(vo

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Rick Mann
On Jul 11, 2012, at 0:34 , Quincey Morris wrote: > On Jul 11, 2012, at 00:24 , Quincey Morris wrote: > >> On Jul 10, 2012, at 23:51 , Rick Mann wrote: >> >>> … But it just smells a little funny. >> >> No, your thinking is incorrect, in the sense that … > > Perhaps my way of saying this uninte

Does codesigning or Dev ID ever avoid the quarantine dialog?

2012-07-11 Thread Rick Mann
I thought that code signing OS X apps (even before Dev ID and GateKeeper) allowed you to avoid the "do you really want to launch this quarantined app" dialog, at least after the first launch (i.e., when you ship an update). I had a conversation with an Apple person about this a long time ago, bu

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Quincey Morris
On Jul 11, 2012, at 00:24 , Quincey Morris wrote: > On Jul 10, 2012, at 23:51 , Rick Mann wrote: > >> … But it just smells a little funny. > > No, your thinking is incorrect, in the sense that … Perhaps my way of saying this unintentionally sounded rude. I meant, "your thinking is *a little* i

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Quincey Morris
On Jul 10, 2012, at 23:51 , Rick Mann wrote: > It still bugs me, in the sense that publishing an NSArray* property seems to > create a (conceptual) contract that while the property may change, that is, a > different NSArray may get assigned to it, the contents of a given NSArray > won't change.