Bug in the front end UI classes ..any thoughts to why? Code and workaround follows

Perhaps it is fixed in one of the later releases, but I am not in a posistion to test it at my client’s site.

This works just fine in 4x

but in 6 well it puts the 2nd batch of text in front of the first, but then the 3rd follows the 2nd in order and its fine from then on…Its not even as if putting it in reverse order would help! Here’s the code and the workaround. Share your theory if you have one.

sText = note.SomeText(0)

 subString1$ = Left$(sText, 200)

 subString2$ = Mid$(sText, 201, 200)

 subString3$ = Mid$(sText, 401, 200)

 subString4$ = Mid$(sText, 601, 200)

 subString5$ = Mid$(sText, 801, 200)

 subString6$ = Mid$(sText, 1001, 200)

 subString7$ = Mid$(sText, 1201, 200)

'THIS USED TO WORK FINE

Call uidoc.GotoField( “Body” )

If Len(subString1$) >0 Then Call uidoc.InsertText( subString1$)

If Len(subString2$) >0 Then Call uidoc.InsertText( subString2$)

If Len(subString3$) >0 Then Call uidoc.InsertText( subString3$)

If Len(subString4$) >0 Then Call uidoc.InsertText( subString4$)

If Len(subString5$) >0 Then Call uidoc.InsertText( subString5$)

If Len(subString6$) >0 Then Call uidoc.InsertText( subString6$)

If Len(subString7$) >0 Then Call uidoc.InsertText( subString7$)

'HAVE TO DO IT THIS WAY NOW

 Call uidoc.GotoField( "Body" )

 If Len(subString7$) >0 Then Call uidoc.InsertText( subString7$) 

 Call uidoc.GotoField( "Body" ) 

 If Len(subString6$) >0 Then Call uidoc.InsertText( subString6$) 

 Call uidoc.GotoField( "Body" )

 If Len(subString5$) >0 Then Call uidoc.InsertText( subString5$) 

 Call uidoc.GotoField( "Body" )

 If Len(subString4$) >0 Then Call uidoc.InsertText( subString4$) 

 Call uidoc.GotoField( "Body" )

 If Len(subString3$) >0 Then Call uidoc.InsertText( subString3$) 

 Call uidoc.GotoField( "Body" )

 If Len(subString2$) >0 Then Call uidoc.InsertText( subString2$) 

 Call uidoc.GotoField( "Body" )

 If Len(subString1$) >0 Then Call uidoc.InsertText( subString1$) 

End Sub

Subject: Bug in the front end UI classes …any thoughts to why? Code and workaround follows

ok here’s an update… for some reasone the code thinks that there are 2 sets of (Chr(10)+Chr(13)) before the text it is picking up. Never thought much of it in 4x as it left behind a nice extra line…but that is what seems to be causing 6 all the trouble. If I start at position 3 changing the first line tosubString1$ = Mid$(sText, 3, 200) it works fine… and I dont lose any starting text

Wierd!