I have to use a forum in the BSCW-platform. It is a platform open only to members, so I cannot give a URL to it.
When I use the BSCW with Firefox, all pop-up-menues are displayed properly, when using Safari, all menue-items are displayed as "undefined".
Created attachment 6912 [details]
Created attachment 6913 [details]
Could you please provide us with the source code of the page. The best way is opening the page with FireFox and choose "Save As". Upload this as a .zip archive in an attachment. If there is private information on the page you can filter that out ofcourse.
Created attachment 6914 [details]
The source code of the page
Created attachment 12277 [details]
The problem here was that a local variable "item" got shadowed by Node::item within a "with" block. AFAICT, there is no reason to have this method on Node. "Gecko DOM reference" cited in code comment is probably <http://developer.mozilla.org/en/docs/DOM:element.item>, which specifically states that "despite this article's name, item() is not a method of DOM Element or Node."
The included test passes in Firefox 2 and IE 6.
Comment on attachment 12277 [details]
Would you please add the item function to HTMLSelectElement.idl/h/cpp instead of adding it to kjs_html.h/cpp?
(In reply to comment #6)
> Would you please add the item function to HTMLSelectElement.idl/h/cpp instead
> of adding it to kjs_html.h/cpp?
HTMLSelectElement JS bindings are not generated from IDL (yet?), so I guess this code has to go to kjs_html. I'm not sure if we need this method in ObjC binding, its standards status seems somewhat unclear.
(In reply to comment #7)
> HTMLSelectElement JS bindings are not generated from IDL (yet?), so I guess
> this code has to go to kjs_html.
OK. Argh. Well, I'd still like HTMLSelectElement.h/cpp to have the code, even if the binding is old-style. I marked the patch review+, though.
> I'm not sure if we need this method in ObjC binding, its standards status seems somewhat unclear.
Created attachment 12302 [details]
Added item() to DOM and ObjC binding, too.
Not sure if it should be marked const in DOM. It returns a non-const pointer to object data, so it probably shouldn't, but is marked const in NodeList, for example.
Comment on attachment 12302 [details]
Committed revision 18674.