Path: news.cs.au.dk!not-for-mail From: Manmathan Muthukumarapillai Newsgroups: comp.lang.beta Subject: Re: How to make a Styled text out of Text? Date: 13 May 1999 14:13:10 -0000 Organization: Mjolner Informatics ApS, Denmark Lines: 58 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <19990513141310.8562.qmail@noatun.mjolner.dk> Reply-To: Manmathan Muthukumarapillai NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 926604809 3033343 255.255.255.255 (13 May 1999 14:13:29 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 13 May 1999 14:13:29 GMT Xref: news.cs.au.dk comp.lang.beta:11941 Thu, May 13, 1999 at 11:07:14AM +0200 Sascha Kimmel wrote: > Hello! > > I want to put the contents of a ^text into a TextField, but I get a run-time > qualification error in reference assignment - I know why, but how can I > solve it? > I just want to do it in such a way: '1233456'->myTextField.contents; > > Any quick help is appreciated! > > Regards, > Sascha Kimmel What about using the following pattern text2styletext: (# t: ^ text; s: ^styledText enter t[] do (if t[]<>NONE then &styledText[]->s[]; t->s; if); exit s[] #); and say '1233456'->text2styletext->myTextField.contents; or you can use say: myTextField.clear; '1233456'->myTextField.insert; or you can define your own textField function -- textFieldLib: attributes -- text2contents: (# t: ^ text; s: ^styledText enter t[] do (if t[]<>NONE then &styledText[]->s[]; t->s; s[]->THIS(textField).contents; if); #); and say '1233456'->myTextField.text2contents; Sincerely, Manmathan Muthukumarapillai / Mjolner Informatics (mannan@mjolner.dk) +++++++++++++++++++ BETA information Sources ++++++++++++++++++++++++ + Mjolner Informatics | Phone: +45 8620 2000 + + Science Park Aarhus | Direct: +45 8620 2011 local 2672 + + Gustav Wieds Vej 10 | Fax: +45 8620 1222 + + DK-8000, Aarhus C, Denmark | E-mail: info@mjolner.com + + WWW : http://www.mjolner.com -and- http://www.daimi.aau.dk/~beta + + FAQ : http://www.daimi.aau.dk/~beta/FAQ News: comp.lang.beta + + News: comp.lang.beta + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++