You are right man but I had a filling that I didn't initialize variables in a right way.However that wasn't the problem.The problem was that I had trying to get Boundaries Object for new line position of the cursor and that was a cause of the error. I have fix that but now I'm facing with another problem and here is my question:
How can I get the current position(in pixels) of the blinking cursor in a text area and is there a way to set this position programmatically? --- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > > I'm getting error cause Boundaries in this case is Null object > > > > Sorry, Branko, but a little code snippet like this isn't enough to > diagnose the problem. What's the text you're putting into the TextArea? > What are you doing to trigger this code? You should post code for a > minimal but complete <mx:Application> that exhibits your error, and tell > us the user-interaction steps to make the error happen. > > > > - Gordon > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Branko > Sent: Monday, October 23, 2006 1:34 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Lines in text area component > > > > Here is my code: > > import flash.geom.Rectangle; > > var caretIndex:int = textArea.getTextField().caretIndex; > var Boundaries:Rectangle = new Rectangle; > var tField:TextField = textArea.getTextField(); > > Boundaries = tField.getCharBoundaries(caretIndex); > > but I'm getting error cause Boundaries in this case is Null object. > > Help me please to get this thing working if You see errors.. > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > , "Gordon Smith" <gosmith@> > wrote: > > > > I'm not sure what you mean by "setting the number of lines in the > > TextArea component"? If you want to control where line breaks > occur, put > > the \n character into the 'text' String. > > > > > > > > To get the line position of a particular character try using > > getCharBoundaries() and then getLineIndexAtPoint(). > > > > > > > > - Gordon > > > > > > > > ________________________________ > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of brankosli > > Sent: Wednesday, October 18, 2006 1:09 AM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Lines in text area component > > > > > > > > Is there any possibility to set number of lines in Text Area > component? > > and if it's possible: > > How to retrieve current line position in Text Area component? > > > > Thanx in advance. > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/