开发者

Smalltalk - Converting text object to string

开发者 https://www.devze.com 2022-12-08 22:30 出处:网络
Hi I have text editor widget in smalltalk (visual works) that re开发者_Go百科turns a text object, however I want the text returned to be handled as a string object.

Hi I have text editor widget in smalltalk (visual works) that re开发者_Go百科turns a text object, however I want the text returned to be handled as a string object.

How do you parse a text object as a string?


if Text and String are different classes in VW Smalltalk (which I don't have easy access to at the moment), see if you can call yourText asString or perhaps String newFrom: yourText or maybe yourText as: String. Most of these would work in Squeak Smalltalk.


You send #string to the Text object

0

精彩评论

暂无评论...
验证码 换一张
取 消