[Biococoa-dev] BCSequenceView

Charles PARNOT charles.parnot at stanford.edu
Thu Mar 3 03:01:14 EST 2005


Sorry Koen I did not follow that thread very closely.
I will have more time this week to think about it too.

My gut feeling is that subclassing NSTextView is 'evil', and that instead the NSTextView should be a ivar and a subview (taking all the space for now, but in the future a BCSequenceView could have several subviews with several text fields like 'sequence length', 'current selection',...), and that BCSequenceView could be the NSTextView delegate to respond to user input and reformat the text view contents accordingly. Sorry this is not very detailed, so you can ignore it if that does not make sense!

And what about the symbol set thread? ;-)

charles


At 6:46 PM -0500 3/1/05, Koen van der Drift wrote:
>Actually, maybe I should make code to use a delegate object with BCSequenceView. The delegate can then inform the view that the sequence has been changed, send the new NSString to the view, and let the view display it. What do you guys think?
>


At 8:12 PM -0500 3/1/05, Koen van der Drift wrote:
>The NSLayoutManager is for this case way too complicated. The problem is not drawing the line/symbol numbers, but the interaction with the controller. In my own app, I have solved it by using delegate methods, but sofar was trying to make BCSequenceView stand alone. But probably it wont hurt if I make it part of a MVC pattern. It is up to the user to call the correct methods to make it work with a controller. Just like we have to do when we eg implement an NSTable.
>
>- Koen.


At 8:47 PM -0500 3/1/05, Koen van der Drift wrote:
>So, I made theController.m in the translation example a delegate of BCSequenceView. I think it is a good solution, because this is also what should happen in a 'real' app. The demo also looks better now, and editing works ... almost. What goes wrong is that after each time I edit the sequence manually in the view, the cursor jumps to the end. I have no clue how to fix this.
>
>Also, I am adding headerdoc info to BCSequenceView. Almost all methods are only supposed to be used by the view itself. Should I still make an entry for those?
>
>- Koen.

At 8:07 PM -0500 3/2/05, Koen van der Drift wrote:
>Alex,
>
>You have a sequence view in 4peaks. Is this an NSTextView where you use the NSLayoutManager? It might be actually a good idea if we want to make the BCSequenceView a little more advanced.
>
>- Koen.


-- 
Help science go fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford/

Charles Parnot
charles.parnot at stanford.edu

Room  B157 in Beckman Center
279, Campus Drive
Stanford University
Stanford, CA 94305 (USA)

Tel +1 650 725 7754
Fax +1 650 725 8021



More information about the Biococoa-dev mailing list