Re: Namespace clash problem

2011-10-13 Thread Quincey Morris
On Oct 13, 2011, at 18:55 , Graham Cox wrote:

> Looks like I have no choice but to change the method name for the class 
> method at least :(

Incidentally, I've been trying to remember for months why using a class object 
(plus static variables) wasn't a satisfactory implementation of a singleton, 
and I think this was the reason. In some cases, such as what you're doing, or 
passing the object as an 'id' or 'void*' context parameter, you basically lose 
the ability to send messages to the object.

You'd probably be better off redesigning the class so that the behavior is 
given to a singleton instance of the class, rather than to the class 
itself.___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: -viewDidUnload not always called?

2011-10-13 Thread David Rowland
My understanding is this, a diagram I made to visualize the process,

http://drowland.net/iOS%20Class/View%20Controller%20unloading.pdf



On Oct 13, 2011, at 8:02 AM, Fritz Anderson wrote:

> On 12 Oct 2011, at 5:39 PM, Rick Mann wrote:
> 
>> I can't tell from the docs for -viewDidUnload if it is not guaranteed to be 
>> called when cleaning up. It does say that it's called for low-memory 
>> situations, but also says it's called as a counterpart to -viewDidLoad, 
>> which is always called when a view controller is created.
> 
> The docs say specifically: 
>> When a low-memory condition occurs and the current view controller’s views 
>> are not needed, the system may opt to remove those views from memory.
> 
> It doesn't refer to any other scenario, and given that the recommendation is 
> that -viewDidUnload do many of the same releases (+ plus nil-outs) as would 
> be done in -dealloc, I take it that low-memory (and therefore -viewDidUnload) 
> and deallocation are separate paths.
> 
>   — F
> 
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/rowlandd%40sbcglobal.net
> 
> This email sent to rowla...@sbcglobal.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSArrayController Update Delay

2011-10-13 Thread Steve Steinitz
Hi Richard,

The advice you've received already is more sound than what I'm about to tell 
you.  But my crude technique has solved the problem you mention and similar 
problems.  

I wrote the following class method on a utility class into which I throw stuff:

+ (void)
waitUntilEndOfNextRunLoop
{
[[NSRunLoop mainRunLoop] runUntilDate:[NSDate distantPast]];  // finish 
current iteration
[[NSRunLoop mainRunLoop] runUntilDate:[NSDate distantPast]];  // once 
more so selection updates
}

Whenever I have a problem like the one you mention, I invoke that method and 
all is well.  I confess, I invoke it right and left.  I has no effect on 
performance that I can notice.  But its far from pretty.

Cheers,

Steve

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa-dev Digest, Vol 8, Issue 822

2011-10-13 Thread Daniel Steinberg
Mark's interview is up

D
On Oct 13, 2011, at 9:35 PM, cocoa-dev-requ...@lists.apple.com wrote:

> Send Cocoa-dev mailing list submissions to
>   cocoa-dev@lists.apple.com
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://lists.apple.com/mailman/listinfo/cocoa-dev
> or, via email, send a message with subject or body 'help' to
>   cocoa-dev-requ...@lists.apple.com
> 
> You can reach the person managing the list at
>   cocoa-dev-ow...@lists.apple.com
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Cocoa-dev digest..."
> 
> 
> Today's Topics:
> 
>   1. NSArrayController Update Delay (Richard Somers)
>   2. Re: Select model objects with NSTableView using cocoa
>  bindings (Luc Van Bogaert)
>   3. Re: NSArrayController Update Delay (Keary Suska)
>   4. Re: Select model objects with NSTableView using cocoa
>  bindings (Quincey Morris)
>   5. Re: NSArrayController Update Delay (Richard Somers)
>   6. Re: NSArrayController Update Delay (Mike Abdullah)
>   7. Re: Reusing XCode 4 Core Data Model. (Ben)
>   8. Pop-up menu in NSCollectionView (Graham Cox)
>   9. Namespace clash problem (Graham Cox)
>  10. Re: Pop-up menu in NSCollectionView (Lee Ann Rucker)
>  11. Re: Best way to parse a time today? (Dave DeLong)
>  12. Re: Namespace clash problem (Jens Alfke)
>  13. Re: Namespace clash problem (Kyle Sluder)
>  14. Re: Namespace clash problem (Graham Cox)
> 
> 
> --
> 
> Message: 1
> Date: Thu, 13 Oct 2011 14:20:40 -0600
> From: Richard Somers 
> Subject: NSArrayController Update Delay
> To: cocoa-dev@lists.apple.com
> Message-ID: <2590f57e-4900-4552-beff-d081660bb...@infowest.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Consider a NSArrayController in entity mode. When a managed object is 
> inserted into the managed object context the controller's arrangedObjects 
> property is not updated immediately.
> 
> Calling a controller 'fetch:' immediately after inserting the managed object 
> into the managed object context does not help. The controller's 
> arrangedObjects property is still not updated.
> 
> Perhaps there is a KVO change notification delay between the time when the 
> managed object is inserted into the managed object context and the time when 
> the controller finds out about the change.
> 
> Does anyone have any insight into what is going or how to force the 
> NSArrayController's arrangedObjects property to update?
> 
> Thanks so much.
> 
> --Richard
> 
> 
> 
> --
> 
> Message: 2
> Date: Thu, 13 Oct 2011 22:44:03 +0200
> From: Luc Van Bogaert 
> Subject: Re: Select model objects with NSTableView using cocoa
>   bindings
> To: Quincey Morris 
> Cc: Cocoa Dev List 
> Message-ID: <3af59652-ac10-4fe7-a050-692fe8012...@me.com>
> Content-Type: text/plain; CHARSET=US-ASCII
> 
> On 12 Oct 2011, at 23:22, Quincey Morris wrote:
> 
>> On Oct 12, 2011, at 13:31 , Luc Van Bogaert wrote:
>> 
>>> I'm wondering if I should create a NSIndexSet property in my model object 
>>> and bind it to the NSArrayController's 'selectedIndexes' key?
>> 
>> Yes, but you've got the terminology wrong. The relevant concept here is a 
>> binding name, and it's "selectionIndexes", not "selectedIndexes". 
>> NSArrayController also has a "selectionIndexes" property, but that's what 
>> the table view binds to, and is not involved here (except as an 
>> "intermediary" property between the table view and the data model -- which 
>> is why a NSArrayController is a "mediating" controller.) Also, binding 
>> actually goes in the other direction -- you bind the object with the binding 
>> (the array controller) to the object with the property (the model). But I'm 
>> pretty sure that's what you meant. :)
>> 
> 
> Thanks, I got this working in one 'direction', ie. when the selection in the 
> table is changed, this is reflected in my UI and the 'selected' Dot objects 
> are drawn in a different color. For this, I decided to use a 
> NSMutableIndexSet 'dotSelectionIndexes' property in my model object, bound to 
> the array controller's 'selectionIndexes' binding.
> 
> But I'm afraid this still remains a little blurry on how to get the binding 
> work in the other direction. Meaning, I would like to click a Dot object in 
> my UI to select it, and this should change the selection in the table, 
> resulting in turn in the Dot being redrawn with a different color.
> 
> I was hoping that by just adding or replacing the contents of my 
> 'dotSelectionIndexes' ivar (hence the choice for a NSMutableIndexSet) with 
> the index of the clicked Dot, would trigger a selection change in the table 
> because of the binding. It seems this doesn't work. So, obviously I'm still 
> missing something.
> 
> -- 
> Luc.
> 
> 
> 
> --
> 
> Message: 3
> Date: Thu, 13 Oct 2011 15:12:22 -0600
> From: Keary Suska 
> Subject: Re: NSArrayControl

Re: Namespace clash problem

2011-10-13 Thread Kyle Sluder
On Thu, Oct 13, 2011 at 6:55 PM, Graham Cox  wrote:
> That doesn't work, because it then complains: "warning: instance method 
> 'style' is being used on 'Class' which is not in the root class"

Heh, looks like it picked -style instead of +style. Makes sense, I
guess. The compiler's not going to look at the type of the receiver
and determine "oh, you're being clever and sending +style to a class".
Though maybe it should.

> Looks like I have no choice but to change the method name for the class 
> method at least :(

Looks like it.

--Kyle Sluder
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Namespace clash problem

2011-10-13 Thread Graham Cox
That doesn't work, because it then complains: "warning: instance method 'style' 
is being used on 'Class' which is not in the root class"

Looks like I have no choice but to change the method name for the class method 
at least :(

--Graham




On 14/10/2011, at 12:51 PM, Kyle Sluder wrote:

> On Thu, Oct 13, 2011 at 6:32 PM, Graham Cox  wrote:
>> The object in question is actually a class, where it has a class method 
>> +style. But the class is passed as the 'object' parameter of a notification, 
>> which has type id. How do I typecast that to the precise class type I'm 
>> expecting? Using (MyClass*) doesn't work because that is an instance. It's 
>> probably obvious, but I'm not stumbling upon it...
> 
> Cast it to Class. There's no way to specify "the type of an instance
> of the metaclass MyClass."
> 
> --Kyle Sluder

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Namespace clash problem

2011-10-13 Thread Kyle Sluder
On Thu, Oct 13, 2011 at 6:32 PM, Graham Cox  wrote:
> The object in question is actually a class, where it has a class method 
> +style. But the class is passed as the 'object' parameter of a notification, 
> which has type id. How do I typecast that to the precise class type I'm 
> expecting? Using (MyClass*) doesn't work because that is an instance. It's 
> probably obvious, but I'm not stumbling upon it...

Cast it to Class. There's no way to specify "the type of an instance
of the metaclass MyClass."

--Kyle Sluder
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Namespace clash problem

2011-10-13 Thread Graham Cox
Ah, that's clear, but I now see why I'm going wrong.

The object in question is actually a class, where it has a class method +style. 
But the class is passed as the 'object' parameter of a notification, which has 
type id. How do I typecast that to the precise class type I'm expecting? Using 
(MyClass*) doesn't work because that is an instance. It's probably obvious, but 
I'm not stumbling upon it...

--Graham


On 14/10/2011, at 11:28 AM, Jens Alfke wrote:

> 
> On Oct 13, 2011, at 4:29 PM, Graham Cox wrote:
> 
>> When I go into this warning, it further states it's using 
>> [NSProgressIndicator style] instead of my own declared method style which 
>> exists in many different objects (and which would be correct).
> 
> This only happens when calling -style on an untyped (id) pointer. Cast the 
> pointer to your class and you won’t have a problem. Instead of
>   [[array lastObject] style]
> use
>   [(MyClass*)[array lastObject] style]
> This has the added advantage that, if you ever renamed or removed your -style 
> method, the compiler would be able to warn you if you didn’t fix this call.
> 
>> ( why do Apple have to steal such obvious names when they know there 
>> is a namespace problem? This could easily have been named 
>> 'progressIndicatorStyle' and have much less chance of clashing with user 
>> code.
> 
> I would rather have shorter, clearer names in framework classes. The 
> name-collision thing doesn’t happen to me often, and when it does I just use 
> a typecast like above.
> 
> —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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Namespace clash problem

2011-10-13 Thread Kyle Sluder
On Thu, Oct 13, 2011 at 4:29 PM, Graham Cox  wrote:
> Typecasting the return type to be the explicit object type I expect does not 
> eliminate the warning.

You need to typecast the recipient, not the return type.

--Kyle Sluder
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Namespace clash problem

2011-10-13 Thread Jens Alfke

On Oct 13, 2011, at 4:29 PM, Graham Cox wrote:

> When I go into this warning, it further states it's using 
> [NSProgressIndicator style] instead of my own declared method style which 
> exists in many different objects (and which would be correct).

This only happens when calling -style on an untyped (id) pointer. Cast the 
pointer to your class and you won’t have a problem. Instead of
[[array lastObject] style]
use
[(MyClass*)[array lastObject] style]
This has the added advantage that, if you ever renamed or removed your -style 
method, the compiler would be able to warn you if you didn’t fix this call.

> ( why do Apple have to steal such obvious names when they know there is 
> a namespace problem? This could easily have been named 
> 'progressIndicatorStyle' and have much less chance of clashing with user code.

I would rather have shorter, clearer names in framework classes. The 
name-collision thing doesn’t happen to me often, and when it does I just use a 
typecast like above.

—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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Best way to parse a time today?

2011-10-13 Thread Dave DeLong
Yep, this is what I was referring to.  I'm not sure there's anything you can do 
about this, since it's technically the input that is incorrect.  However, it's 
still good to be aware that these edge cases exist.

Dave

On Oct 13, 2011, at 10:39 AM, Rick Mann wrote:

> I think the concern is this. Say today is the day that a time change occurs. 
> In the US, this happens at 2 am. When you move the clocks forward, the 
> instant the clock would roll from 1:59:59.999 to 2:00:00.000, it actually 
> rolls to 3:00:00.000. All of the times in the half-open interval (2:00, 3:00] 
> are "invalid."
> 
> So, if on that day, I try to parse the string "02:17", what's the right 
> result? My guess would be "03:17", but I'd have to test that case to be sure 
> it does that.
> 
> -- 
> Rick
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Pop-up menu in NSCollectionView

2011-10-13 Thread Lee Ann Rucker
Mine works fine on 10.6 and 10.7, but I'm implementing menuForEvent: in my 
NSCollectionView subclass instead of using bindings 

On Oct 13, 2011, at 4:13 PM, Graham Cox wrote:

> I'm using NSCollectionView to display a bunch of items. I have the 'menu' 
> outlet of this view connected to a menu which in turn sends an action to 
> File's Owner.
> 
> On 10.7 this works as expected (menu is displayed when right-clicking in the 
> view), but on 10.6.x, the menu is not displayed.
> 
> Does anyone know why this is and whether it's possible to work around it?
> 
> --Graham
> 
> 
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com
> 
> This email sent to lruc...@vmware.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Namespace clash problem

2011-10-13 Thread Graham Cox
I just updated to Xcode 4.2 from 4.1, and I'm getting a new warning when I 
compile: "Multiple methods named 'style' found"

When I go into this warning, it further states it's using [NSProgressIndicator 
style] instead of my own declared method style which exists in many different 
objects (and which would be correct).

( why do Apple have to steal such obvious names when they know there is a 
namespace problem? This could easily have been named 'progressIndicatorStyle' 
and have much less chance of clashing with user code. I may have been a bit too 
generic using 'style' myself, but on the other hand I have something actually 
called a style which is an object and so using the property 'style' is actually 
appropriate! )

The question is, while this doesn't seem to cause any problems, I'm a little 
concerned because a) I didn't get this warning in previous versions of Xcode, 
b) the return types are different (NSUInteger versus an id) and c) I don't like 
having warnings. Changing my code to eliminate this name is going to be very, 
very difficult - it's used in hundreds of different places. Typecasting the 
return type to be the explicit object type I expect does not eliminate the 
warning. (I'm thinking it's safe because the return type of NSUInteger and id 
uses the same version of objc_message_send, but that's just lucky. If Apple's 
property returned a float I"d be in serious trouble.)

Is there a way to force the compiler to use the correct one?

--Graham___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Pop-up menu in NSCollectionView

2011-10-13 Thread Graham Cox
I'm using NSCollectionView to display a bunch of items. I have the 'menu' 
outlet of this view connected to a menu which in turn sends an action to File's 
Owner.

On 10.7 this works as expected (menu is displayed when right-clicking in the 
view), but on 10.6.x, the menu is not displayed.

Does anyone know why this is and whether it's possible to work around it?

--Graham


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Reusing XCode 4 Core Data Model.

2011-10-13 Thread Ben
Thanks for the reply. I previously attempted to copy the way you suggest, but 
sadly it also does not work. 


On 13 Oct 2011, at 18:17, Martin Hewitson wrote:

> I think selecting the entities in the other non-graphical editor works for 
> copy and paste.
> 
> Martin
> 
> On Oct 13, 2011, at 01:12 PM, Ben wrote:
> 
>> In Xcode 3, if I needed to reuse parts of the Core Data Model from a 
>> previous project, I would simply highlight the entities required in the 
>> Graph Editor, copy then paste them into the Graph Editor of my new project… 
>> simple.
>> 
>> XCode 4 however… when I try to copy and past the entities, nothing.  How do 
>> I achieve the same thing in XCode 4? 
>> ___
>> 
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/martin.hewitson%40aei.mpg.de
>> 
>> This email sent to martin.hewit...@aei.mpg.de
> 
> 
> Martin Hewitson
> Albert-Einstein-Institut
> Max-Planck-Institut fuer 
>Gravitationsphysik und Universitaet Hannover
> Callinstr. 38, 30167 Hannover, Germany
> Tel: +49-511-762-17121, Fax: +49-511-762-5861
> E-Mail: martin.hewit...@aei.mpg.de
> WWW: http://www.aei.mpg.de/~hewitson
> 
> 
> 
> 
> 
> 

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSArrayController Update Delay

2011-10-13 Thread Mike Abdullah

On 13 Oct 2011, at 21:20, Richard Somers wrote:

> Consider a NSArrayController in entity mode. When a managed object is 
> inserted into the managed object context the controller's arrangedObjects 
> property is not updated immediately.
> 
> Calling a controller 'fetch:' immediately after inserting the managed object 
> into the managed object context does not help. The controller's 
> arrangedObjects property is still not updated.
> 
> Perhaps there is a KVO change notification delay between the time when the 
> managed object is inserted into the managed object context and the time when 
> the controller finds out about the change.
> 
> Does anyone have any insight into what is going or how to force the 
> NSArrayController's arrangedObjects property to update?

I'm pretty sure the array controller is observing 
NSManagedObjectContextObjectsDidChangeNotification to arrange its objects. 
Normally, this doesn't fire until the end of the runloop. But you can force it 
to by calling -[NSManagedObjectContext processPendingChanges]

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSArrayController Update Delay

2011-10-13 Thread Richard Somers
On Oct 13, 2011, at 3:12 PM, Keary Suska wrote:

> How is this happening? Via code? or Via the NSArrayController (add: or 
> insert:)? In the latter case the docs say, "Beginning with Mac OS X v10.4 the 
> result of this method is deferred until the next iteration of the runloop so 
> that the error presentation mechanism can provide feedback as a sheet."

I have been inserting objects into the managed object context in code like this.

 [[NSManagedObject alloc] initWithEntity:entity 
insertIntoManagedObjectContext:moc];

Sometime later the array controller's arrangedObjects property will be 
automatically updated.

I have not been using NSArrayController's add: or insert: methods because at 
one time I was using them, in addition to 
initWithEntity:insertIntoManagedObjectContext:, and I was getting duplicate 
objects. Although I tried using both of them together just now (first 
initWithEntity:insertIntoManagedObjectContext: and then add:) and I am not 
getting any duplicates. So I am a little confused.

Is it normal practice to create a managed object with the designated 
initializer initWithEntity:insertIntoManagedObjectContext: and also insert the 
object into the controller using the controller's add: or insert: method?

--Richard

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Select model objects with NSTableView using cocoa bindings

2011-10-13 Thread Quincey Morris
On Oct 13, 2011, at 13:44 , Luc Van Bogaert wrote:

> Thanks, I got this working in one 'direction', ie. when the selection in the 
> table is changed, this is reflected in my UI and the 'selected' Dot objects 
> are drawn in a different color. For this, I decided to use a 
> NSMutableIndexSet 'dotSelectionIndexes' property in my model object, bound to 
> the array controller's 'selectionIndexes' binding.

… bound *from* … ;)

> But I'm afraid this still remains a little blurry on how to get the binding 
> work in the other direction. Meaning, I would like to click a Dot object in 
> my UI to select it, and this should change the selection in the table, 
> resulting in turn in the Dot being redrawn with a different color.
> 
> I was hoping that by just adding or replacing the contents of my 
> 'dotSelectionIndexes' ivar (hence the choice for a NSMutableIndexSet) with 
> the index of the clicked Dot, would trigger a selection change in the table 
> because of the binding. It seems this doesn't work. So, obviously I'm still 
> missing something.

So close! A simple NSMutableIndexSet property isn't KVO compliant, but the 
array controller bound *to* it is watching with KVO, so the thing fizzles.

Use a NSIndexSet property instead of a NSMutableIndexSet, and change the 
property by assigning it a new (immutable) index set -- that is, via the setter.

This means that you'll create many NSIndexSet objects at times, but unless you 
have vast numbers of Dot objects this is not likely to make a measurable impact 
on performance. If it did, it's not that hard to use a NSIndexSet property 
backed by a NSMutableIndexSet ivar, along with some non-standard non-KVC 
accessors your Dot objects would use to update the property, but you'd have to 
generate the requisite KVO notifications manually, and write a custom setter.


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSArrayController Update Delay

2011-10-13 Thread Keary Suska
On Oct 13, 2011, at 2:20 PM, Richard Somers wrote:

> Consider a NSArrayController in entity mode. When a managed object is 
> inserted into the managed object context the controller's arrangedObjects 
> property is not updated immediately.

How is this happening? Via code? or Via the NSArrayController (add: or 
insert:)? In the latter case the docs say, "Beginning with Mac OS X v10.4 the 
result of this method is deferred until the next iteration of the runloop so 
that the error presentation mechanism can provide feedback as a sheet."

> Calling a controller 'fetch:' immediately after inserting the managed object 
> into the managed object context does not help. The controller's 
> arrangedObjects property is still not updated.
> 
> Perhaps there is a KVO change notification delay between the time when the 
> managed object is inserted into the managed object context and the time when 
> the controller finds out about the change.

Not in my experience (except as noted above).

> Does anyone have any insight into what is going or how to force the 
> NSArrayController's arrangedObjects property to update?

If the action has been deferred as described above, you are mostly out of luck. 
You could chance manually turning the runloop but it is fragile and generally 
recommended against.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Select model objects with NSTableView using cocoa bindings

2011-10-13 Thread Luc Van Bogaert
On 12 Oct 2011, at 23:22, Quincey Morris wrote:

> On Oct 12, 2011, at 13:31 , Luc Van Bogaert wrote:
> 
>> I'm wondering if I should create a NSIndexSet property in my model object 
>> and bind it to the NSArrayController's 'selectedIndexes' key?
> 
> Yes, but you've got the terminology wrong. The relevant concept here is a 
> binding name, and it's "selectionIndexes", not "selectedIndexes". 
> NSArrayController also has a "selectionIndexes" property, but that's what the 
> table view binds to, and is not involved here (except as an "intermediary" 
> property between the table view and the data model -- which is why a 
> NSArrayController is a "mediating" controller.) Also, binding actually goes 
> in the other direction -- you bind the object with the binding (the array 
> controller) to the object with the property (the model). But I'm pretty sure 
> that's what you meant. :)
> 

Thanks, I got this working in one 'direction', ie. when the selection in the 
table is changed, this is reflected in my UI and the 'selected' Dot objects are 
drawn in a different color. For this, I decided to use a NSMutableIndexSet 
'dotSelectionIndexes' property in my model object, bound to the array 
controller's 'selectionIndexes' binding.

But I'm afraid this still remains a little blurry on how to get the binding 
work in the other direction. Meaning, I would like to click a Dot object in my 
UI to select it, and this should change the selection in the table, resulting 
in turn in the Dot being redrawn with a different color.

I was hoping that by just adding or replacing the contents of my 
'dotSelectionIndexes' ivar (hence the choice for a NSMutableIndexSet) with the 
index of the clicked Dot, would trigger a selection change in the table because 
of the binding. It seems this doesn't work. So, obviously I'm still missing 
something.

-- 
Luc.

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSArrayController Update Delay

2011-10-13 Thread Richard Somers
Consider a NSArrayController in entity mode. When a managed object is inserted 
into the managed object context the controller's arrangedObjects property is 
not updated immediately.

Calling a controller 'fetch:' immediately after inserting the managed object 
into the managed object context does not help. The controller's arrangedObjects 
property is still not updated.

Perhaps there is a KVO change notification delay between the time when the 
managed object is inserted into the managed object context and the time when 
the controller finds out about the change.

Does anyone have any insight into what is going or how to force the 
NSArrayController's arrangedObjects property to update?

Thanks so much.

--Richard

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Retain/Release and Properties clarification

2011-10-13 Thread David Rowland
However, if the property is readonly I think you must use direct access to set 
an initial value. The setter does not exist.


David Rowland

On Oct 13, 2011, at 10:54 AM, Bayes Scott F wrote:

> Thank you, David.
> 
> Sounds like safety first for my code: always use the setter/getter for 
> synthesized properties, even in self.
> 
> Or use ivars.
> 
> ScottB
> 
> On Oct 12, 2011, at 09:21 , Bayes Scott F wrote:
> 
>> Someone on Matt's site mentioned the possibility that the synthesized ivar 
>> could be implemented indirectly, say as a member of a collection. Since the 
>> implementation's opaque, we don't know if that ever can happen.
>> 
>> So, is self->mySynthIvar safe (both lvalue and rvalue), or should we be 
>> messaging?
>> 
>> And does the compiler ever shortcut something like self.mySynthSimpleIntVar 
>> to self->mySynthSimpleIntVar, or does it always use the setter/getter?
>> 
>> Thanks
>> 
>> 
>> ScottB
>> 
>> On Oct 11, 2011, at 10:12 , David Duncan wrote:
>> 
>>> On Oct 11, 2011, at 9:57 AM, Matt Neuburg wrote:
>>> 
 I did everything "right" when I named an ivar "firstResponder" (property, 
 synthesized ivar, synthesized accessors) and totally broke my app because 
 Apple was apparently already using an undocumented ivar called 
 "firstResponder".
 
 http://www.cocoabuilder.com/archive/cocoa/296662-assign-property-behaves-differently-from-simple-instance-variable.html
>>> 
>>> The problem wasn't an undocumented ivar, it was an undocumented method. The 
>>> @synthesize thus overrode the existing method and broke your project 
>>> because parts of UIKit were expecting the default implementation and got 
>>> your implementation instead.
>>> 
>>> As a rule, we strive to avoid this situation, but unfortunately this does 
>>> happen on occasion.
>>> 
 Also, note that there are circumstances where a synthesized ivar won't 
 work; see, for instance, this note:
 
 http://www.cocoabuilder.com/archive/cocoa/298320-inherited-implicitly-created-member-is-no-member.html
>>> 
>>> The gist of this is that synthesized ivars are private, and the public 
>>> interface (the @property) doesn't tell you about private implementation 
>>> details (the ivar). As such, subclasses can't get at synthesized ivars, 
>>> precisely because the @synthesize declaration is hidden from them.
>>> --
>>> David Duncan
>>> 
>>> ___
>>> 
>>> 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:
>>> http://lists.apple.com/mailman/options/cocoa-dev/scottbayes-dev%40comcast.net
>>> 
>>> This email sent to scottbayes-...@comcast.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:
>> http://lists.apple.com/mailman/options/cocoa-dev/scottbayes-dev%40comcast.net
>> 
>> This email sent to scottbayes-...@comcast.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:
> http://lists.apple.com/mailman/options/cocoa-dev/rowlandd%40sbcglobal.net
> 
> This email sent to rowla...@sbcglobal.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about SMJobBless

2011-10-13 Thread Eric Gorr
If anyone is interested, this (probably) turned out to be a bug and one has 
been filed. rdar://10280469

The way the system currently works is that it will ask for an admin password 
every time regardless of whether or not the SMJobBless function needs to 
install the helper tool or not. The bug is (probably) that a admin password 
request should not be made if the helper tool does not need to be installed 
(for example, it is already installed and has the same version as the one in 
the app bundle).

So, what this means is that the determination of whether or not the helper tool 
needs to be installed needs to be made before a call to SMJobBless and 
SMJobBless should only be called if it is already known the helper tool needs 
to be installed.

In my case, I only need to check whether the tool is installed 
(SMJobCopyDictionary handles this) and, if the tool is installed, whether or 
not it's version is older then the version of the tool in my app bundle.

Some (incomplete) code to check whether the tool is installed and what the 
versions are is below. 

There is another alternative to do a version check of the helper tool which is 
for the helper tool to receive a request for it's version and for it to send a 
version reply back. Personally, I like the method below, but wanted to mention 
this alternative as it may be the best path in some situations.


> --
> VV
> --
> NSDictionary* installedHelperJobData;
> 
> installedHelperJobData  = (NSDictionary*)SMJobCopyDictionary( 
> kSMDomainSystemLaunchd, (CFStringRef)@"com.apple.bsd.SMJobBlessHelper" );
> 
> NSString*   installedPath   = [[installedHelperJobData 
> objectForKey:@"ProgramArguments"] objectAtIndex:0];
> NSURL*  installedPathURL= [NSURL 
> fileURLWithPath:installedPath];
> 
> NSDictionary*   installedInfoPlist  = 
> (NSDictionary*)CFBundleCopyInfoDictionaryForURL( (CFURLRef)installedPathURL );
> NSString*   installedBundleVersion  = [installedInfoPlist 
> objectForKey:@"CFBundleVersion"];
> NSInteger   installedVersion= [installedBundleVersion 
> integerValue];
> 
> NSLog( @"installedVersion: %ld", (long)installedVersion );
> 
> NSBundle*   appBundle   = [NSBundle mainBundle];
> NSURL*  appBundleURL= [appBundle bundleURL];
> 
> NSURL*  currentHelperToolURL= [appBundleURL 
> URLByAppendingPathComponent:@"Contents/Library/LaunchServices/com.apple.bsd.SMJobBlessHelper"];
> NSDictionary*   currentInfoPlist= 
> (NSDictionary*)CFBundleCopyInfoDictionaryForURL( 
> (CFURLRef)currentHelperToolURL );
> NSString*   currentBundleVersion= [currentInfoPlist 
> objectForKey:@"CFBundleVersion"];
> NSInteger   currentVersion  = [currentBundleVersion integerValue];
> 
> NSLog( @"currentVersion: %ld", (long)currentVersion );
> --
> ^^
> --





On Sep 29, 2011, at 4:45 PM, Eric Gorr wrote:

> I cannot seem to locate any documentation on this, so hopefully someone can 
> confirm the behavior I am seeing with Apple's sample SMJobBless code located 
> at:
> 
> http://developer.apple.com/library/mac/#samplecode/SMJobBless/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010071
> 
> I was under the impression that it would only ask for an admin password if it 
> detected a that a new version of the helper tool needed to be installed.
> 
> However, this impression is apparently incorrect.
> 
> The behavior I am seeing under 10.6 is that if I launch the app for the first 
> time, it will ask for the password. If I launch almost immediately, it won't. 
> However, if I wait a long enough time, it will ask for the password again. 
> During all of this, the helper tool does not change.
> 
> Can anyone point to documentation that defines this as the correct behavior?
> 
> Thank you.
> 

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Retain/Release and Properties clarification

2011-10-13 Thread Bayes Scott F
Thank you, David.

Sounds like safety first for my code: always use the setter/getter for 
synthesized properties, even in self.

Or use ivars.

ScottB

On Oct 12, 2011, at 09:21 , Bayes Scott F wrote:

> Someone on Matt's site mentioned the possibility that the synthesized ivar 
> could be implemented indirectly, say as a member of a collection. Since the 
> implementation's opaque, we don't know if that ever can happen.
> 
> So, is self->mySynthIvar safe (both lvalue and rvalue), or should we be 
> messaging?
> 
> And does the compiler ever shortcut something like self.mySynthSimpleIntVar 
> to self->mySynthSimpleIntVar, or does it always use the setter/getter?
> 
> Thanks
> 
> 
> ScottB
> 
> On Oct 11, 2011, at 10:12 , David Duncan wrote:
> 
>> On Oct 11, 2011, at 9:57 AM, Matt Neuburg wrote:
>> 
>>> I did everything "right" when I named an ivar "firstResponder" (property, 
>>> synthesized ivar, synthesized accessors) and totally broke my app because 
>>> Apple was apparently already using an undocumented ivar called 
>>> "firstResponder".
>>> 
>>> http://www.cocoabuilder.com/archive/cocoa/296662-assign-property-behaves-differently-from-simple-instance-variable.html
>> 
>> The problem wasn't an undocumented ivar, it was an undocumented method. The 
>> @synthesize thus overrode the existing method and broke your project because 
>> parts of UIKit were expecting the default implementation and got your 
>> implementation instead.
>> 
>> As a rule, we strive to avoid this situation, but unfortunately this does 
>> happen on occasion.
>> 
>>> Also, note that there are circumstances where a synthesized ivar won't 
>>> work; see, for instance, this note:
>>> 
>>> http://www.cocoabuilder.com/archive/cocoa/298320-inherited-implicitly-created-member-is-no-member.html
>> 
>> The gist of this is that synthesized ivars are private, and the public 
>> interface (the @property) doesn't tell you about private implementation 
>> details (the ivar). As such, subclasses can't get at synthesized ivars, 
>> precisely because the @synthesize declaration is hidden from them.
>> --
>> David Duncan
>> 
>> ___
>> 
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/scottbayes-dev%40comcast.net
>> 
>> This email sent to scottbayes-...@comcast.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:
> http://lists.apple.com/mailman/options/cocoa-dev/scottbayes-dev%40comcast.net
> 
> This email sent to scottbayes-...@comcast.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


iOS4: AVFoundation, determining video aspect ratio and orientation

2011-10-13 Thread John Michael Zorko

Hello, all ...

I'm developing a video recording / playback app for a client. It works, but 
when playing back the video from the internet, I want to get information 
regarding the aspect ratio and orientation of the video i.e. if it was recorded 
when the device was in portrait or landscape. I'm not sure how to get this 
information from the AVAsset. Is there a way i've missed?

Regards,

John

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Best way to parse a time today?

2011-10-13 Thread Rick Mann
I think the concern is this. Say today is the day that a time change occurs. In 
the US, this happens at 2 am. When you move the clocks forward, the instant the 
clock would roll from 1:59:59.999 to 2:00:00.000, it actually rolls to 
3:00:00.000. All of the times in the half-open interval (2:00, 3:00] are 
"invalid."

So, if on that day, I try to parse the string "02:17", what's the right result? 
My guess would be "03:17", but I'd have to test that case to be sure it does 
that.

-- 
Rick

On Oct 13, 2011, at 5:34 , Tom Hohensee wrote:

> I use the same approach the Roger pointed out  and have not encountered any 
> problems as well.  However, I not only set the time but the date (month, day, 
> year) as well.  The DST boundries should not matter since I am decomposing 
> today's date [NSDate date],  which is set by the end user's time settings in 
> system preferences.  Is this not correct? 
> 
> Thanks.
> 
> Tom
> 
> On Oct 12, 2011, at 9:01 PM, Roger Dalal wrote:
> 
>> Dave:
>> 
>> Would it be possible for you to present an improved approach, please? I use 
>> this solution frequently, and have not yet encountered any issues, but now 
>> you have me worried! What approach do you suggest?
>> 
>> Roger Dalal
>> 
>> 
>> On Oct 12, 2011, at 9:49 PM, Dave DeLong wrote:
>> 
>>> Be careful with this approach, since there are some weird edge cases where 
>>> that time may not exist on the proposed day (think DST boundaries). 
>>> 
>>> Dave
>>> 
>>> Sent from my iPhone
>>> 
>>> On Oct 12, 2011, at 6:46 PM, Roger Dalal  wrote:
>>> 
 Rick:
 
 The following code, which is likely what you are doing, will return the 
 time in 1970 (NSDate's reference date) because you have not specified a 
 date:
 
 NSString *timeString = @"14:50 PDT";
 NSDateFormatter *df = [[NSDateFormatter alloc ] init];
 [df setDateFormat:@"HH':'mm zzz"];
 NSDate *date = [df dateFromString:timeString];
 [df release];
 
 
 Instead, you need to use date components to set the day as well as the 
 time, per the following:
 
 NSString *timeString = @"14:50 PDT";
 NSDateFormatter *df = [[NSDateFormatter alloc ] init];
 [df setDateFormat:@"HH':'mm zzz"];
 NSDate *date = [df dateFromString:timeString];
 
 NSCalendar *calendar = [NSCalendar currentCalendar];
 NSDateComponents *dateComponents = [calendar components:( 
 NSYearCalendarUnit | NSMonthCalendarUnit |  NSDayCalendarUnit ) 
 fromDate:[NSDate date]];
 NSDateComponents *timeComponents = [calendar components:( 
 NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit ) 
 fromDate: date ];
 
 [dateComponents setHour:[timeComponents hour]];
 [dateComponents setMinute:[timeComponents minute]];
 [dateComponents setSecond:[timeComponents second]];
 
 NSDate *timeToday = [calendar dateFromComponents:dateComponents];
 [df release];
 
 Change 'fromDate' in NSDateComponents *dateComponents to whatever date you 
 want in order to create your time on a different day.
 
 Best Wishes.
 
 Roger Dalal
 
 
 
 
 On Oct 12, 2011, at 9:30 PM, Rick Mann wrote:
 
> I have a situation where I have to parse times like "14:50 PDT". If I 
> just set up an NSDateFormatter with dateFormat = @"HH:mm z", I end up 
> with a time of day in 1970.
> 
> What's the best way to get it to give me that time of day today?
> 
> Thanks,
> Rick
> 
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/roger.dalal%40gmail.com
> 
> This email sent to roger.da...@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:
 http://lists.apple.com/mailman/options/cocoa-dev/davedelong%40me.com
 
 This email sent to davedel...@me.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:
>> http://lists.apple.com/mailman/options/cocoa-dev/tom.hohensee%40gmail.com
>> 
>> This email sent to tom.hohen...@gmail.com
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderat

Re: -viewDidUnload not always called?

2011-10-13 Thread Rick Mann

On Oct 13, 2011, at 8:02 , Fritz Anderson wrote:

> On 12 Oct 2011, at 5:39 PM, Rick Mann wrote:
> 
>> I can't tell from the docs for -viewDidUnload if it is not guaranteed to be 
>> called when cleaning up. It does say that it's called for low-memory 
>> situations, but also says it's called as a counterpart to -viewDidLoad, 
>> which is always called when a view controller is created.
> 
> The docs say specifically: 
>> When a low-memory condition occurs and the current view controller’s views 
>> are not needed, the system may opt to remove those views from memory.
> 
> It doesn't refer to any other scenario, and given that the recommendation is 
> that -viewDidUnload do many of the same releases (+ plus nil-outs) as would 
> be done in -dealloc, I take it that low-memory (and therefore -viewDidUnload) 
> and deallocation are separate paths.

Except it does say "called as a counterpart to -viewDidLoad", implying a 
symmetry between those two. Moreover, it just "makes sense" (to me, anyway), 
that for every call to -viewDidLoad, you'd also get a (single) call to 
-viewDidUnload.

You're right, however, that the requirement to release views in -dealloc, too, 
would be redundant if the symmetry were preserved.

It's less elegant this way, for sure. And I don't think it can guarantee that 
-viewDidUnload AND -dealloc won't both be called.

-- 
Rick

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Problem with AVFoundation

2011-10-13 Thread Jim Adams
Now that iOS 5 is out there and we are no longer under the NDA I will repost 
this question. Really it probably has nothing to do with iOS 5 but everything 
about how to fix odd installer issues.


Ever since I installed Lion on my iMac I have been having troubles when I try 
to play sounds in the Simulator. My App works on the device and is in the App 
Store no problems. I just downloaded iOS5 to prepare for the launch and still 
have the same problem but I have not loaded the OS on my device so I can't 
test. When I test in the iPhone 5 Simulator I get the following error:

Error loading 
/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn:
  
dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn,
 262): Symbol not found: ___CFObjCIsCollectable
  Referenced from: 
/System/Library/Frameworks/Security.framework/Versions/A/Security
  Expected in: 
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
 in /System/Library/Frameworks/Security.framework/Versions/A/Security

When I try this in the iPhone 4.3 simulator it just crashes with an exception 
that tells me nothing. Any thoughts on what this is and how to fix it? Am I 
forced to uninstall Xcode and reinstall?


Jim Adams
http://www.adamsdev.us


Jim Adams
jim.ad...@sas.com
Principal Systems Developer
SAS Institute


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Reusing XCode 4 Core Data Model.

2011-10-13 Thread Martin Hewitson
I think selecting the entities in the other non-graphical editor works for copy 
and paste.

Martin

On Oct 13, 2011, at 01:12 PM, Ben wrote:

> In Xcode 3, if I needed to reuse parts of the Core Data Model from a previous 
> project, I would simply highlight the entities required in the Graph Editor, 
> copy then paste them into the Graph Editor of my new project… simple.
> 
> XCode 4 however… when I try to copy and past the entities, nothing.  How do I 
> achieve the same thing in XCode 4? 
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/martin.hewitson%40aei.mpg.de
> 
> This email sent to martin.hewit...@aei.mpg.de


Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer 
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: martin.hewit...@aei.mpg.de
WWW: http://www.aei.mpg.de/~hewitson






___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Reusing XCode 4 Core Data Model.

2011-10-13 Thread Ben
In Xcode 3, if I needed to reuse parts of the Core Data Model from a previous 
project, I would simply highlight the entities required in the Graph Editor, 
copy then paste them into the Graph Editor of my new project… simple.

XCode 4 however… when I try to copy and past the entities, nothing.  How do I 
achieve the same thing in XCode 4? 
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: -viewDidUnload not always called?

2011-10-13 Thread Fritz Anderson
On 12 Oct 2011, at 5:39 PM, Rick Mann wrote:

> I can't tell from the docs for -viewDidUnload if it is not guaranteed to be 
> called when cleaning up. It does say that it's called for low-memory 
> situations, but also says it's called as a counterpart to -viewDidLoad, which 
> is always called when a view controller is created.

The docs say specifically: 
> When a low-memory condition occurs and the current view controller’s views 
> are not needed, the system may opt to remove those views from memory.

It doesn't refer to any other scenario, and given that the recommendation is 
that -viewDidUnload do many of the same releases (+ plus nil-outs) as would be 
done in -dealloc, I take it that low-memory (and therefore -viewDidUnload) and 
deallocation are separate paths.

— F

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Animating a UITableViewCell changing size

2011-10-13 Thread Luke Hiesterman
You should never directly set the frame of a cell that is in the table view. 
Since UITableView automatically requiries and adjusts row heights when you do a 
begin/endUpdates block, performing an empty such block by itself after 
adjusting row heights in your model is sufficient to animate a change. The 
Table View Animations and Gestures sample on developer.apple.com demonstrates 
this technique coupled with a pinch gesture. 

As for the call to reloadRowsAtIndexPaths, that may or may not be appropriate 
depending on what you're doing. If you truly want to get a given row to animate 
to a new height, then you don't want to reload it, because that will create a 
new cell rather than animating the existing one.

In the end, your code could end up looking something like this for animating a 
row height change:

[self updateModelHeightForRowAtIndexPath:indexPath disclosureOpen:YES];
[tableView beginUpdates];
[tableView endUpdates];

Luke

On Oct 13, 2011, at 2:35 AM, "Thomas Davie"  wrote:

> Dear list,
> 
> I'm trying to construct a UITableViewCell with what is essentially a 
> disclosure triangle on it.  When that's tapped, the cell expands to show 
> additional information.  I currently hack this with code along these lines:
> 
>NSArray *cellPaths = [tableView indexPathsForVisibleRows];
>[UIView animateWithDuration:0.3
> animations:^ ()
> {
> MyCustomCell *cell = [tableView cellForRowAtIndexPath:indexPath];
> NSUInteger minRow = [indexPath row];
> BOOL d = ![cell disclosed];
> [cell setDisclosed:d];
> [disclosures setObject:[NSNumber numberWithBool:d] forKey:[cell 
> statName]];
> for (NSIndexPath *p in cellPaths)
> {
> if ([p row] > minRow)
> {
> MyCustomCell *c = [tableView cellForRowAtIndexPath:p]
> [c setFrame:CGRectMake([c frame].origin.x, d ? [c 
> frame].origin.y + kDisclosureOffset : [c frame].origin.y - kDisclosureOffset, 
> [c frame].size.width, [c frame].size.height)];
> }
> }
> 
> }
> completion:^ (BOOL finished)
> {
> [tableView reloadRowsAtIndexPaths:cellPaths 
> withRowAnimation:UITableViewRowAnimationNone];
> }];
> 
> This for the most part works well except for one case – collapsing the cells. 
>  When this happens, the table view does not have cells for the rows that are 
> not yet visible, but become visible as the cell collapses.  Because of this, 
> a blank area comes into view at the bottom of the table view, and then 
> flashes as it gets replaced by the newly generated rows.
> 
> I've tried using cellForRowAtIndexPath: to grab the cells off the bottom, but 
> these come back as nil, as the table view doesn't think it needs to show 
> them.  The only other thing I can conjor in my mind is to call something 
> similar to the data source method directly to construct cells myself, add 
> them to the TV, animate them in, remove them and reload the table view.  
> However, this does not solve one final issue – what happens when the table 
> view is scrolled near to the bottom and there are no cells to add.
> 
> If anyone could recommend a good way forward here, I'd be appreciative.
> 
> Thanks
> 
> Tom Davie
> 
> 
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com
> 
> This email sent to luket...@apple.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


[MEET] CocoaHeadsNYC TONIGHT

2011-10-13 Thread Andy Lee
Our speaker will be Jon Nathan, one of the original NYC CocoaHeads. Jon will be 
talking about making your Mac app plug-innable.



--Andy

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Best way to parse a time today?

2011-10-13 Thread Tom Hohensee
I use the same approach the Roger pointed out  and have not encountered any 
problems as well.  However, I not only set the time but the date (month, day, 
year) as well.  The DST boundries should not matter since I am decomposing 
today's date [NSDate date],  which is set by the end user's time settings in 
system preferences.  Is this not correct? 

Thanks.

Tom

On Oct 12, 2011, at 9:01 PM, Roger Dalal wrote:

> Dave:
> 
> Would it be possible for you to present an improved approach, please? I use 
> this solution frequently, and have not yet encountered any issues, but now 
> you have me worried! What approach do you suggest?
> 
> Roger Dalal
> 
> 
> On Oct 12, 2011, at 9:49 PM, Dave DeLong wrote:
> 
>> Be careful with this approach, since there are some weird edge cases where 
>> that time may not exist on the proposed day (think DST boundaries). 
>> 
>> Dave
>> 
>> Sent from my iPhone
>> 
>> On Oct 12, 2011, at 6:46 PM, Roger Dalal  wrote:
>> 
>>> Rick:
>>> 
>>> The following code, which is likely what you are doing, will return the 
>>> time in 1970 (NSDate's reference date) because you have not specified a 
>>> date:
>>> 
>>> NSString *timeString = @"14:50 PDT";
>>> NSDateFormatter *df = [[NSDateFormatter alloc ] init];
>>> [df setDateFormat:@"HH':'mm zzz"];
>>> NSDate *date = [df dateFromString:timeString];
>>> [df release];
>>> 
>>> 
>>> Instead, you need to use date components to set the day as well as the 
>>> time, per the following:
>>> 
>>> NSString *timeString = @"14:50 PDT";
>>> NSDateFormatter *df = [[NSDateFormatter alloc ] init];
>>> [df setDateFormat:@"HH':'mm zzz"];
>>> NSDate *date = [df dateFromString:timeString];
>>> 
>>> NSCalendar *calendar = [NSCalendar currentCalendar];
>>> NSDateComponents *dateComponents = [calendar components:( 
>>> NSYearCalendarUnit | NSMonthCalendarUnit |  NSDayCalendarUnit ) 
>>> fromDate:[NSDate date]];
>>> NSDateComponents *timeComponents = [calendar components:( 
>>> NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit ) 
>>> fromDate: date ];
>>> 
>>> [dateComponents setHour:[timeComponents hour]];
>>> [dateComponents setMinute:[timeComponents minute]];
>>> [dateComponents setSecond:[timeComponents second]];
>>> 
>>> NSDate *timeToday = [calendar dateFromComponents:dateComponents];
>>> [df release];
>>> 
>>> Change 'fromDate' in NSDateComponents *dateComponents to whatever date you 
>>> want in order to create your time on a different day.
>>> 
>>> Best Wishes.
>>> 
>>> Roger Dalal
>>> 
>>> 
>>> 
>>> 
>>> On Oct 12, 2011, at 9:30 PM, Rick Mann wrote:
>>> 
 I have a situation where I have to parse times like "14:50 PDT". If I just 
 set up an NSDateFormatter with dateFormat = @"HH:mm z", I end up with a 
 time of day in 1970.
 
 What's the best way to get it to give me that time of day today?
 
 Thanks,
 Rick
 
 ___
 
 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:
 http://lists.apple.com/mailman/options/cocoa-dev/roger.dalal%40gmail.com
 
 This email sent to roger.da...@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:
>>> http://lists.apple.com/mailman/options/cocoa-dev/davedelong%40me.com
>>> 
>>> This email sent to davedel...@me.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:
> http://lists.apple.com/mailman/options/cocoa-dev/tom.hohensee%40gmail.com
> 
> This email sent to tom.hohen...@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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


[unsolved] Re: PrintOperation reappears when cancelled

2011-10-13 Thread Alexander Reichstadt
OK, this didn't work. It seemed to work, but only because the app sat for a few 
seconds before the next attempt to print. The print dialog reappears for each 
window from which there was an attempt to print and cancelled. I found no 
thread or hint on how to fix this. It seems to be related to garbage 
collection, but it's not clear, if so, what to do in finalize. Even when the 
previous window is closed, when trying to print, that previous window is opened 
and the print dialog presented within. After a while though such self-reopened 
windows fall apart, like list entries going missing and labels presenting no 
more strings.

I tried:
forcing garbage collection in finalize
suggesting garbage collection in finalize
removing printed view from notification center, even though it has never been 
made an observer
setting all properties of printed view to nil in finalize
cleanUpOperation in printOperationDidRun

The view's finalize method is processed, so it definitely seems to get 
collected. Any help is greatly appreciated.


{
.
NSDictionary *printJob = [NSDictionary 
dictionaryWithObjectsAndKeys:allItems,kPrintItems,nil];

//this is just for testing to print the same job multiple times for serial 
letter function
NSArray *printData = [NSArray 
arrayWithObjects:printJob,printJob,printJob,nil];

NSPrintInfo *pi = [NSPrintInfo sharedPrintInfo];
LXPrintView *pv = [[LXPrintView alloc] initWithPrintObjects:printData 
andPrintInfo:pi forPrintDelegate:self];

NSPrintOperation *op = [NSPrintOperation printOperationWithView:pv 
printInfo:pi];
[pv release];

[op runOperationModalForWindow:[[self view] window]
  delegate:self

didRunSelector:@selector(printOperationDidRun:success:contextInfo:)
   contextInfo:nil];


[pv release];
}

- (void)printOperationDidRun:(NSPrintOperation *)printOperation  
success:(BOOL)success  contextInfo:(void *)contextInfo
{

[printOperation cleanUpOperation];
}



Am 13.10.2011 um 11:51 schrieb Alexander Reichstadt:

> [op cleanUp];
that should have been cleanUpOperation
> 
> Thanks
> 
> Am 13.10.2011 um 11:48 schrieb Alexander Reichstadt:
> 
>> Hi,
>> 
>> in our project we have a print operation to print from a view drawn offline. 
>> This all works fine. But if the operation is cancelled in the printdialog 
>> and document window closed, another document window selected and then 
>> ordered to print, the print dialog shows up twice. Once for the previously 
>> cancelled operation and once for the current operation. This can be 
>> increased arbitrarily. All cancelled operations are represented to the user.
>> 
>> Garbage collection is turned on, if this is relevant.
>> 
>> Is there something else that needs to be done in case it is cancelled?
>> 
>> Thanks
>> Alex
> 
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/lxr%40mac.com
> 
> This email sent to l...@mac.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


[Solved] Re: PrintOperation reappears when cancelled

2011-10-13 Thread Alexander Reichstadt
[op cleanUp];

Thanks

Am 13.10.2011 um 11:48 schrieb Alexander Reichstadt:

> Hi,
> 
> in our project we have a print operation to print from a view drawn offline. 
> This all works fine. But if the operation is cancelled in the printdialog and 
> document window closed, another document window selected and then ordered to 
> print, the print dialog shows up twice. Once for the previously cancelled 
> operation and once for the current operation. This can be increased 
> arbitrarily. All cancelled operations are represented to the user.
> 
> Garbage collection is turned on, if this is relevant.
> 
> Is there something else that needs to be done in case it is cancelled?
> 
> Thanks
> Alex

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


PrintOperation reappears when cancelled

2011-10-13 Thread Alexander Reichstadt
Hi,

in our project we have a print operation to print from a view drawn offline. 
This all works fine. But if the operation is cancelled in the printdialog and 
document window closed, another document window selected and then ordered to 
print, the print dialog shows up twice. Once for the previously cancelled 
operation and once for the current operation. This can be increased 
arbitrarily. All cancelled operations are represented to the user.

Garbage collection is turned on, if this is relevant.

Is there something else that needs to be done in case it is cancelled?

Thanks
Alex
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Animating a UITableViewCell changing size

2011-10-13 Thread Thomas Davie
Dear list,

I'm trying to construct a UITableViewCell with what is essentially a disclosure 
triangle on it.  When that's tapped, the cell expands to show additional 
information.  I currently hack this with code along these lines:

NSArray *cellPaths = [tableView indexPathsForVisibleRows];
[UIView animateWithDuration:0.3
 animations:^ ()
 {
 MyCustomCell *cell = [tableView cellForRowAtIndexPath:indexPath];
 NSUInteger minRow = [indexPath row];
 BOOL d = ![cell disclosed];
 [cell setDisclosed:d];
 [disclosures setObject:[NSNumber numberWithBool:d] forKey:[cell 
statName]];
 for (NSIndexPath *p in cellPaths)
 {
 if ([p row] > minRow)
 {
 MyCustomCell *c = [tableView cellForRowAtIndexPath:p]
 [c setFrame:CGRectMake([c frame].origin.x, d ? [c 
frame].origin.y + kDisclosureOffset : [c frame].origin.y - kDisclosureOffset, 
[c frame].size.width, [c frame].size.height)];
 }
 }
 
 }
 completion:^ (BOOL finished)
 {
 [tableView reloadRowsAtIndexPaths:cellPaths 
withRowAnimation:UITableViewRowAnimationNone];
 }];

This for the most part works well except for one case – collapsing the cells.  
When this happens, the table view does not have cells for the rows that are not 
yet visible, but become visible as the cell collapses.  Because of this, a 
blank area comes into view at the bottom of the table view, and then flashes as 
it gets replaced by the newly generated rows.

I've tried using cellForRowAtIndexPath: to grab the cells off the bottom, but 
these come back as nil, as the table view doesn't think it needs to show them.  
The only other thing I can conjor in my mind is to call something similar to 
the data source method directly to construct cells myself, add them to the TV, 
animate them in, remove them and reload the table view.  However, this does not 
solve one final issue – what happens when the table view is scrolled near to 
the bottom and there are no cells to add.

If anyone could recommend a good way forward here, I'd be appreciative.

Thanks

Tom Davie


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com