GetVordText Version Difference

SyntaxEditor for WPF Forum

The latest build of this product (v22.1.4) was released 2 months ago, which was before this thread was created.
Posted 18 days ago by SPF - Appeon
Version: 22.1.4
Platform: .NET 6.0
Environment: Windows 11 (64-bit)
Avatar

Different versions get different keywords in some cases.

Please run the two projects under the solution and observe the different behaviors.

Project example : https://github.com/spf-oss/Actiprosoft/blob/main/VersionDifference.rar

This problem has a great impact because it has been widely used in our projects.

[Modified 18 days ago]

Comments (1)

Posted 17 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thank you for the sample project that clearly shows the different behavior. It appears this change was introduced in v22.1.3 as part of a change to address the behavior you previously posted about.

In your sample you show that calling GetWordText for the offset between the "e" and "." in "Console." returns "." as the word text in v22.1.1 and "Console" as the word text in v22.1.4. The word break finder for "Console." is finding two words ("Console" and ".") and the given offset is positioned equally between both words.

So which word is the current word? The change made in v22.1.3 looks for the more significant character on either side of the offset and returns the word associated with the more signficant character. Technically this change was made to a GetWordTextRange method, but does inadvertently affect GetWordText.

While we believe the current logic is more accurate, we do see how the change has impacted the GetWordText method and should have been delayed until a more significant release.

To help us better understand your scenario, can you explain if you prefer "." to be the current word in this scenario or is the issue simply that the change has negatively impacted application behavior? Perhaps you could provide some specific examples from your application with an explanation on why one word is preferred over another?


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.