Connecting Tech Pros Worldwide Help | Site Map

function and object types

  #1  
Old January 25th, 2007, 03:45 AM
gg9h0st
Guest
 
Posts: n/a
function aa() {};
var bb = new aa();

var dd = new function cc() {};

aa.prototype.rr = 100;
cc.prototype.rr = 100;

---------------------------------------------------------------

i wrote the code above that makes two functions and two object for
those.

bb(object)<-aa(function),
cc(object)<-dd(function).

i think it's all the same way to make an object for a function.

but if u try to debug,

bb object has rr right after "aa.prototype.rr = 100" statement
but cc deosn't have rr variable.

can anyone explain it why?

thanks in advance.

  #2  
Old January 25th, 2007, 06:35 AM
gg9h0st
Guest
 
Posts: n/a

re: function and object types




On 1¿ù25ÀÏ, ¿ÀÈÄ12½Ã32ºÐ, "gg9h0st" <mn9h...@hotmail.comwrote:
Quote:
function aa() {};
var bb = new aa();
>
var dd = new function cc() {};
>
aa.prototype.rr = 100;
cc.prototype.rr = 100;
>
---------------------------------------------------------------
>
i wrote the code above that makes two functions and two object for
those.
>
bb(object)<-aa(function),
dd(object)<-cc(function).
>
i think it's all the same way to make an object for a function.
>
but if u try to debug,
>
bb object has rr right after "aa.prototype.rr = 100" statement
but dd deosn't have rr variable.
>
can anyone explain it why?
>
thanks in advance.
sorry. some misstakes in prev message.
-dd(object)<-cc(function).
->but dd deosn't have rr variable.
modified.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deriving from Abstract Classes with Enums and Varying Object Types Confused Newbie answers 4 July 20th, 2006 08:25 PM
Method return type of a methond that returns different object types Nerd answers 2 March 16th, 2006 07:45 AM
function object yysiow answers 3 November 17th, 2005 08:19 PM
how to dynamically create a function object (from a code object)? Petri Savolainen answers 0 July 18th, 2005 01:14 AM