tags:

views:

27

answers:

1

Hi,

I have drawn NSTextView object on NSView, which i added by calling addSubview method.

When I enter text and press enter text i had entered come down by one line correspondingly.

What can be the reason behind it, and how to cope with this problem.

A: 

Just initialise the frame while allocating memory of the NSTextView object, instead of calling setFrame method. This does not create the problem...

iSight
You were previously initializing the view with an `init` message? Don't do that. Always initialize a view with `initWithFrame:`, unless it has a different initializer for you to use, in which case, use that.
Peter Hosey
Yes, i will keep it in mind in future.
iSight