realbasic-nug
[Top] [All Lists]

Re: StaticText and '&'

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: StaticText and '&'
From: David Glass <dglass at graymattercomputing dot com>
Date: Fri, 30 Sep 2005 16:05:24 -0700
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <266C7B6A-943C-4AC8-A1E9-67BECD9AC344 at graymattercomputing dot com> <ac37c6b96203746044ebdd8d67cf5c8c at declareSub dot com>
I'm not really clear on the Extends keyword. Does your example mean that I would then do this:

StaticText1.SetEscapedText(me, EditField1.text)

Instead of this:

StaticText1.Caption = ReplaceAll(EditField1.text, "&", "&&")


On Sep 30, 2005, at 15:39, Charles Yeomans wrote:


Instead of subclassing, use Extends and a global method to add a method to StaticText.

Sub SetEscapedText(Extends s as StaticText, theText as String)
  s.Text = ReplaceAll(theText, "&", "&&")
End Sub


--
David Glass - Gray Matter Computing
graymattercomputing.com - corepos.com
559-303-4915

Apple Certified Help Desk Specialist

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>