why not just prototype it?

Hesh

----- Original Message -----
From: "Lindsay Evans" <[EMAIL PROTECTED]>
To: "Flash Developers List" <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 10:36 AM
Subject: [fugli] Using String behaviour with a class that extends String


>
> Hi all,
>
> Not sure if this is going to be possible, but essentially what I want to
do
> is have a class that extends String:
>
> class com.redsquare.TString extends String {
> public function TString(data:String) {
> super(data);
> }
> public function trim():TString {...}
> }
>
> and then be able to use it a replacement for String, this is all fine, but
I
> can only get it happening with the following syntax:
> var myString:TString = new TString("hello world!");
>
> when ideally I'd like to be able to use it as you would a normal string:
> var myString:TString = "hello world!";
>
> Which is giving me the following error:
>  statement: found String where com.redsquare.TString is required.
>      var myString:TString = "hello world!";
>
> Does anyone know how I'd go about this?
>
> --
>  Lindsay Evans.
>  Developer,
>  Red Square Productions.
>
>  [p] 8596.4000
>  [f] 8596.4001
>  [w] www.redsquare.com.au
>
>
> ---
> You are currently subscribed to fugli as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
>


---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to