Re: Extending existing methods of base classes and Loose Methods.



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
.



Relevant Pages

  • Re: urllib.urlencode wrongly encoding ± character
    ... #!/usr/bin/env python ... from urllib import urlencode ... the urlencode function doesn't care about encodings; ... in an 8-bit string, Python only sees a number of bytes. ...
    (comp.lang.python)
  • Re: Binary? I dont know
    ... The only way that the entire string would transfer in the post request ... (this is where I was talking about the java applet if you're curious: ... string out of it, converted it with urlencode, and then made a post ...
    (comp.lang.php)
  • Re: recursively calling a function within a class definition
    ... within the class definition. ... function myclass() ... i think it's some sort of scope problem. ... Another problem here is passing a string as an argument to ...
    (comp.lang.javascript)
  • Re: blank response from curl when posting form data
    ... they are properly encoded with urlencode. ... as I make that string small, ... I tried passing the post data in strings, ...
    (comp.lang.php)
  • Re: String Reverse
    ... class method. ... The basic idea is a create char array the correct length, ... one by one from your original string in a loop. ... Roedy Green Canadian Mind Products ...
    (comp.lang.java.programmer)