[Bug 670] New: convinient Searcher.HitCollection - forEach

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

[Bug 670] New: convinient Searcher.HitCollection - forEach

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

Reply to Author | View Threaded | Show Only this Message

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

           Summary: convinient Searcher.HitCollection - forEach
           Product: Helma
           Version: CVS trunk
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Extensions
        AssignedTo: helma-dev@...
        ReportedBy: nostalgiker@...


patch adds convinience function forEach(), adapted
https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Array/ForEach 

less error prone then for-loop + get()

HitCollection now has:
 * get()
 * length()
 * size()
 * forEach()

would also suggest adding 'length' getter and removing size()

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

[Bug 670] convinient Searcher.HitCollection - forEach

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

Reply to Author | View Threaded | Show Only this Message

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





--- Comment #1 from s o <nostalgiker@...>  2009-06-22 15:34:48 ---
Created an attachment (id=113)
 --> (http://dev.helma.org/bugs/attachment.cgi?id=113)
adds foreach to Searcher.HitCollection

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

[Bug 670] convinient Searcher.HitCollection - forEach

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

Reply to Author | View Threaded | Show Only this Message

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





--- Comment #2 from s o <nostalgiker@...>  2009-06-29 15:16:59 ---
afaiu the bitshifting line I blindly copied from the mozillawiki could be
replaced with

 > var len = Math.abs(this.length)

since that is easier to understand and bitshifting isn't that fast in JS
anyways.

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

[Bug 670] convinient Searcher.HitCollection - forEach

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

Reply to Author | View Threaded | Show Only this Message

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


Robert Gaggl <robert@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |robert@...
         Resolution|                            |FIXED




--- Comment #3 from Robert Gaggl <robert@...>  2009-06-30 10:21:20 ---
Thanks for the patch, it's in trunk now (w. minor adaptions, see
http://dev.helma.org/trac/helma/changeset/9838)

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