Re: Is substitution of block-function parameters OK when it's an object type?

2014-08-05 Thread Ken Thomases
On Aug 5, 2014, at 11:38 AM, Daryle Walker wrote: > Some code I just wrote to implement history menus for my browser’s back and > forward buttons: > >[[backForwardList backListWithLimit:(int)maxMenuLength] > enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(WebHistoryItem

Re: Is substitution of block-function parameters OK when it's an object type?

2014-08-05 Thread Quincey Morris
On Aug 5, 2014, at 09:38 , Daryle Walker wrote: > The type of “obj” was originally “id,” but I changed it to what I knew the > NSArray object actually held. The compiler accepted it. Can I change any > block parameter, or only ones that are Objective-C objects? (For example, > would changing t

Is substitution of block-function parameters OK when it's an object type?

2014-08-05 Thread Daryle Walker
Some code I just wrote to implement history menus for my browser’s back and forward buttons: [[backForwardList backListWithLimit:(int)maxMenuLength] enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(WebHistoryItem *obj, NSUInteger idx, BOOL *stop){ The type of “obj” was ori