Manipulate the NSTextview, several questions...

2008-10-07 Thread Cloud Strife
Hi everyone. I am using the NSTextview to perform some functions of my application. I want to implement: 1. The NSTextiview has several lines of output, when the user click(or double-click) one line of the text, I want to the NSTextview to highlight the line which the user clicked with some light

Use the CATransition to switch one layer from another layer with Core Image effects?

2008-08-02 Thread Cloud Strife
Hi everyone. Maybe the idea as the topic mentioned sounds a little crazy, I really want to realize it. For example, I created two layer with ImageA and ImageB. Now I am displaying ImageA in LayerA to users. After the user click some button, I should display ImageB in LayerB to the user with the

Unable to detect a NSRightMouseDown event using a three-button mouse?

2008-07-26 Thread Cloud Strife
Hi everyone. Maybe this issue is very odd, but I came across it indeed. I wrote an application using an override NSView to respond events trigged by users. Obviously, rewrite the -(void)mouseDown:(NSEvent* )theEvent is necessary. I want to test what button of mouse the user presses. So I want to

Create a window with status bar at its bottom, how to do?

2008-07-20 Thread Cloud Strife
Hi everyone. I am interested to create a window with status bar at its bottom. Hmm, you can see Xcode editor window as an example, once we open a .m source file, the editor window has a status bar at its bottom. When click the build and run buttom, you can see the prompt information from Xcode

how to eliminate an annoying issue of the multi-document cocoa application?

2008-07-18 Thread Cloud Strife
Greetings everyone. I am new to creating an new multi-doc application with Cocoa framework. After I created such one using the Xcode built-in template. There was a window, the new document, automatically jump out after I launched the application. Due to the requirement of my application, this

how to clear the whole render tree of CALayer fast and safely?

2008-07-18 Thread Cloud Strife
Hi, everyone.Assuming there is a Core Animation render tree with many calayers and complex levels, should I use the iteration function to remove one layer from one layer or there just is some useful function to delete the whole render tree neatly at once to make the app robust ? After created and

any other type of value for the fromValue property of CAAnimation?

2008-07-11 Thread Cloud Strife
Hi everyone.After explore the Core Animation for a while, I found that the fromValue property of CAAnimation was only set to NSNumber in many samples and tutorials, although the Apple's document says it accepts the id value. I am wondering whether I could set this property to NSColor or CGColor