On 9/28/07, Matt Foster <[EMAIL PROTECTED]> wrote:
>
>
> What exactly is the "$super" argument and why does it always have the
> dollar sign in front of it?
It has the dollar sign in front because "super" is a reserved keyword in
JavaScript. "$super" was the next best thing.
Prototype looks whic
More support for the non-automatic constructor team, a lot of my
classes do not have constructors, they're abstract, this functionality
would fubar so much of my code.
On Sep 28, 11:24 am, "Nicolás Sanguinetti" <[EMAIL PROTECTED]> wrote:
> I'm not gonna say to you that if you have something c
I have a question about the 1.6 inheritance model.
What exactly is the "$super" argument and why does it always have the
dollar sign in front of it?
Is the super a reference to the super class's prototype object or is
it an instance of the super?
Cheers,
Matt
On Sep 28, 11:24 am,
Sorry, you're right, I was just going down the path of teacher, guiding the
OP (who mentioned destructors first) towards a "Disposable" abstract class
to inherit from...
On 9/28/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
>
> On 9/28/07, Ryan Gahl <[EMAIL PROTECTED]> wrote:
> >
> > Oh yea...
On 9/28/07, Ryan Gahl <[EMAIL PROTECTED]> wrote:
>
> Oh yea... it's definitely not a core thing as it depends on an app's
> object and domain model. This was kind of just an aside conversation that
> popped up I think :)
Well, it sounded like a core request at first.
Your "destructors" are ordin
Oh yea... it's definitely not a core thing as it depends on an app's object
and domain model. This was kind of just an aside conversation that popped up
I think :)
On 9/28/07, Nicolás Sanguinetti <[EMAIL PROTECTED]> wrote:
>
>
> I'm not gonna say to you that if you have something complex calling
>
Yanick said:
> I think that this is more Java-like (which is my opinion the best OOP
> language), and it makes more sense than having an extra parameter in
> the consstructor.
Saying that in a list of ruby fans? (well, sort of) Watch your next
words carefully, Persian: they might be your last ;)
I'm not gonna say to you that if you have something complex calling
"destructors" isn't correct. I'm just gonna argue against it being in
core, as IMHO it's something that not really many people need, and,
since you have to call it manually, the best you can do is defining a
naming convention, not
Are you guys making sure to do a check first to see if the DOM has already
been loaded before generating this hack? If not, I'm afraid the approach
will break in cases where the lib gets loaded on demand. Please test this
well, and don't just say "well we never intended for this lib to be loaded
on
Tobie Langel wrote:
> yup, we're going to correct this asap.
>> I believe the error is from this line (4014) in the latest beta (1.6)
>> "src='://javascript:void(0)'><\/script>");
>> It should read:
>> "src='javascript:void(0)'><\/script>");
>> Anyone else notice this?
there was another thread th
On 28 sep, 09:51, Yanick <[EMAIL PROTECTED]> wrote:
>
> I think that this is more Java-like (which is my opinion the best OOP
> language), and it makes more sense than having an extra parameter in
> the consstructor.
>
Plus, with that $super prepended to the function arguments list, how
can you
On 28 sep, 09:51, Yanick <[EMAIL PROTECTED]> wrote:
>
> I tried some twists and try to call the parent method foo, but I
> failed to see how this can be accomplished with $super and the actual
> implementation. In the other hand, consider this blog post
> :http://www.severnsolutions.co.uk/twblog/
yup, we're going to correct this asap.
Regards,
Tobie
On Sep 28, 3:49 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I noticed that when using the DOMContentLoaded functionality of the
> new beta in IE, the browser will receive 404 calls (test it using
> filder).
>
> I believe the error i
On 28 sep, 09:25, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote:
>
> You can use $super in any method, not just initialize. The public method of
> "foo" still takes only 1 argument ("n") regardless of its declaration where
> $super is pushed in the front. (This is a bit magical.) The special word
>
I noticed that when using the DOMContentLoaded functionality of the
new beta in IE, the browser will receive 404 calls (test it using
filder).
I believe the error is from this line (4014) in the latest beta (1.6)
"src='://javascript:void(0)'><\/script>");
It should read:
"src='javascript:void(
Alex, javascript has its own garbage collector, sure... but firstly, it's
not a consistent implementation across browsers. This is an ancient problem
as far as Ajax development goes. Secondly, the apps I develop (and more
people are starting to get into) are highly complex, long running single
page
On 9/28/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
>
>
> I have a Prototype OOP tutorial ready, I just didn't publish it because
> we're still deciding about the API of additional methods other than
> Class.create.
Published: http://prototypejs.org/learn/class-inheritance
I've marked the sec
On 9/28/07, Yanick <[EMAIL PROTECTED]> wrote:
>
>
> var Class2 = Class.create(Class1, {
> ...
> foo: function($super, n) {
> return $super() * n;
> }
> };
new Class2().foo(2) //-> 202
You can use $super in any method, not just initialize. The public method of
"foo" still takes only 1 a
On 27 sep, 12:22, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote:
> On 9/27/07, Ryan Gahl <[EMAIL PROTECTED]> wrote:
>
>
>
> > ok, then it does work, my apologies :)
>
> Every implementation breaks if you use it wrong.
Talking about implementations, I understand why the proto team decided
to add $s
On 27 sep, 11:08, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote:
>
> You didn't call the parent constructor. That's why foo is missing. You need:
>
> initialize: function($super) {
> $super()
> this.bar = function() { alert( "bleh" ); };
> }
OO... so that's how it works... I'll have
On Sep 24, 1:16 pm, "Les Szklanny" <[EMAIL PROTECTED]> wrote:
> Yes, the destructor needs to be called manually, but calling it
> eliminates possible memory leaks.
>
> See below a destructor for the marker (pin) object that you see on a
> map. This destructor also destroys the events object, wh
21 matches
Mail list logo