user69514
user69514

Reputation: 27629

Smalltalk - Converting text object to string

Hi I have text editor widget in smalltalk (visual works) that returns 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?

Upvotes: 1

Views: 1000

Answers (2)

Michael Lucas-Smith
Michael Lucas-Smith

Reputation: 1

You send #string to the Text object

Upvotes: 0

Randal Schwartz
Randal Schwartz

Reputation: 44056

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.

Upvotes: 2

Related Questions