Home Download Buy Blog Forum Support

Odd results with view.text_point

Odd results with view.text_point

Postby pyparadigm on Sat Sep 24, 2011 10:08 pm

I am getting odd results with view.text_point returning the point on the following line, for instance if I run

view.text_point(3, 10)

It will return the point at (4,10) etc, so if I call it I have to do.

view.text_point(line# - 1, 10) to get expected results.

I'm guessing maybe inside, the labeling is:
Line 0: XXX
Line 1: XXX
Line 2: XXX
Line 3: XXX

So if I ask for Line 3, I'm expecting Line 2 to be what is returned.

On Build 2121, maybe someone can confirm if its not just me? If it is then I suppose I'm doing something wrong
Posts: 23
Joined: Thu Aug 04, 2011 8:15 am

Re: Odd results with view.text_point

Postby jps on Sat Sep 24, 2011 11:59 pm

That's by design - rows and columns both start from 0. The gutter and status bar calculate the displayed values by adding 1 to them.
Site Admin
Posts: 3217
Joined: Wed Mar 19, 2008 12:33 pm

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 25 guests