NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Javascript this not recognized inside object


Joined: 03 Aug 2009
Posts: 9
Reply with quote
Given the following code. By doing a ctrl+click on monkeypower, it doesnt jump to the declaration. When the object is referenced as oink.killatime, it just works like a charm.

This haunts me since ages... any chance to fix this?

Code:
oink =
{
   killatime: function()
   {
      this.monkeypower();
   },
   
   
   monkeypower: function()
   {
      oink.killatime();
      this.killatime();
   }
};
View user's profileFind all posts by dfltSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
If you think it is a bug then you need to report it http://www.nusphere.com/contact_us/

I reported a bug 2 days ago and it is now fixed in 9039 Smile
View user's profileFind all posts by plugnplaySend private message


Joined: 18 May 2006
Posts: 61
Reply with quote
Should be fixed in build 9046.
Please give it a try.
View user's profileFind all posts by mdegtyarevSend private message


Joined: 03 Aug 2009
Posts: 9
Reply with quote
It's working, but...

When another this related operation is included in the function, it stops working.

Now, if you ctrl+click on this.monkeypower inside killatime It ceases to jump to the function.

Code:
oink =
{
   killatime: function()
   {
      this.monkeypower();

     this.funky = 111;

   },
   
   
   monkeypower: function()
   {
      oink.killatime();
      this.killatime();
   }
};
View user's profileFind all posts by dfltSend private message
Javascript this not recognized inside object
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic