Hi,
Am 07.04.2006 um 16:30 schrieb Joseph J. Strout:
This is not a simple test. Following these directions, I can't
imagine how I would see a problem. Can you make a more specific
example, something we can simply run and have it report whether or
not there's a problem?
yes I'll try it:
Make a new Desktop Application project file. Into 'Window1' place an
editfield, let us call it 'MyTextField' ( Properties: Left=0, Top=0,
Width=300, Height=250, LockLeft=True, LockTop=True, LockRight=True,
LockBottom=True, Multiline=True, ScrollbarHorizontal=True,
Rest=DEFAULT ). Place a second editfield into 'Window1', let us call
it 'MyLineNumber' ( Properties: Left=16, Top=266, Width=80,
Height=22, LockLeft=True, LockTop=True, LockRight=False,
LockBottom=True, Rest=DEFAULT ).
Now our last control. Place a pushbutton into 'Window1' named
'TestButton' ( Properties: Left=182, Top=266, Width=80, Height=20,
LockLeft=False, LockTop=False, LockRight=True, LockBottom=True,
Rest=DEFAULT ).
Just place this code 'MsgBox Str( MyTextField.CharPosAtLineNum( Val
( MyLineNumber.text)))' into 'Window1.TestButton.Action'-event. That
should be all to build our little test project.
Run it.
Now drag or paste a big text with i.e. 6000 text lines into editfield
'MyTextField'. Type into the second editfield 'MyLineNumber' a valid
line number 1000 and press the button, 2000 and press the button and
so on. Look at the message, which will be shown. After some thousands
of lines, you will suddenly see smaller char position in the message
like before. Make your intervals smaller and you will got a char
position 1 at a big line number; surprise, surprise.
Also click into the text at different positions of editfield
'MyTextField' and next press the button ( primary into the first or
last lines ) and look what happened to the calculated char position,
you will be more than surprised.
At this time I'm using REALBasic 2006r1. If that isn't enough, may I
send you an email with the small project file, test text and some
screenshots?
--
Best
Vincent
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>