How to implement such a view

2011-01-12 Thread ico
Hi, everyone, Greeting. I need to display some long text, and the text have some images with it. If I want to display these image beside, and in the middle of the text (not above, not below), how can I implement this view? Also it has one more requirement which is the event handling. User tap on

IkImageView slow rect selection

2011-01-12 Thread Rick Mann
I have a basic app up and running using IKImageView. I find that when I view a large image, shrunk to fit the current window, and then try to select with the rectangle selection mode, the large the rect gets, the slower the update. What is it doing? This seems like a bug. Is there anything I can

Re: sending a message from an initializer method

2011-01-12 Thread Erik Buck
Class or instance method makes no difference in this case with regard to polymorphism. On Jan 12, 2011, at 4:51 PM, Gordon Apple wrote: > What I would do use a class method and pass the two arrays as parameters. > > > On 1/12/11 2:03 PM, "cocoa-dev-requ...@lists.apple.com" > wrote: > >> Yes,

Re: Predicate Help

2011-01-12 Thread Brad Stone
So cool! On Jan 12, 2011, at 7:05 PM, Dave DeLong wrote: > SUBQUERY! :) > > NSArray *objects = ...; //your array of SRIndexObjects > > NSPredicate * f = [NSPredicate predicateWithFormat:@"SUBQUERY(todos, $t, > $t.todoCompletedDate >= %@)@count > 0", aParticularDate]; > NSArray *filteredObj

Re: Predicate Help

2011-01-12 Thread Dave DeLong
If you want to make sure the todoCompletedDate isn't NULL as well, you would change the SUBQUERY predicate to: $t.todoCompletedDate != nil && $t.todoCompletedDate >= %@ Dave On Jan 12, 2011, at 4:05 PM, Dave DeLong wrote: > SUBQUERY! :) > > NSArray *objects = ...; //your array of SRIndexObjec

Re: Predicate Help

2011-01-12 Thread Dave DeLong
SUBQUERY! :) NSArray *objects = ...; //your array of SRIndexObjects NSPredicate * f = [NSPredicate predicateWithFormat:@"SUBQUERY(todos, $t, $t.todoCompletedDate >= %@)@count > 0", aParticularDate]; NSArray *filteredObjects = [objects filteredArrayUsingPredicate:f]; Explanation: SUBQUERY()

Predicate Help

2011-01-12 Thread Brad Stone
I'm been trying for two days to get this to work. I've googled, read the "Predicate Programming Guide" - I guess I just don't get it. I'm trying to develop a predicate to populate a mutable array . I have an array that contains SRIndexObjects. @interface SRIndexObject : NSObject { NSNumb

UIEvent timestamp clarification

2011-01-12 Thread Andrew Coad
Reading through the docs, the approximate flow from a user touching an interface component (e.g. a button) to the touch event being processed by the application is: - User touches (e.g. a UIButton), a "touch" object is created and enqueued on the dispatch thread (main thread) - The touch obj

Re: sending a message from an initializer method

2011-01-12 Thread Gordon Apple
What I would do use a class method and pass the two arrays as parameters. On 1/12/11 2:03 PM, "cocoa-dev-requ...@lists.apple.com" wrote: > Yes, you can, but... don't forget that in -computeVar3... self is not fully > initialized. If you have all control on self it can be without problems, but >

Re: Delegation: should be weak-linked, yet Delegating-Clients... strong linked?

2011-01-12 Thread Frederick C. Lee
I suspect that to be the case when I received this code for study. Scenario: MyWindowController:NSWindowController -> MyViewController:NSViewController (a delegate) Inside 'MyViewController': - (id)initWithSerial:(NSString *)_serial email:(NSString *)_email delegate:(NSObject *)_deleg

Re: NSOutlineView and selection

2011-01-12 Thread Corbin Dunn
Hi Kevin, (cc'ing the list, in case others have the same question). On Jan 12, 2011, at 12:55 PM, Kevin Meaney wrote: > Thanks Corbin, > > Will modifying the current selection of the outline view in the delegate > method outlineView:selectionIndexesForProposedSelection cause any problems as >

Re: Delegation: should be weak-linked, yet Delegating-Clients... strong linked?

2011-01-12 Thread Corbin Dunn
On Jan 12, 2011, at 10:46 AM, Frederick C. Lee wrote: > Environment: OS X (10.6+) > > Greetings: > I've always thought to weak-link delegate methods to their hosts. Hence > the use of 'assign' vs 'retain' delegate assessors. > Quoting Apple's Delegate documentation: > > "Delegating objects

Re: Custom View with Interface Builder Bindings

2011-01-12 Thread Richard Somers
On Jan 3, 2011, at 9:27 AM, Richard Somers wrote: I would like to establish bindings in Interface Builder between the "objects" created by the custom view and some standard Interface Builder widgets. The problem is 'awakeFromNib' is called AFTER the bindings are established so the bindings

Re: Responding to changes in outline view

2011-01-12 Thread Corbin Dunn
On Jan 11, 2011, at 5:32 PM, Rick Mann wrote: > i found two examples so far (one using notifications, one KVO) for responding > to changes in a table view's selection. There is one way: - (void)tableViewSelectionDidChange:(NSNotification *)notification; Implement it on your delegate. > > I

Re: NSOutlineView and selection

2011-01-12 Thread Corbin Dunn
On Jan 12, 2011, at 10:45 AM, Kevin Meaney wrote: > Hi, > > In my outline view I need to allow multiple selection, but only allow all > selected items to have the same parent. In other words as soon as the user > selects an item with a different parent to the currently selected items even > i

NSOutlineView and selection

2011-01-12 Thread Kevin Meaney
Hi, In my outline view I need to allow multiple selection, but only allow all selected items to have the same parent. In other words as soon as the user selects an item with a different parent to the currently selected items even if they are in add to selection mode, the previously selected ite

Delegation: should be weak-linked, yet Delegating-Clients... strong linked?

2011-01-12 Thread Frederick C. Lee
Environment: OS X (10.6+) Greetings: I've always thought to weak-link delegate methods to their hosts. Hence the use of 'assign' vs 'retain' delegate assessors. Quoting Apple's Delegate documentation: "Delegating objects do not (and should not) retain their delegates. However, clients of de

Re: sending a message from an initializer method

2011-01-12 Thread Frédéric Testuz
Yes, you can, but... don't forget that in -computeVar3... self is not fully initialized. If you have all control on self it can be without problems, but Objective-C is an OO language. Consider this : - Your class is ClassA with it's init method. - Then you have ClassB, subclass of ClassA. Class

Re: sending a message from an initializer method

2011-01-12 Thread Phil Hystad
You can do the following, in your implementation file create a local procedure and then call it from your init method. I did not bother copying your arguments but you define them in the regular way. -(void)myCalculation { // do the calculation } - (id) init { if ( self = [super init]

Re: Odd Crash when adding table columns manually

2011-01-12 Thread Eric Gorr
Try grabbing the project again - I have cleaned up a few things which should make this a bit easier. http://ericgorr.net/cocoadev/TableColumnTest.zip It should crash everytime as long as in TableController.m the column are not being removed from the table first. You will have to go in an commen

Re: Odd Crash when adding table columns manually

2011-01-12 Thread Keary Suska
On Jan 11, 2011, at 5:49 PM, Eric Gorr wrote: > I do release them after adding them to the table. It will still crash... I cannot reproduce the crash with your test project. Have you verified, using zombies, that in fact it is a table column crashing? It might have to do with an invalid data so

Re: Core Data and Undo. Was: NSUndoManager retain/release

2011-01-12 Thread Dave Fernandes
Thanks, Jerry. I will have to try this out (if I can get up the nerve to fiddle with my currently working undo groups.) Dave On 2011-01-12, at 12:47 AM, Jerry Krinock wrote: > > On 2011 Jan 11, at 17:54, Dave Fernandes wrote: > >> And I'd love to know a trick to bring the correct tab to the

sending a message from an initializer method

2011-01-12 Thread Luc Van Bogaert
Hi, I have a question about how to design a initializer mehod. I have defined a class with three instance variables. Two of them are arrays and their value can be initialized straightforward in the initializer method, but the value of the third instance variable is the result of a complex alg