Roxen.git/
server/
etc/
modules/
Variable.pmod/
module.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2001-06-16
2001-06-16 15:48:40 by Martin Nilsson <mani@lysator.liu.se>
5bfe94abec093cfc43f1db871b7046c0f58ed4f1 (
27
lines) (+
26
/-
1
)
[
Show
|
Annotate
]
Branch:
5.2
Added a database widget
Rev: server/etc/modules/Variable.pmod/module.pmod:1.54
1:
-
// $Id: module.pmod,v 1.
53
2001/06/
14
20
:
07
:
11
js
Exp $
+
// $Id: module.pmod,v 1.
54
2001/06/
16
15
:
48
:
40
nilsson
Exp $
#include <module.h> #include <roxen.h>
906:
} }
+
class DatabaseChoice
+
//! Select a database from all available databases.
+
{
+
inherit StringChoice;
+
constant type = "DatabaseChoice";
-
+
function(void:void|object) config = lambda() { return; };
+
+
DatabaseChoice set_configuration_pointer( function(void:object) configuration )
+
//! Provide a function that returns a configuration object,
+
//! that will be used for authentication against the database
+
//! manager. Typically called as
+
//! @code{set_configuration_pointer(my_configuration)}.
+
{
+
config = configuration;
+
return this_object();
+
}
+
+
array get_choice_list( )
+
{
+
return ({ " none" }) + sort(DBManager.list( config() ));
+
}
+
}
+
+
// ===================================================================== // List baseclass // =====================================================================