"On Cursor placed into TextView"

Hi everyone,

I am stuck with something that probably isn’t possible with AppleScript Studio. However, maybe someone is cleverer than me (or knows Cocoa) and could help me out. :slight_smile:

Heres the thing. I have a NSTextView in which there is some default text (specified from IB). What I want is that when someone clicks into the textview to start writing, that the default text disappears. In short, click = delete default text.

Is there some handler which could do this?

Thanks people!



connect in IB the handler ‘begin editing’ to the text view and the code to

on begin editing theObject
	set content of text view "view" of scroll view "view" of window "main" to ""
end begin editing


Hi guimkie,
Why not just set your initial text as the placeholder in IB? Then when you click it it automatically disappears