I would swear that C++ hasn't got such an strange thing (VB you say?).
Couldn't you have been confused by the default constructor that the compiler
provides when you don't supply one?
Returning to the original question, i think this doesn't exist. Why can't
you call a function "default" or something like that consistently in all
your objects?
I wonder why could it be useful. Do you want to change it on the fly? I
believe you could do:
MyObject.prototype.function1=function() { bla bla bla };
MyObject.prototype.function2=function() { bla bla bla };
and then:
MyObject.prototype.default = MyObject.prototype.function1;
and change it on the fly using:
MyObject.prototype.default = MyObject.prototype.function2;
Is this what you need?
Regards,
Josep
-----Mensaje original-----
De: Doug Melvin <[EMAIL PROTECTED]>
Para: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Fecha: sábado 3 de febrero de 2001 3:09
Asunto: Re: [Dynapi-Help] JavaScript Question
>It's C++ thing.
>
>As far as I know a javascript object can not have a default method
>
>Doug
>----- Original Message -----
>From: "Jack_Speranza" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, February 02, 2001 2:17 PM
>Subject: RE: [Dynapi-Help] JavaScript Question
>
>
>> OK, I'm really gonna show my ignorance here... what do you mean by a
>> "default" method?
>>
>> -----Original Message-----
>> From: Matthew Alan Shirey [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, February 02, 2001 4:58 PM
>> To: Dynapi-Help
>> Subject: [Dynapi-Help] JavaScript Question
>>
>>
>> Hey all,
>>
>> This isn't really DynAPI related but it is JS related.
>> Is there a way to define a default method for a JavaScript object?
>VBScript
>> has this ability but so far I have not been able to find the same thing
in
>> JavaScript...
>>
>> Thanks,
>>
>> -- Matthew
>>
>>
>> _______________________________________________
>> Dynapi-Help mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>>
>> _______________________________________________
>> Dynapi-Help mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
>
>_______________________________________________
>Dynapi-Help mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help