Search the web
Sign In
New User? Sign Up
ajile · Ajile :: JavaScript Namespace & Imports
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Modifing Object.prototype kills ajile   Message List  
Reply | Forward Message #136 of 255 |
Hey Michael,

Great work on Ajile. Love it!

Found what could be considered a bug... When modifying or adding
methods to Object it causes Ajile to throw errors.

"supporters.getAll is not a function"

When switching to use com.iskitz.ajile.0.7.9.src.js the error is
triggered @ line 1001. After a cursory inspection, it appears that Ajile
is traversing through [Object].prototype to find members for what I'm
assuming is some dependency logic?

Here's a quick sample of offending code that will cause the error...

Object.prototype.inherits = function(obj) {
for (var property in obj)
{
this.prototype[property] = obj[property];
}
}

The following code eliminates the errors but is not a very good
solution. It seems to prevent Ajile from generating short names for
classes on Import (i.e. com.iskitz.ajile becoming simply ajile). For me
this is acceptable behavior as I intend to enforce a strict policy of
always using the fully qualified namespace when addressing classes.
However, it may be less than ideal for other users.

Object.prototype.getAll = function () {
try{
return members;
} catch(e) {
return {};
}
};

I had considered diving a bit deeper into your source, but I feel that
it would be more appropriate for you to identify the issue and provide a
patched release to the world than to give you some hacked code that may
not be inline with your intentions for Ajile.

Thanks so much!



[Non-text portions of this message have been removed]




Tue Jul 3, 2007 10:19 pm

good.midget@...
Send Email Send Email

Forward
Message #136 of 255 |
Expand Messages Author Sort by Date

Hey Michael, Great work on Ajile. Love it! Found what could be considered a bug... When modifying or adding methods to Object it causes Ajile to throw...
fawkyoou
good.midget@...
Send Email
Jul 3, 2007
10:20 pm

Hey, Thanks for the feedback. I recognize the error you're talking about but it's a bit strange that it's still happening. The code you see traversing...
iskitzdev
Offline Send Email
Jul 4, 2007
12:35 am

Well I tested Ajile 0.7.9 with code that modifies Object.prototype and it works. It seems to handle external Object.prototype changes without problems. If...
iskitzdev
Offline Send Email
Jul 5, 2007
5:34 am

Hey Michael, I've been doing some digging, and it appears that this Object.prototype problem may, in fact, be the cause of the Import issues and some other...
fawkyoou
Offline Send Email
Jul 13, 2007
8:51 pm

Excellent! This is precisely the change I mentioned vaguely in my response to your last post. Great work. I'll be making a new release soon, it will include...
mikeizworkin
Online Now Send Email
Jul 13, 2007
9:06 pm

Sweet! I'd love to help you out with setting up your unit tests. At the moment I'm pretty slammed with building out our architecture for another project....
fawkyoou
Offline Send Email
Jul 13, 2007
9:14 pm

Danny, Thanks for the offer. Yeah I'd appreciate those tests, makes my life easier too. I use Ajile in some of my own projects and being able to rely on it ...
iskitzdev
Offline Send Email
Jul 14, 2007
12:21 am

Update! This sneaky bug occurs in one more place, it's like a virus I tell you! This has got to be one of the best examples of how much trouble, pain, and time...
iskitzdev
Offline Send Email
Jul 14, 2007
4:09 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help