From 1d62ba2ebf84edc73b5be85ec64c921b4f00153d Mon Sep 17 00:00:00 2001 From: rich Date: Fri, 14 Jan 2005 19:04:48 +0000 Subject: [PATCH] #input_names method. --- wrappers/pl_HTML_Form.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wrappers/pl_HTML_Form.ml b/wrappers/pl_HTML_Form.ml index c6c4912..eb09d5d 100644 --- a/wrappers/pl_HTML_Form.ml +++ b/wrappers/pl_HTML_Form.ml @@ -2,7 +2,7 @@ * * Copyright (C) 2003 Merjis Ltd. * - * $Id: pl_HTML_Form.ml,v 1.2 2005-01-13 10:38:54 rich Exp $ + * $Id: pl_HTML_Form.ml,v 1.3 2005-01-14 19:04:48 rich Exp $ *) open Perl @@ -23,6 +23,14 @@ object (self) method set_attr name value = call_method_void sv "attr" [sv_of_string name; sv_of_string value] + (* The following isn't a real method. The return type of HTML::Form->inputs + * isn't documented, but I wanted a list of input names (as strings) anyway. + *) + method input_names = + let inputs = call_method_array sv "inputs" [] in + let names = List.map (fun sv -> call_method sv "name" []) inputs in + List.map string_of_sv names + end let parse_document html_document base_uri = -- 1.8.3.1