Re: Extending existing methods of base classes and Loose Methods.
- From: Marc Michael <newsgrouppostfach@xxxxxxxxxxxx>
- Date: Sat, 1 Mar 2008 06:52:50 -0800 (PST)
On 25 Feb., 16:01, cenopel...@xxxxxxxxx wrote:
Hi,
So, I have thought it would be a good idea to create a ClassVariable
for it. So I changed the class definition and changed the class method
initialize.
Changing Dolphin class definitions is not good idea. Maybe it would go
well, but probably not, like with MVP etc.
I think if you wont to do that you must change class package to yours.
I would use sublcass, or any other way, it would be interested to here
further toths on this subject.
A subclass wouldn't be fine IMO. My application is a simple URL-
Encoder/-Decoder. I want to encode a string. So I simply added a
method urlEncoder to the class String and now I am able to do the
following:
'Hello#World' urlEncode
And the result is simply the correct String 'Hello%23World'. If I
would had created a subclass for this, I would loose the possibility
to simply send the message urlEncode to a literal string and get the
correct result.
Best wishes,
Marc Michael
.
- Follow-Ups:
- Re: Extending existing methods of base classes and Loose Methods.
- From: Esteban A. Maringolo
- Re: Extending existing methods of base classes and Loose Methods.
- Next by Date: Re: Extending existing methods of base classes and Loose Methods.
- Next by thread: Re: Extending existing methods of base classes and Loose Methods.
- Index(es):
Relevant Pages
|