[Bug 647] New: Support __defineGetter__ and __defineSetter__ for HopObjects

View: New views
8 Messages — Rating Filter:   Alert me  

[Bug 647] New: Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647

           Summary: Support __defineGetter__ and __defineSetter__ for
                    HopObjects
           Product: Helma
           Version: CVS trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: HopObject Functionality
        AssignedTo: helma-dev@...
        ReportedBy: lists@...


As Walter Krivanek pointed out on the Helma-user mailing list already,
__defineGetter__ and __defineSetter__ do currently not work for HopObject
properties.

Here a simple fix to make this to work. I am curious to hear if this might be
considered clean enough for inclusion in Helma 1.6.3 or later.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 647] Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647





------- Comment #1 from lists@...  2008-10-29 22:12 -------
Created an attachment (id=100)
 --> (http://helma.org/bugs/attachment.cgi?id=100&action=view)
The patch to add support for __defineGetter__ and __defineSetter__ to
HopObjects


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 647] Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647





------- Comment #2 from hannes@...  2008-11-05 14:34 -------
The one thing that disturbs me about this patch is the implementation of
delete(). If the property is defined via ScriptableObject slot, the
ScriptableObject slot is deleted, but the Node property is left untouched.
That's not what delete() should do IMO. IIRC remember you said via IRC you
needed this behaviour for your special purposes, but I think it's somewhat
questionable to twist ECMA functionality according to personal needs. Is it ok
with you to actually delete the property in delete()?


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 647] Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647





------- Comment #3 from lists@...  2008-11-05 14:53 -------
I completely agree and I am fine with your proposed change. In fact I do not
need __define[GS]etter__ functionality any longer on HopObject instances, only
on HopObject prototype objects, so maybe we could consider not applying this
patch at all. After all, HopObjects also dont support dontEnum, setAttribute,
and other things like that for db fields right now.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 647] Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647


hannes@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #100 is|0                           |1
           obsolete|                            |




------- Comment #4 from hannes@...  2008-11-05 15:06 -------
Created an attachment (id=103)
 --> (http://helma.org/bugs/attachment.cgi?id=103&action=view)
revised patch

Make delete() actually delete the property, plus add an explanatory comment.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 647] Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647





------- Comment #5 from lists@...  2008-11-05 15:30 -------
Is it necessary to check if the node has a property before unsetting it? I am
sure that for super it is not needed, and only slows things down. So it is safe
to just call super.delete. Maybe it could be as simple as:

node.unset(name);
super.delete(name);


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 647] Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647


hannes@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #103 is|0                           |1
           obsolete|                            |




------- Comment #6 from hannes@...  2008-11-05 16:18 -------
Created an attachment (id=104)
 --> (http://helma.org/bugs/attachment.cgi?id=104&action=view)
revised patch

I guess you are right. New patch version with simplified delete()


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 647] Support __defineGetter__ and __defineSetter__ for HopObjects

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=647


hannes@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7.0




------- Comment #7 from hannes@...  2008-11-05 16:36 -------
I committed the last patch.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev