Commit 51fe496be35155ddc273afc5d870604a86897dff

Authored by totoro
1 parent 7a53f1c1

refactoring to DS_Type_File management

ds_files/ds_types.anubis
... ... @@ -12,277 +12,288 @@ read densaku_lib/types/densaku.anubis
12 12 define String model_types = "hayamiki_lib/model/types/".
13 13 define String view_types = "hayamiki_lib/view/types/".
14 14  
15   -public define List(DS_Type) hayamiki_lib_types_description =
  15 +public define List(DS_Type_File) hayamiki_lib_types_description =
16 16 [
17   - ds_type("HK_Database", [
18   - alternative("hk_database", [
19   - component(string, "name", comment("name of the database")),
20   - component(list, extern_type("HK_App", model_types+"hk_app.anubis"), "apps", comment("list of applications"))
21   - ])
22   - ]),
23   -
24   - ds_type("HK_App", [
25   - alternative("hk_app", [
26   - component(string, "app_name"),
27   - component(extern_type("HK_Icon", model_types+"hk_icon.anubis"), "icon"),
28   - component(extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help"),
29   - component(list, extern_type("HK_Table", model_types+"hk_table.anubis"), "hk_tables")
30   - ])
31   - ]),
32   -
33   - ds_type("HK_Icon", [
34   - enum("no_icon"),
35   - alternative("icon16", [
36   - component(string, "name")
37   - ])
38   - ]),
39   -
40   - ds_type("HK_Help_Text", [
41   - enum("no_help_text", comment("no help text available")),
42   - alternative("help_text_TAG", [
43   - component(string, "h_text_tag", comment("TAG use with Anubis translation tool /locale/L3.anubis"))
  17 + ds_type_file(auto, auto,
  18 + [
  19 + ds_type("HK_Database", [
  20 + alternative("hk_database", [
  21 + component(string, "name", comment("name of the database")),
  22 + component(list, extern_type("HK_App", model_types+"hk_app.anubis"), "apps", comment("list of applications"))
  23 + ])
  24 + ]),
  25 +
  26 + ds_type("HK_App", [
  27 + alternative("hk_app", [
  28 + component(string, "app_name"),
  29 + component(extern_type("HK_Icon", model_types+"hk_icon.anubis"), "icon"),
  30 + component(extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help"),
  31 + component(list, extern_type("HK_Table", model_types+"hk_table.anubis"), "hk_tables")
  32 + ])
44 33 ]),
45   - alternative("help_text", [
46   - component(string, "h_text", comment("pure text to show"))
47   - ])
48   - ]),
49 34  
50   - ds_type("HK_Table", [
51   - alternative("hk_table", [
52   - component(string, "name", comment("name of the table")),
53   - component(string, "short_name", comment("table name without app_name in prefix")),
54   - component(extern_type("HK_Model", model_types+"hk_model.anubis"), "model"),
55   - component(extern_type("HK_Display", view_types+ "hk_display.anubis"), "display")
56   - ])
57   - ]),
58   -
59   - ds_type("HK_Model", [
60   - alternative("hk_model", [
61   - component(list, extern_type("HK_Model_Column", model_types+"hk_model_column.anubis"), "columns", comment("columns other than the primary key column (if any)")),
62   - component(string, "show_string")
63   - ])
64   - ]),
65   -
66   - ds_type("HK_Model_Column", [
67   - alternative("hk_column", [
68   - component( string, "name", comment("name of ordinary column (i.e. all but 'id')")),
69   - component( extern_type("HK_Model_Field", model_types+"hk_model_field.anubis"), "type"),
70   - component(list, extern_type("HK_Model_Attr", model_types+"hk_model_attr.anubis"), "attributes"),
71   - component( extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help")
72   - ])
73   - ]),
74   -
75   - ds_type("HK_Model_Field", [
76   - enum("p_key"),
77   - enum("boolean_field", comment("true or false")),
78   - alternative("date_field", [
79   - component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("date with the precision of the day")),
  35 + ds_type("HK_Icon", [
  36 + enum("no_icon"),
  37 + alternative("icon16", [
  38 + component(string, "name")
  39 + ])
80 40 ]),
81   - alternative("time_field", [
82   - component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("time with the precision of the second")),
  41 +
  42 + ds_type("HK_Help_Text", [
  43 + enum("no_help_text", comment("no help text available")),
  44 + alternative("help_text_TAG", [
  45 + component(string, "h_text_tag", comment("TAG use with Anubis translation tool /locale/L3.anubis"))
  46 + ]),
  47 + alternative("help_text", [
  48 + component(string, "h_text", comment("pure text to show"))
  49 + ])
83 50 ]),
84   - alternative("datetime_field", [
85   - component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("datetime with the precision of the second")),
  51 +
  52 + ds_type("HK_Table", [
  53 + alternative("hk_table", [
  54 + component(string, "name", comment("name of the table")),
  55 + component(string, "short_name", comment("table name without app_name in prefix")),
  56 + component(extern_type("HK_Model", model_types+"hk_model.anubis"), "model"),
  57 + component(extern_type("HK_Display", view_types+ "hk_display.anubis"), "display")
  58 + ])
86 59 ]),
87   - alternative("foreign_key", comment("foreign key to 'id' in another (or same) table and column_name for choice selector)"),
88   - [
89   - component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"),
90   - component(string, "table_name"),
91   - //component(extern_type("HK_FK_Attr", model_types+"hk_fk_attr.anubis"), "fk_attr"),
  60 +
  61 + ds_type("HK_Model", [
  62 + alternative("hk_model", [
  63 + component(list, extern_type("HK_Model_Column", model_types+"hk_model_column.anubis"), "columns", comment("columns other than the primary key column (if any)")),
  64 + component(string, "show_string")
  65 + ])
92 66 ]),
93   - alternative("integer_field", [
94   - component(extern_type("HK_Int_Choices", model_types+"hk_int_choices.anubis"), "choices", comment("integer of arbitrary size ")),
  67 +
  68 + ds_type("HK_Model_Column", [
  69 + alternative("hk_column", [
  70 + component( string, "name", comment("name of ordinary column (i.e. all but 'id')")),
  71 + component( extern_type("HK_Model_Field", model_types+"hk_model_field.anubis"), "type"),
  72 + component(list, extern_type("HK_Model_Attr", model_types+"hk_model_attr.anubis"), "attributes"),
  73 + component( extern_type("HK_Help_Text", model_types+"hk_help_text.anubis"), "help")
  74 + ])
95 75 ]),
96   - enum("float_field"),
97   - alternative("char_field", [
98   - component(extern_type("HK_Text_Choices", model_types+"hk_text_choices.anubis"), "choices"),
99   - component(int, "size", comment("text of maximal size 'size' (number of characters)")),
  76 +
  77 + ds_type("HK_Model_Field", [
  78 + enum("p_key"),
  79 + enum("boolean_field", comment("true or false")),
  80 + alternative("date_field", [
  81 + component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("date with the precision of the day")),
  82 + ]),
  83 + alternative("time_field", [
  84 + component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("time with the precision of the second")),
  85 + ]),
  86 + alternative("datetime_field", [
  87 + component(extern_type("HK_Datetime_Field_Attr", model_types+"hk_datetime_field_attr.anubis"), "hk_dt_f_attr", comment("datetime with the precision of the second")),
  88 + ]),
  89 + alternative("foreign_key", comment("foreign key to 'id' in another (or same) table and column_name for choice selector)"),
  90 + [
  91 + component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"),
  92 + component(string, "table_name"),
  93 + //component(extern_type("HK_FK_Attr", model_types+"hk_fk_attr.anubis"), "fk_attr"),
  94 + ]),
  95 + alternative("integer_field", [
  96 + component(extern_type("HK_Int_Choices", model_types+"hk_int_choices.anubis"), "choices", comment("integer of arbitrary size ")),
  97 + ]),
  98 + enum("float_field"),
  99 + alternative("char_field", [
  100 + component(extern_type("HK_Text_Choices", model_types+"hk_text_choices.anubis"), "choices"),
  101 + component(int, "size", comment("text of maximal size 'size' (number of characters)")),
  102 + ]),
  103 + alternative("password_field", [
  104 + component(int, "min_size", comment("the password field doesn't show the password string or store it in hashed version into database")),
  105 + ]),
  106 + alternative("text_field", comment("text of variable size"),
  107 + [
  108 + component(extern_type("HK_Text_Field_Attr", model_types+"hk_text_field_attr.anubis"), "hk_text_field_attr"),
  109 + ]),
  110 + enum("color_field", comment("String which representing RGBA color like HTML"))
100 111 ]),
101   - alternative("password_field", [
102   - component(int, "min_size", comment("the password field doesn't show the password string or store it in hashed version into database")),
  112 +
  113 + //
  114 + ds_type("HK_Text_Field_Attr", [
  115 + enum("none", comment("Nothing special, normal behaviour")),
  116 + enum("rich_editor", comment("Use richt text editor for that area"))
103 117 ]),
104   - alternative("text_field", comment("text of variable size"),
105   - [
106   - component(extern_type("HK_Text_Field_Attr", model_types+"hk_text_field_attr.anubis"), "hk_text_field_attr"),
  118 +
  119 + // ds_type("HK_FK_Attr", [
  120 + // enum("one_to_one", comment("Foreign key relation is one to one")),
  121 + // enum("many_to_one", comment("Foreign key relation is many to one"))
  122 + // ]),
  123 +
  124 + ds_type("HK_Int_Choices", [
  125 + enum("no_choice", comment("No list choice is available. Hence the user must enter the value")),
  126 + alternative("int_choices", [
  127 + component(list, extern_type("HK_Int_Choice", model_types+"hk_int_choice.anubis"), "hk_int_choice", comment("List of possible choices"))
  128 + ])
107 129 ]),
108   - enum("color_field", comment("String which representing RGBA color like HTML"))
109   - ]),
110   -
111   - //
112   - ds_type("HK_Text_Field_Attr", [
113   - enum("none", comment("Nothing special, normal behaviour")),
114   - enum("rich_editor", comment("Use richt text editor for that area"))
115   - ]),
116   -
117   -// ds_type("HK_FK_Attr", [
118   -// enum("one_to_one", comment("Foreign key relation is one to one")),
119   -// enum("many_to_one", comment("Foreign key relation is many to one"))
120   -// ]),
121   -
122   - ds_type("HK_Int_Choices", [
123   - enum("no_choice", comment("No list choice is available. Hence the user must enter the value")),
124   - alternative("int_choices", [
125   - component(list, extern_type("HK_Int_Choice", model_types+"hk_int_choice.anubis"), "hk_int_choice", comment("List of possible choices"))
126   - ])
127   - ]),
128   -
129   - ds_type("HK_Int_Choice", [
130   - alternative("hk_int_choice", [
131   - component(int, "value", comment("value to set in database corresponding to description below")),
132   - component(string, "visible", comment("visible string which help the user to choose teh correct choice"))
133   - ])
134   - ]),
135   -
136   - ds_type("HK_Text_Choices", [
137   - enum("no_choice"),
138   - alternative("text_choices", [
139   - component(list, extern_type("HK_Text_Choice", model_types+"hk_text_choice.anubis"), "hk_text_choice")
140   - ])
141   - ]),
142   -
143   - ds_type("HK_Text_Choice", [
144   - alternative("hk_text_choice", [
145   - component(string, "value"),
146   - component(string, "visible")
147   - ])
148   - ]),
149   -
150   - ds_type("HK_App_Name", [
151   - enum("this"),
152   - alternative("app_name", [
153   - component(string, "name"),
  130 +
  131 + ds_type("HK_Int_Choice", [
  132 + alternative("hk_int_choice", [
  133 + component(int, "value", comment("value to set in database corresponding to description below")),
  134 + component(string, "visible", comment("visible string which help the user to choose teh correct choice"))
  135 + ])
154 136 ]),
155   - enum("none"),
156   - ]),
157   -
158   - ds_type("HK_Datetime_Field_Attr", [
159   - enum("none", comment("Nothing special, normal behaviour")),
160   - enum("auto_now", comment("Always update datetime at SQL update")),
161   - enum("auto_now_add", comment("Set current datetime when row is created and can't be edited anymore"))
162   - ]),
163   -
164   - ds_type("HK_Model_Attr", [
165   - enum("unique", comment("by default, the values in a column are not required to be all different ")),
166   - alternative("default", [
167   - component(string, "default_str", comment("default value (used in case of creation of a NON NULL column in a table which already contains some rows)")),
  137 +
  138 + ds_type("HK_Text_Choices", [
  139 + enum("no_choice"),
  140 + alternative("text_choices", [
  141 + component(list, extern_type("HK_Text_Choice", model_types+"hk_text_choice.anubis"), "hk_text_choice")
  142 + ])
168 143 ]),
169   - enum("not_null"),
170   - ]),
171   -
172   -
173   -
174   - //HK_DISPLAY
175   - ds_type("HK_Display", [
176   - alternative("hk_display", [
177   - component(list, extern_type("HK_List_View", view_types+"hk_list_view.anubis"), "list_views"),
178   - component(list, extern_type("HK_Edit_View", view_types+"hk_edit_view.anubis"), "list_edits"),
179   - ])
180   - ]),
181   -
  144 +
  145 + ds_type("HK_Text_Choice", [
  146 + alternative("hk_text_choice", [
  147 + component(string, "value"),
  148 + component(string, "visible")
  149 + ])
  150 + ]),
  151 +
  152 + ds_type("HK_App_Name", [
  153 + enum("this"),
  154 + alternative("app_name", [
  155 + component(string, "name"),
  156 + ]),
  157 + enum("none"),
  158 + ]),
  159 +
  160 + ds_type("HK_Datetime_Field_Attr", [
  161 + enum("none", comment("Nothing special, normal behaviour")),
  162 + enum("auto_now", comment("Always update datetime at SQL update")),
  163 + enum("auto_now_add", comment("Set current datetime when row is created and can't be edited anymore"))
  164 + ]),
  165 +
  166 + ds_type("HK_Model_Attr", [
  167 + enum("unique", comment("by default, the values in a column are not required to be all different ")),
  168 + alternative("default", [
  169 + component(string, "default_str", comment("default value (used in case of creation of a NON NULL column in a table which already contains some rows)")),
  170 + ]),
  171 + enum("not_null"),
  172 + ]),
  173 +
  174 +
  175 +
  176 + //HK_DISPLAY
  177 + ds_type("HK_Display", [
  178 + alternative("hk_display", [
  179 + component(list, extern_type("HK_Viewer", view_types+"hk_viewer.anubis"), "l_viewer"),
  180 + component(list, extern_type("HK_Editor", view_types+"hk_editor.anubis"), "l_editor"),
  181 + ])
  182 + ]),
  183 +
  184 +
  185 +
  186 + ds_type("HK_Viewer", [
  187 + enum("list_view_all"),
  188 + alternative("list_view", [
  189 + component(string, "view_name"),
  190 + component(list, string, "columns"),
  191 + component(extern_type("WEB_Action_Name", "calexium_lib/web/types/web_action_name.anubis"), "link_id_action")
  192 + ])
  193 + ]),
  194 +
  195 + ds_type("HK_FK_View", [
  196 + alternative("fk_view", [
  197 + component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"),
  198 + component(string, "table_name"),
  199 + component(string, "fk_col_name", comment("column name of the foreign key. The column name must exists in the hk_model")),
  200 + ])
  201 + ]),
  202 +
  203 + ds_type("HK_Form_Table_Cell", no_message, [
  204 + alternative("hk_form_table_cell", [
  205 + component(extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "form_entry")
  206 + ])
  207 + ]),
  208 +
  209 + ds_type("HK_Form_Table_Line", no_message, [
  210 + alternative("hk_form_table_line", [
  211 + component(list, extern_type("HK_Form_Table_Cell", view_types+"hk_form_table_cell.anubis"), "form_table_cells")
  212 + ])
  213 + ]),
  214 +
  215 + ds_type("HK_Form_Table_Attribute", [
  216 + alternative("hidden", [
  217 + component(string, "name"),
  218 + component(string, "value")
  219 + ])
  220 + ]),
  221 +
  222 + ds_type("HK_Form_Table", no_message, [
  223 + alternative("hk_form_table", [
  224 + component(list, extern_type("HK_Form_Table_Attribute", view_types+"hk_form_table_attribute.anubis"), "table_attr"),
  225 + component(list, extern_type("HK_Form_Table_Line", view_types+"hk_form_table_line.anubis"), "form_lines")
  226 + ])
  227 + ]),
  228 +
182 229  
183   -
184   - ds_type("HK_List_View", [
185   - enum("list_view_all"),
186   - alternative("list_view", [
187   - component(string, "view_name"),
188   - component(list, string, "columns"),
189   - component(extern_type("WEB_Action_Name", "calexium_lib/web/types/web_action_name.anubis"), "link_id_action")
190   - ])
191   - ]),
  230 +
192 231  
193   - ds_type("HK_FK_View", [
194   - alternative("fk_view", [
195   - component(extern_type("HK_App_Name", model_types+"hk_app_name.anubis"), "app_name"),
196   - component(string, "table_name"),
197   - component(string, "fk_col_name", comment("column name of the foreign key. The column name must exists in the hk_model")),
198   - ])
199   - ]),
200   -
201   - ds_type("HK_Form_Table_Cell", no_message, [
202   - alternative("hk_form_table_cell", [
203   - component(extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "form_entry")
204   - ])
205   - ]),
206   -
207   - ds_type("HK_Form_Table_Line", no_message, [
208   - alternative("hk_form_table_line", [
209   - component(list, extern_type("HK_Form_Table_Cell", view_types+"hk_form_table_cell.anubis"), "form_table_cells")
210   - ])
211   - ]),
212   -
213   - ds_type("HK_Form_Table_Attribute", [
214   - alternative("hidden", [
215   - component(string, "name"),
216   - component(string, "value")
217   - ])
218   - ]),
219   -
220   - ds_type("HK_Form_Table", no_message, [
221   - alternative("hk_form_table", [
222   - component(list, extern_type("HK_Form_Table_Attribute", view_types+"hk_form_table_attribute.anubis"), "table_attr"),
223   - component(list, extern_type("HK_Form_Table_Line", view_types+"hk_form_table_line.anubis"), "form_lines")
224   - ])
225   - ]),
226   -
227   - ds_type("HK_Edit_View_Table_Cell", [
228   - enum("empty"),
229   - alternative("column", [
230   - component(string, "column_name")
  232 +
  233 + ds_type("HK_Editor", [
  234 + enum("edit_view_all"),
  235 + alternative("edit_view_list_form", [
  236 + component(string, "view_name"),
  237 + component(list, string, "columns"),
  238 + component(list, extern_type("HK_FK_View", view_types+"hk_fk_view.anubis"), "fk_view")
  239 + ]),
  240 + alternative("form_table", [
  241 + component(string, "view_name"),
  242 + component(extern_type("HK_Editor_Table", view_types+"hk_editor_table.anubis"), "form_table")
  243 + ])
231 244 ]),
232   - alternative("label", [
233   - component(string, "label"),
  245 +
  246 + ds_type("HK_Form_Tab", no_message, [
  247 + alternative("hk_form_tab", [
  248 + component(string, "fk_table_name"),
  249 + component(string, "fk_col_name"),
  250 + component(string, "list_view_name")
  251 + ])
234 252 ]),
235   - alternative("cell", [
236   - component(list, extern_type("HK_Edit_View_Table_Cell", view_types+"hk_edit_view_table_cell.anubis"), "cell")
237   - ])
238   - ]),
239   -
240   - ds_type("HK_Edit_View_Table_Line", [
241   - alternative("line", [
242   - component(list, extern_type("HK_Edit_View_Table_Cell", view_types+"hk_edit_view_table_cell.anubis"), "cells")
243   - ])
244   - ]),
245   -
246   - ds_type("HK_Edit_View_Table", [
247   - alternative("table", [
248   - component(list, extern_type("HK_Edit_View_Table_Line", view_types+"hk_edit_view_table_line.anubis"), "lines")
249   - ])
250   - ]),
251   -
252   - ds_type("HK_Edit_View", [
253   - enum("edit_view_all"),
254   - alternative("edit_view_list_form", [
255   - component(string, "view_name"),
256   - component(list, string, "columns"),
257   - component(list, extern_type("HK_FK_View", view_types+"hk_fk_view.anubis"), "fk_view")
  253 +
  254 + ds_type("HK_Form", no_message, [
  255 + alternative("hk_form_in_list", [
  256 + component(string, "table_name", comment("database table name which belonging this form")),
  257 + component(string, "view_name", comment("name of the view")),
  258 + component(list, extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "list"),
  259 + component(list, extern_type("HK_Form_Tab", view_types+"hk_form_tab.anubis"), "tabs")
  260 + ]),
  261 + alternative("hk_form_in_table", [
  262 + component(string, "table_name", comment("database table name which belonging this form")),
  263 + component(string, "view_name", comment("name of the view")),
  264 + component(extern_type("HK_Form_Table", view_types+"hk_form_table.anubis"), "form_in_table")
  265 + ])
  266 + ])
  267 +
  268 + ]
  269 + ),
  270 + ds_type_file(auto, name("hk_editor_table"),
  271 + [
  272 + ds_type("HK_Editor_Table_Cell", [
  273 + enum("empty"),
  274 + alternative("column", [
  275 + component(string, "column_name")
  276 + ]),
  277 + alternative("label", [
  278 + component(string, "label"),
  279 + ]),
  280 + alternative("table", [
  281 + component(list, ds_type("HK_Editor_Table_Line"), "lines")
  282 + ])
258 283 ]),
259   - alternative("edit_view_table_form", [
260   - component(string, "view_name"),
261   - component(extern_type("HK_Edit_View_Table", view_types+"hk_edit_view_table.anubis"), "form_table")
262   - ])
263   - ]),
264   -
265   - ds_type("HK_Form_Tab", no_message, [
266   - alternative("hk_form_tab", [
267   - component(string, "fk_table_name"),
268   - component(string, "fk_col_name"),
269   - component(string, "list_view_name")
270   - ])
271   - ]),
272   -
273   - ds_type("HK_Form", no_message, [
274   - alternative("hk_form_in_list", [
275   - component(string, "table_name", comment("database table name which belonging this form")),
276   - component(string, "view_name", comment("name of the view")),
277   - component(list, extern_type("HK_Form_Entry", view_types+"hk_form_entry.anubis"), "list"),
278   - component(list, extern_type("HK_Form_Tab", view_types+"hk_form_tab.anubis"), "tabs")
  284 +
  285 + ds_type("HK_Editor_Table_Line", [
  286 + alternative("line", [
  287 + component(list, ds_type("HK_Editor_Table_Cell"), "cells")
  288 + ])
279 289 ]),
280   - alternative("hk_form_in_table", [
281   - component(string, "table_name", comment("database table name which belonging this form")),
282   - component(string, "view_name", comment("name of the view")),
283   - component(extern_type("HK_Form_Table", view_types+"hk_form_table.anubis"), "form_in_table")
284   - ])
285   - ])
286   -
  290 + ds_type("HK_Editor_Table", [
  291 + alternative("table", [
  292 + component(list, ds_type("HK_Editor_Table_Line"), "lines")
  293 + ])
  294 + ]),
  295 +
  296 + ])
  297 +
287 298 ]
288 299 .
... ...
model/types/hk_app.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -14,6 +14,8 @@ transmit hayamiki_lib/model/types/hk_table.anubis
14 14 transmit hayamiki_lib/model/types/hk_help_text.anubis
15 15 transmit hayamiki_lib/model/types/hk_icon.anubis
16 16  
  17 +
  18 +
17 19 public type HK_App:
18 20 hk_app(
19 21 String app_name,
... ...
model/types/hk_app_name.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_App_Name:
15 17 this,
16 18 app_name(
... ...
model/types/hk_database.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,6 +12,8 @@ transmit tools/basis.anubis
12 12  
13 13 transmit hayamiki_lib/model/types/hk_app.anubis
14 14  
  15 +
  16 +
15 17 public type HK_Database:
16 18 hk_database(
17 19 String name, //name of the database
... ...
model/types/hk_datetime_field_attr.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Datetime_Field_Attr:
15 17 none, //Nothing special, normal behaviour
16 18 auto_now, //Always update datetime at SQL update
... ...
model/types/hk_help_text.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Help_Text:
15 17 no_help_text, //no help text available
16 18 help_text_TAG(
... ...
model/types/hk_icon.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Icon:
15 17 no_icon,
16 18 icon16(
... ...
model/types/hk_int_choice.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Int_Choice:
15 17 hk_int_choice(
16 18 Int value, //value to set in database corresponding to description below
... ...
model/types/hk_int_choices.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,6 +12,8 @@ transmit tools/basis.anubis
12 12  
13 13 transmit hayamiki_lib/model/types/hk_int_choice.anubis
14 14  
  15 +
  16 +
15 17 public type HK_Int_Choices:
16 18 no_choice, //No list choice is available. Hence the user must enter the value
17 19 int_choices(
... ...
model/types/hk_model.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,6 +12,8 @@ transmit tools/basis.anubis
12 12  
13 13 transmit hayamiki_lib/model/types/hk_model_column.anubis
14 14  
  15 +
  16 +
15 17 public type HK_Model:
16 18 hk_model(
17 19 List(HK_Model_Column) columns, //columns other than the primary key column (if any)
... ...
model/types/hk_model_attr.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Model_Attr:
15 17 unique, //by default, the values in a column are not required to be all different
16 18 default(
... ...
model/types/hk_model_column.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -14,6 +14,8 @@ transmit hayamiki_lib/model/types/hk_help_text.anubis
14 14 transmit hayamiki_lib/model/types/hk_model_attr.anubis
15 15 transmit hayamiki_lib/model/types/hk_model_field.anubis
16 16  
  17 +
  18 +
17 19 public type HK_Model_Column:
18 20 hk_column(
19 21 String name, //name of ordinary column (i.e. all but 'id')
... ...
model/types/hk_model_field.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -16,6 +16,8 @@ transmit hayamiki_lib/model/types/hk_int_choices.anubis
16 16 transmit hayamiki_lib/model/types/hk_app_name.anubis
17 17 transmit hayamiki_lib/model/types/hk_datetime_field_attr.anubis
18 18  
  19 +
  20 +
19 21 public type HK_Model_Field:
20 22 p_key,
21 23 boolean_field, //true or false
... ...
model/types/hk_table.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -13,6 +13,8 @@ transmit tools/basis.anubis
13 13 transmit hayamiki_lib/view/types/hk_display.anubis
14 14 transmit hayamiki_lib/model/types/hk_model.anubis
15 15  
  16 +
  17 +
16 18 public type HK_Table:
17 19 hk_table(
18 20 String name, //name of the table
... ...
model/types/hk_text_choice.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Text_Choice:
15 17 hk_text_choice(
16 18 String value,
... ...
model/types/hk_text_choices.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,6 +12,8 @@ transmit tools/basis.anubis
12 12  
13 13 transmit hayamiki_lib/model/types/hk_text_choice.anubis
14 14  
  15 +
  16 +
15 17 public type HK_Text_Choices:
16 18 no_choice,
17 19 text_choices(
... ...
model/types/hk_text_field_attr.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Text_Field_Attr:
15 17 none, //Nothing special, normal behaviour
16 18 rich_editor //Use richt text editor for that area
... ...
view/types/hk_display.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -10,13 +10,15 @@ transmit system/muscle.anubis
10 10 transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13   -transmit hayamiki_lib/view/types/hk_edit_view.anubis
14   -transmit hayamiki_lib/view/types/hk_list_view.anubis
  13 +transmit hayamiki_lib/view/types/hk_editor.anubis
  14 +transmit hayamiki_lib/view/types/hk_viewer.anubis
  15 +
  16 +
15 17  
16 18 public type HK_Display:
17 19 hk_display(
18   - List(HK_List_View) list_views,
19   - List(HK_Edit_View) list_edits
  20 + List(HK_Viewer) l_viewer,
  21 + List(HK_Editor) l_editor
20 22 )
21 23 .
22 24  
... ... @@ -34,12 +36,12 @@ public define Message
34 36 if _hk_display is
35 37 {
36 38 //Alternative hk_display
37   - hk_display(__list_views, __list_edits) then
  39 + hk_display(__l_viewer, __l_editor) then
38 40 forget(add_string(_hk_display_message, "__TYPE_ALT__", "hk_display"));
39   - // [type = List(HK_List_View)] hk_display.list_views
40   - map_forget((HK_List_View _list_views) |-> add_message(_hk_display_message, "list_views", to_Message(_list_views)), __list_views);
41   - // [type = List(HK_Edit_View)] hk_display.list_edits
42   - map_forget((HK_Edit_View _list_edits) |-> add_message(_hk_display_message, "list_edits", to_Message(_list_edits)), __list_edits),
  41 + // [type = List(HK_Viewer)] hk_display.l_viewer
  42 + map_forget((HK_Viewer _l_viewer) |-> add_message(_hk_display_message, "l_viewer", to_Message(_l_viewer)), __l_viewer);
  43 + // [type = List(HK_Editor)] hk_display.l_editor
  44 + map_forget((HK_Editor _l_editor) |-> add_message(_hk_display_message, "l_editor", to_Message(_l_editor)), __l_editor),
43 45  
44 46 };
45 47 _hk_display_message
... ... @@ -55,14 +57,14 @@ public define Maybe(HK_Display)
55 57 if __type__ = "HK_Display" then
56 58 //Alternative hk_display
57 59 if __type_alt__ = "hk_display" then //Alternative hk_display
58   - // [type = List(HK_List_View)] hk_display.list_views
59   - with mb__list_views_ = map_escape(( Message msg ) |-> (Maybe(HK_List_View)) from_Message(msg), find_messages(_hk_display_message, "list_views")),
60   - if mb__list_views_ is {failure then failure, success(_list_views_) then
61   - // [type = List(HK_Edit_View)] hk_display.list_edits
62   - with mb__list_edits_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View)) from_Message(msg), find_messages(_hk_display_message, "list_edits")),
63   - if mb__list_edits_ is {failure then failure, success(_list_edits_) then
  60 + // [type = List(HK_Viewer)] hk_display.l_viewer
  61 + with mb__l_viewer_ = map_escape(( Message msg ) |-> (Maybe(HK_Viewer)) from_Message(msg), find_messages(_hk_display_message, "l_viewer")),
  62 + if mb__l_viewer_ is {failure then failure, success(_l_viewer_) then
  63 + // [type = List(HK_Editor)] hk_display.l_editor
  64 + with mb__l_editor_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor)) from_Message(msg), find_messages(_hk_display_message, "l_editor")),
  65 + if mb__l_editor_ is {failure then failure, success(_l_editor_) then
64 66  
65   - success(hk_display(_list_views_, _list_edits_))
  67 + success(hk_display(_l_viewer_, _l_editor_))
66 68 }}
67 69 else
68 70 failure //No valid Alternative found !
... ...
view/types/hk_edit_view.anubis deleted
1   -/*
2   - * Created by 伝作 (Densaku).
3   - * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
6   - *
7   - */
8   -
9   -transmit system/muscle.anubis
10   -transmit system/convert.anubis
11   -transmit tools/basis.anubis
12   -
13   -transmit hayamiki_lib/view/types/hk_edit_view_table.anubis
14   -transmit hayamiki_lib/view/types/hk_fk_view.anubis
15   -
16   -public type HK_Edit_View:
17   - edit_view_all,
18   - edit_view_list_form(
19   - String view_name,
20   - List(String) columns,
21   - List(HK_FK_View) fk_view
22   - ),
23   - edit_view_table_form(
24   - String view_name,
25   - HK_Edit_View_Table form_table
26   - )
27   -.
28   -
29   - HK_Edit_View message format
30   - ===========================
31   -
32   -
33   -public define Message
34   - to_Message
35   - (
36   - HK_Edit_View _hk_edit_view
37   - )=
38   - with _hk_edit_view_message = message((Word32)0), //
39   - forget(add_string(_hk_edit_view_message, "__TYPE__", "HK_Edit_View"));
40   - if _hk_edit_view is
41   - {
42   - //Alternative edit_view_all (NO TYPE)
43   - edit_view_all then
44   - forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_all")),
45   -
46   - //Alternative edit_view_list_form
47   - edit_view_list_form(_view_name, __columns, __fk_view) then
48   - forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_list_form"));
49   - // [type = String] edit_view_list_form.view_name
50   - forget(add_string(_hk_edit_view_message, "view_name", _view_name));
51   - // [type = List(String)] edit_view_list_form.columns
52   - map_forget((String _columns) |-> add_string(_hk_edit_view_message, "columns", _columns), __columns);
53   - // [type = List(HK_FK_View)] edit_view_list_form.fk_view
54   - map_forget((HK_FK_View _fk_view) |-> add_message(_hk_edit_view_message, "fk_view", to_Message(_fk_view)), __fk_view),
55   -
56   - //Alternative edit_view_table_form
57   - edit_view_table_form(_view_name, _form_table) then
58   - forget(add_string(_hk_edit_view_message, "__TYPE_ALT__", "edit_view_table_form"));
59   - // [type = String] edit_view_table_form.view_name
60   - forget(add_string(_hk_edit_view_message, "view_name", _view_name));
61   - // [type = HK_Edit_View_Table] edit_view_table_form.form_table
62   - forget(add_message(_hk_edit_view_message, "form_table", to_Message(_form_table))),
63   -
64   - };
65   - _hk_edit_view_message
66   -.
67   -
68   -public define Maybe(HK_Edit_View)
69   - from_Message
70   - (
71   - Message _hk_edit_view_message
72   - )=
73   - if find_string(_hk_edit_view_message, "__TYPE__") is {failure then failure, success(__type__) then
74   - if find_string(_hk_edit_view_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
75   - if __type__ = "HK_Edit_View" then
76   - //Alternative edit_view_all (NO TYPE)
77   - if __type_alt__ = "edit_view_all" then
78   - success(edit_view_all)
79   - else //Alternative edit_view_list_form
80   - if __type_alt__ = "edit_view_list_form" then //Alternative edit_view_list_form
81   - // [type = String] edit_view_list_form.view_name
82   - if find_string(_hk_edit_view_message, "view_name") is {failure then failure, success(_view_name_) then
83   - // [type = List(String)] edit_view_list_form.columns
84   - with _columns_ = find_string_list(_hk_edit_view_message, "columns"),
85   - // [type = List(HK_FK_View)] edit_view_list_form.fk_view
86   - with mb__fk_view_ = map_escape(( Message msg ) |-> (Maybe(HK_FK_View)) from_Message(msg), find_messages(_hk_edit_view_message, "fk_view")),
87   - if mb__fk_view_ is {failure then failure, success(_fk_view_) then
88   -
89   - success(edit_view_list_form(_view_name_, _columns_, _fk_view_))
90   - }}
91   - else //Alternative edit_view_table_form
92   - if __type_alt__ = "edit_view_table_form" then //Alternative edit_view_table_form
93   - // [type = String] edit_view_table_form.view_name
94   - if find_string(_hk_edit_view_message, "view_name") is {failure then failure, success(_view_name_) then
95   - // [type = HK_Edit_View_Table] edit_view_table_form.form_table
96   - if find_message(_hk_edit_view_message, "form_table") is {failure then failure, success(_form_table__msg) then
97   - if (Maybe(HK_Edit_View_Table))from_Message(_form_table__msg) is {failure then failure, success(_form_table_) then
98   -
99   - success(edit_view_table_form(_view_name_, _form_table_))
100   - }}}
101   - else
102   - failure //No valid Alternative found !
103   - else
104   - failure //Type not found in message !
105   - }}
106   -.
107   -
view/types/hk_edit_view_table.anubis deleted
1   -/*
2   - * Created by 伝作 (Densaku).
3   - * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
6   - *
7   - */
8   -
9   -transmit system/muscle.anubis
10   -transmit system/convert.anubis
11   -transmit tools/basis.anubis
12   -
13   -transmit hayamiki_lib/view/types/hk_edit_view_table_line.anubis
14   -
15   -public type HK_Edit_View_Table:
16   - table(
17   - List(HK_Edit_View_Table_Line) lines
18   - )
19   -.
20   -
21   - HK_Edit_View_Table message format
22   - =================================
23   -
24   -
25   -public define Message
26   - to_Message
27   - (
28   - HK_Edit_View_Table _hk_edit_view_table
29   - )=
30   - with _hk_edit_view_table_message = message((Word32)0), //
31   - forget(add_string(_hk_edit_view_table_message, "__TYPE__", "HK_Edit_View_Table"));
32   - if _hk_edit_view_table is
33   - {
34   - //Alternative table
35   - table(__lines) then
36   - forget(add_string(_hk_edit_view_table_message, "__TYPE_ALT__", "table"));
37   - // [type = List(HK_Edit_View_Table_Line)] table.lines
38   - map_forget((HK_Edit_View_Table_Line _lines) |-> add_message(_hk_edit_view_table_message, "lines", to_Message(_lines)), __lines),
39   -
40   - };
41   - _hk_edit_view_table_message
42   -.
43   -
44   -public define Maybe(HK_Edit_View_Table)
45   - from_Message
46   - (
47   - Message _hk_edit_view_table_message
48   - )=
49   - if find_string(_hk_edit_view_table_message, "__TYPE__") is {failure then failure, success(__type__) then
50   - if find_string(_hk_edit_view_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
51   - if __type__ = "HK_Edit_View_Table" then
52   - //Alternative table
53   - if __type_alt__ = "table" then //Alternative table
54   - // [type = List(HK_Edit_View_Table_Line)] table.lines
55   - with mb__lines_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Line)) from_Message(msg), find_messages(_hk_edit_view_table_message, "lines")),
56   - if mb__lines_ is {failure then failure, success(_lines_) then
57   -
58   - success(table(_lines_))
59   - }
60   - else
61   - failure //No valid Alternative found !
62   - else
63   - failure //Type not found in message !
64   - }}
65   -.
66   -
view/types/hk_edit_view_table_cell.anubis deleted
1   -/*
2   - * Created by 伝作 (Densaku).
3   - * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
6   - *
7   - */
8   -
9   -transmit system/muscle.anubis
10   -transmit system/convert.anubis
11   -transmit tools/basis.anubis
12   -
13   -transmit hayamiki_lib/view/types/hk_edit_view_table_cell.anubis
14   -
15   -public type HK_Edit_View_Table_Cell:
16   - empty,
17   - column(
18   - String column_name
19   - ),
20   - label(
21   - String label
22   - ),
23   - cell(
24   - List(HK_Edit_View_Table_Cell) cell
25   - )
26   -.
27   -
28   - HK_Edit_View_Table_Cell message format
29   - ======================================
30   -
31   -
32   -public define Message
33   - to_Message
34   - (
35   - HK_Edit_View_Table_Cell _hk_edit_view_table_cell
36   - )=
37   - with _hk_edit_view_table_cell_message = message((Word32)0), //
38   - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE__", "HK_Edit_View_Table_Cell"));
39   - if _hk_edit_view_table_cell is
40   - {
41   - //Alternative empty (NO TYPE)
42   - empty then
43   - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "empty")),
44   -
45   - //Alternative column
46   - column(_column_name) then
47   - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "column"));
48   - // [type = String] column.column_name
49   - forget(add_string(_hk_edit_view_table_cell_message, "column_name", _column_name)),
50   -
51   - //Alternative label
52   - label(_label) then
53   - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "label"));
54   - // [type = String] label.label
55   - forget(add_string(_hk_edit_view_table_cell_message, "label", _label)),
56   -
57   - //Alternative cell
58   - cell(__cell) then
59   - forget(add_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__", "cell"));
60   - // [type = List(HK_Edit_View_Table_Cell)] cell.cell
61   - map_forget((HK_Edit_View_Table_Cell _cell) |-> add_message(_hk_edit_view_table_cell_message, "cell", to_Message(_cell)), __cell),
62   -
63   - };
64   - _hk_edit_view_table_cell_message
65   -.
66   -
67   -public define Maybe(HK_Edit_View_Table_Cell)
68   - from_Message
69   - (
70   - Message _hk_edit_view_table_cell_message
71   - )=
72   - if find_string(_hk_edit_view_table_cell_message, "__TYPE__") is {failure then failure, success(__type__) then
73   - if find_string(_hk_edit_view_table_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
74   - if __type__ = "HK_Edit_View_Table_Cell" then
75   - //Alternative empty (NO TYPE)
76   - if __type_alt__ = "empty" then
77   - success(empty)
78   - else //Alternative column
79   - if __type_alt__ = "column" then //Alternative column
80   - // [type = String] column.column_name
81   - if find_string(_hk_edit_view_table_cell_message, "column_name") is {failure then failure, success(_column_name_) then
82   -
83   - success(column(_column_name_))
84   - }
85   - else //Alternative label
86   - if __type_alt__ = "label" then //Alternative label
87   - // [type = String] label.label
88   - if find_string(_hk_edit_view_table_cell_message, "label") is {failure then failure, success(_label_) then
89   -
90   - success(label(_label_))
91   - }
92   - else //Alternative cell
93   - if __type_alt__ = "cell" then //Alternative cell
94   - // [type = List(HK_Edit_View_Table_Cell)] cell.cell
95   - with mb__cell_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Cell)) from_Message(msg), find_messages(_hk_edit_view_table_cell_message, "cell")),
96   - if mb__cell_ is {failure then failure, success(_cell_) then
97   -
98   - success(cell(_cell_))
99   - }
100   - else
101   - failure //No valid Alternative found !
102   - else
103   - failure //Type not found in message !
104   - }}
105   -.
106   -
view/types/hk_edit_view_table_line.anubis deleted
1   -/*
2   - * Created by 伝作 (Densaku).
3   - * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
6   - *
7   - */
8   -
9   -transmit system/muscle.anubis
10   -transmit system/convert.anubis
11   -transmit tools/basis.anubis
12   -
13   -transmit hayamiki_lib/view/types/hk_edit_view_table_cell.anubis
14   -
15   -public type HK_Edit_View_Table_Line:
16   - line(
17   - List(HK_Edit_View_Table_Cell) cells
18   - )
19   -.
20   -
21   - HK_Edit_View_Table_Line message format
22   - ======================================
23   -
24   -
25   -public define Message
26   - to_Message
27   - (
28   - HK_Edit_View_Table_Line _hk_edit_view_table_line
29   - )=
30   - with _hk_edit_view_table_line_message = message((Word32)0), //
31   - forget(add_string(_hk_edit_view_table_line_message, "__TYPE__", "HK_Edit_View_Table_Line"));
32   - if _hk_edit_view_table_line is
33   - {
34   - //Alternative line
35   - line(__cells) then
36   - forget(add_string(_hk_edit_view_table_line_message, "__TYPE_ALT__", "line"));
37   - // [type = List(HK_Edit_View_Table_Cell)] line.cells
38   - map_forget((HK_Edit_View_Table_Cell _cells) |-> add_message(_hk_edit_view_table_line_message, "cells", to_Message(_cells)), __cells),
39   -
40   - };
41   - _hk_edit_view_table_line_message
42   -.
43   -
44   -public define Maybe(HK_Edit_View_Table_Line)
45   - from_Message
46   - (
47   - Message _hk_edit_view_table_line_message
48   - )=
49   - if find_string(_hk_edit_view_table_line_message, "__TYPE__") is {failure then failure, success(__type__) then
50   - if find_string(_hk_edit_view_table_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
51   - if __type__ = "HK_Edit_View_Table_Line" then
52   - //Alternative line
53   - if __type_alt__ = "line" then //Alternative line
54   - // [type = List(HK_Edit_View_Table_Cell)] line.cells
55   - with mb__cells_ = map_escape(( Message msg ) |-> (Maybe(HK_Edit_View_Table_Cell)) from_Message(msg), find_messages(_hk_edit_view_table_line_message, "cells")),
56   - if mb__cells_ is {failure then failure, success(_cells_) then
57   -
58   - success(line(_cells_))
59   - }
60   - else
61   - failure //No valid Alternative found !
62   - else
63   - failure //Type not found in message !
64   - }}
65   -.
66   -
view/types/hk_editor.anubis 0 → 100644
  1 +/*
  2 + * Created by 伝作 (Densaku).
  3 + * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
  6 + *
  7 + */
  8 +
  9 +transmit system/muscle.anubis
  10 +transmit system/convert.anubis
  11 +transmit tools/basis.anubis
  12 +
  13 +transmit hayamiki_lib/view/types/hk_editor_table.anubis
  14 +transmit hayamiki_lib/view/types/hk_fk_view.anubis
  15 +
  16 +
  17 +
  18 +public type HK_Editor:
  19 + edit_view_all,
  20 + edit_view_list_form(
  21 + String view_name,
  22 + List(String) columns,
  23 + List(HK_FK_View) fk_view
  24 + ),
  25 + form_table(
  26 + String view_name,
  27 + HK_Editor_Table form_table
  28 + )
  29 +.
  30 +
  31 + HK_Editor message format
  32 + ========================
  33 +
  34 +
  35 +public define Message
  36 + to_Message
  37 + (
  38 + HK_Editor _hk_editor
  39 + )=
  40 + with _hk_editor_message = message((Word32)0), //
  41 + forget(add_string(_hk_editor_message, "__TYPE__", "HK_Editor"));
  42 + if _hk_editor is
  43 + {
  44 + //Alternative edit_view_all (NO TYPE)
  45 + edit_view_all then
  46 + forget(add_string(_hk_editor_message, "__TYPE_ALT__", "edit_view_all")),
  47 +
  48 + //Alternative edit_view_list_form
  49 + edit_view_list_form(_view_name, __columns, __fk_view) then
  50 + forget(add_string(_hk_editor_message, "__TYPE_ALT__", "edit_view_list_form"));
  51 + // [type = String] edit_view_list_form.view_name
  52 + forget(add_string(_hk_editor_message, "view_name", _view_name));
  53 + // [type = List(String)] edit_view_list_form.columns
  54 + map_forget((String _columns) |-> add_string(_hk_editor_message, "columns", _columns), __columns);
  55 + // [type = List(HK_FK_View)] edit_view_list_form.fk_view
  56 + map_forget((HK_FK_View _fk_view) |-> add_message(_hk_editor_message, "fk_view", to_Message(_fk_view)), __fk_view),
  57 +
  58 + //Alternative form_table
  59 + form_table(_view_name, _form_table) then
  60 + forget(add_string(_hk_editor_message, "__TYPE_ALT__", "form_table"));
  61 + // [type = String] form_table.view_name
  62 + forget(add_string(_hk_editor_message, "view_name", _view_name));
  63 + // [type = HK_Editor_Table] form_table.form_table
  64 + forget(add_message(_hk_editor_message, "form_table", to_Message(_form_table))),
  65 +
  66 + };
  67 + _hk_editor_message
  68 +.
  69 +
  70 +public define Maybe(HK_Editor)
  71 + from_Message
  72 + (
  73 + Message _hk_editor_message
  74 + )=
  75 + if find_string(_hk_editor_message, "__TYPE__") is {failure then failure, success(__type__) then
  76 + if find_string(_hk_editor_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
  77 + if __type__ = "HK_Editor" then
  78 + //Alternative edit_view_all (NO TYPE)
  79 + if __type_alt__ = "edit_view_all" then
  80 + success(edit_view_all)
  81 + else //Alternative edit_view_list_form
  82 + if __type_alt__ = "edit_view_list_form" then //Alternative edit_view_list_form
  83 + // [type = String] edit_view_list_form.view_name
  84 + if find_string(_hk_editor_message, "view_name") is {failure then failure, success(_view_name_) then
  85 + // [type = List(String)] edit_view_list_form.columns
  86 + with _columns_ = find_string_list(_hk_editor_message, "columns"),
  87 + // [type = List(HK_FK_View)] edit_view_list_form.fk_view
  88 + with mb__fk_view_ = map_escape(( Message msg ) |-> (Maybe(HK_FK_View)) from_Message(msg), find_messages(_hk_editor_message, "fk_view")),
  89 + if mb__fk_view_ is {failure then failure, success(_fk_view_) then
  90 +
  91 + success(edit_view_list_form(_view_name_, _columns_, _fk_view_))
  92 + }}
  93 + else //Alternative form_table
  94 + if __type_alt__ = "form_table" then //Alternative form_table
  95 + // [type = String] form_table.view_name
  96 + if find_string(_hk_editor_message, "view_name") is {failure then failure, success(_view_name_) then
  97 + // [type = HK_Editor_Table] form_table.form_table
  98 + if find_message(_hk_editor_message, "form_table") is {failure then failure, success(_form_table__msg) then
  99 + if (Maybe(HK_Editor_Table))from_Message(_form_table__msg) is {failure then failure, success(_form_table_) then
  100 +
  101 + success(form_table(_view_name_, _form_table_))
  102 + }}}
  103 + else
  104 + failure //No valid Alternative found !
  105 + else
  106 + failure //Type not found in message !
  107 + }}
  108 +.
  109 +
... ...
view/types/hk_editor_table.anubis 0 → 100644
  1 +/*
  2 + * Created by 伝作 (Densaku).
  3 + * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
  6 + *
  7 + */
  8 +
  9 +transmit system/muscle.anubis
  10 +transmit system/convert.anubis
  11 +transmit tools/basis.anubis
  12 +
  13 +
  14 +public type HK_Editor_Table_Line:...
  15 +
  16 +public type HK_Editor_Table_Cell:
  17 + empty,
  18 + column(
  19 + String column_name
  20 + ),
  21 + label(
  22 + String label
  23 + ),
  24 + table(
  25 + List(HK_Editor_Table_Line) lines
  26 + )
  27 +.
  28 +
  29 +
  30 +public type HK_Editor_Table_Line:
  31 + line(
  32 + List(HK_Editor_Table_Cell) cells
  33 + )
  34 +.
  35 +
  36 +
  37 +public type HK_Editor_Table:
  38 + table(
  39 + List(HK_Editor_Table_Line) lines
  40 + )
  41 +.
  42 +
  43 + HK_Editor_Table_Cell message format
  44 + ===================================
  45 +
  46 +
  47 +public define Message
  48 + to_Message
  49 + (
  50 + HK_Editor_Table_Cell _hk_editor_table_cell
  51 + )=
  52 + with _hk_editor_table_cell_message = message((Word32)0), //
  53 + forget(add_string(_hk_editor_table_cell_message, "__TYPE__", "HK_Editor_Table_Cell"));
  54 + if _hk_editor_table_cell is
  55 + {
  56 + //Alternative empty (NO TYPE)
  57 + empty then
  58 + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "empty")),
  59 +
  60 + //Alternative column
  61 + column(_column_name) then
  62 + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "column"));
  63 + // [type = String] column.column_name
  64 + forget(add_string(_hk_editor_table_cell_message, "column_name", _column_name)),
  65 +
  66 + //Alternative label
  67 + label(_label) then
  68 + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "label"));
  69 + // [type = String] label.label
  70 + forget(add_string(_hk_editor_table_cell_message, "label", _label)),
  71 +
  72 + //Alternative table
  73 + table(__lines) then
  74 + forget(add_string(_hk_editor_table_cell_message, "__TYPE_ALT__", "table"));
  75 + // [type = List(HK_Editor_Table_Line)] table.lines
  76 + map_forget((HK_Editor_Table_Line _lines) |-> add_message(_hk_editor_table_cell_message, "lines", to_Message(_lines)), __lines),
  77 +
  78 + };
  79 + _hk_editor_table_cell_message
  80 +.
  81 +
  82 +public define Maybe(HK_Editor_Table_Cell)
  83 + from_Message
  84 + (
  85 + Message _hk_editor_table_cell_message
  86 + )=
  87 + if find_string(_hk_editor_table_cell_message, "__TYPE__") is {failure then failure, success(__type__) then
  88 + if find_string(_hk_editor_table_cell_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
  89 + if __type__ = "HK_Editor_Table_Cell" then
  90 + //Alternative empty (NO TYPE)
  91 + if __type_alt__ = "empty" then
  92 + success(empty)
  93 + else //Alternative column
  94 + if __type_alt__ = "column" then //Alternative column
  95 + // [type = String] column.column_name
  96 + if find_string(_hk_editor_table_cell_message, "column_name") is {failure then failure, success(_column_name_) then
  97 +
  98 + success(column(_column_name_))
  99 + }
  100 + else //Alternative label
  101 + if __type_alt__ = "label" then //Alternative label
  102 + // [type = String] label.label
  103 + if find_string(_hk_editor_table_cell_message, "label") is {failure then failure, success(_label_) then
  104 +
  105 + success(label(_label_))
  106 + }
  107 + else //Alternative table
  108 + if __type_alt__ = "table" then //Alternative table
  109 + // [type = List(HK_Editor_Table_Line)] table.lines
  110 + with mb__lines_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor_Table_Line)) from_Message(msg), find_messages(_hk_editor_table_cell_message, "lines")),
  111 + if mb__lines_ is {failure then failure, success(_lines_) then
  112 +
  113 + success(table(_lines_))
  114 + }
  115 + else
  116 + failure //No valid Alternative found !
  117 + else
  118 + failure //Type not found in message !
  119 + }}
  120 +.
  121 +
  122 +
  123 +
  124 +
  125 + HK_Editor_Table_Line message format
  126 + ===================================
  127 +
  128 +
  129 +public define Message
  130 + to_Message
  131 + (
  132 + HK_Editor_Table_Line _hk_editor_table_line
  133 + )=
  134 + with _hk_editor_table_line_message = message((Word32)0), //
  135 + forget(add_string(_hk_editor_table_line_message, "__TYPE__", "HK_Editor_Table_Line"));
  136 + if _hk_editor_table_line is
  137 + {
  138 + //Alternative line
  139 + line(__cells) then
  140 + forget(add_string(_hk_editor_table_line_message, "__TYPE_ALT__", "line"));
  141 + // [type = List(HK_Editor_Table_Cell)] line.cells
  142 + map_forget((HK_Editor_Table_Cell _cells) |-> add_message(_hk_editor_table_line_message, "cells", to_Message(_cells)), __cells),
  143 +
  144 + };
  145 + _hk_editor_table_line_message
  146 +.
  147 +
  148 +public define Maybe(HK_Editor_Table_Line)
  149 + from_Message
  150 + (
  151 + Message _hk_editor_table_line_message
  152 + )=
  153 + if find_string(_hk_editor_table_line_message, "__TYPE__") is {failure then failure, success(__type__) then
  154 + if find_string(_hk_editor_table_line_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
  155 + if __type__ = "HK_Editor_Table_Line" then
  156 + //Alternative line
  157 + if __type_alt__ = "line" then //Alternative line
  158 + // [type = List(HK_Editor_Table_Cell)] line.cells
  159 + with mb__cells_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor_Table_Cell)) from_Message(msg), find_messages(_hk_editor_table_line_message, "cells")),
  160 + if mb__cells_ is {failure then failure, success(_cells_) then
  161 +
  162 + success(line(_cells_))
  163 + }
  164 + else
  165 + failure //No valid Alternative found !
  166 + else
  167 + failure //Type not found in message !
  168 + }}
  169 +.
  170 +
  171 +
  172 +
  173 +
  174 + HK_Editor_Table message format
  175 + ==============================
  176 +
  177 +
  178 +public define Message
  179 + to_Message
  180 + (
  181 + HK_Editor_Table _hk_editor_table
  182 + )=
  183 + with _hk_editor_table_message = message((Word32)0), //
  184 + forget(add_string(_hk_editor_table_message, "__TYPE__", "HK_Editor_Table"));
  185 + if _hk_editor_table is
  186 + {
  187 + //Alternative table
  188 + table(__lines) then
  189 + forget(add_string(_hk_editor_table_message, "__TYPE_ALT__", "table"));
  190 + // [type = List(HK_Editor_Table_Line)] table.lines
  191 + map_forget((HK_Editor_Table_Line _lines) |-> add_message(_hk_editor_table_message, "lines", to_Message(_lines)), __lines),
  192 +
  193 + };
  194 + _hk_editor_table_message
  195 +.
  196 +
  197 +public define Maybe(HK_Editor_Table)
  198 + from_Message
  199 + (
  200 + Message _hk_editor_table_message
  201 + )=
  202 + if find_string(_hk_editor_table_message, "__TYPE__") is {failure then failure, success(__type__) then
  203 + if find_string(_hk_editor_table_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
  204 + if __type__ = "HK_Editor_Table" then
  205 + //Alternative table
  206 + if __type_alt__ = "table" then //Alternative table
  207 + // [type = List(HK_Editor_Table_Line)] table.lines
  208 + with mb__lines_ = map_escape(( Message msg ) |-> (Maybe(HK_Editor_Table_Line)) from_Message(msg), find_messages(_hk_editor_table_message, "lines")),
  209 + if mb__lines_ is {failure then failure, success(_lines_) then
  210 +
  211 + success(table(_lines_))
  212 + }
  213 + else
  214 + failure //No valid Alternative found !
  215 + else
  216 + failure //Type not found in message !
  217 + }}
  218 +.
  219 +
... ...
view/types/hk_fk_view.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,6 +12,8 @@ transmit tools/basis.anubis
12 12  
13 13 transmit hayamiki_lib/model/types/hk_app_name.anubis
14 14  
  15 +
  16 +
15 17 public type HK_FK_View:
16 18 fk_view(
17 19 HK_App_Name app_name,
... ...
view/types/hk_form.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -14,6 +14,8 @@ transmit hayamiki_lib/view/types/hk_form_table.anubis
14 14 transmit hayamiki_lib/view/types/hk_form_tab.anubis
15 15 transmit hayamiki_lib/view/types/hk_form_entry.anubis
16 16  
  17 +
  18 +
17 19 public type HK_Form:
18 20 hk_form_in_list(
19 21 String table_name, //database table name which belonging this form
... ...
view/types/hk_form_tab.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Form_Tab:
15 17 hk_form_tab(
16 18 String fk_table_name,
... ...
view/types/hk_form_table.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -13,6 +13,8 @@ transmit tools/basis.anubis
13 13 transmit hayamiki_lib/view/types/hk_form_table_line.anubis
14 14 transmit hayamiki_lib/view/types/hk_form_table_attribute.anubis
15 15  
  16 +
  17 +
16 18 public type HK_Form_Table:
17 19 hk_form_table(
18 20 List(HK_Form_Table_Attribute) table_attr,
... ...
view/types/hk_form_table_attribute.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -11,6 +11,8 @@ transmit system/convert.anubis
11 11 transmit tools/basis.anubis
12 12  
13 13  
  14 +
  15 +
14 16 public type HK_Form_Table_Attribute:
15 17 hidden(
16 18 String name,
... ...
view/types/hk_form_table_cell.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,6 +12,8 @@ transmit tools/basis.anubis
12 12  
13 13 transmit hayamiki_lib/view/types/hk_form_entry.anubis
14 14  
  15 +
  16 +
15 17 public type HK_Form_Table_Cell:
16 18 hk_form_table_cell(
17 19 HK_Form_Entry form_entry
... ...
view/types/hk_form_table_line.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,6 +12,8 @@ transmit tools/basis.anubis
12 12  
13 13 transmit hayamiki_lib/view/types/hk_form_table_cell.anubis
14 14  
  15 +
  16 +
15 17 public type HK_Form_Table_Line:
16 18 hk_form_table_line(
17 19 List(HK_Form_Table_Cell) form_table_cells
... ...
view/types/hk_list_view.anubis renamed to view/types/hk_viewer.anubis
1 1 /*
2 2 * Created by 伝作 (Densaku).
3 3 * Types & Messages generator written by フランスのトトロ aka (David RENÉ)
4   - * Date: 2017-04-10
5   - * Time: 09:51:00
  4 + * Date: 2017-04-12
  5 + * Time: 22:22:45
6 6 *
7 7 */
8 8  
... ... @@ -12,7 +12,9 @@ transmit tools/basis.anubis
12 12  
13 13 transmit calexium_lib/web/types/web_action_name.anubis
14 14  
15   -public type HK_List_View:
  15 +
  16 +
  17 +public type HK_Viewer:
16 18 list_view_all,
17 19 list_view(
18 20 String view_name,
... ... @@ -21,56 +23,56 @@ public type HK_List_View:
21 23 )
22 24 .
23 25  
24   - HK_List_View message format
25   - ===========================
  26 + HK_Viewer message format
  27 + ========================
26 28  
27 29  
28 30 public define Message
29 31 to_Message
30 32 (
31   - HK_List_View _hk_list_view
  33 + HK_Viewer _hk_viewer
32 34 )=
33   - with _hk_list_view_message = message((Word32)0), //
34   - forget(add_string(_hk_list_view_message, "__TYPE__", "HK_List_View"));
35   - if _hk_list_view is
  35 + with _hk_viewer_message = message((Word32)0), //
  36 + forget(add_string(_hk_viewer_message, "__TYPE__", "HK_Viewer"));
  37 + if _hk_viewer is
36 38 {
37 39 //Alternative list_view_all (NO TYPE)
38 40 list_view_all then
39   - forget(add_string(_hk_list_view_message, "__TYPE_ALT__", "list_view_all")),
  41 + forget(add_string(_hk_viewer_message, "__TYPE_ALT__", "list_view_all")),
40 42  
41 43 //Alternative list_view
42 44 list_view(_view_name, __columns, _link_id_action) then
43   - forget(add_string(_hk_list_view_message, "__TYPE_ALT__", "list_view"));
  45 + forget(add_string(_hk_viewer_message, "__TYPE_ALT__", "list_view"));
44 46 // [type = String] list_view.view_name
45   - forget(add_string(_hk_list_view_message, "view_name", _view_name));
  47 + forget(add_string(_hk_viewer_message, "view_name", _view_name));
46 48 // [type = List(String)] list_view.columns
47   - map_forget((String _columns) |-> add_string(_hk_list_view_message, "columns", _columns), __columns);
  49 + map_forget((String _columns) |-> add_string(_hk_viewer_message, "columns", _columns), __columns);
48 50 // [type = WEB_Action_Name] list_view.link_id_action
49   - forget(add_message(_hk_list_view_message, "link_id_action", to_Message(_link_id_action))),
  51 + forget(add_message(_hk_viewer_message, "link_id_action", to_Message(_link_id_action))),
50 52  
51 53 };
52   - _hk_list_view_message
  54 + _hk_viewer_message
53 55 .
54 56  
55   -public define Maybe(HK_List_View)
  57 +public define Maybe(HK_Viewer)
56 58 from_Message
57 59 (
58   - Message _hk_list_view_message
  60 + Message _hk_viewer_message
59 61 )=
60   - if find_string(_hk_list_view_message, "__TYPE__") is {failure then failure, success(__type__) then
61   - if find_string(_hk_list_view_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
62   - if __type__ = "HK_List_View" then
  62 + if find_string(_hk_viewer_message, "__TYPE__") is {failure then failure, success(__type__) then
  63 + if find_string(_hk_viewer_message, "__TYPE_ALT__") is {failure then failure, success(__type_alt__) then
  64 + if __type__ = "HK_Viewer" then
63 65 //Alternative list_view_all (NO TYPE)
64 66 if __type_alt__ = "list_view_all" then
65 67 success(list_view_all)
66 68 else //Alternative list_view
67 69 if __type_alt__ = "list_view" then //Alternative list_view
68 70 // [type = String] list_view.view_name
69   - if find_string(_hk_list_view_message, "view_name") is {failure then failure, success(_view_name_) then
  71 + if find_string(_hk_viewer_message, "view_name") is {failure then failure, success(_view_name_) then
70 72 // [type = List(String)] list_view.columns
71   - with _columns_ = find_string_list(_hk_list_view_message, "columns"),
  73 + with _columns_ = find_string_list(_hk_viewer_message, "columns"),
72 74 // [type = WEB_Action_Name] list_view.link_id_action
73   - if find_message(_hk_list_view_message, "link_id_action") is {failure then failure, success(_link_id_action__msg) then
  75 + if find_message(_hk_viewer_message, "link_id_action") is {failure then failure, success(_link_id_action__msg) then
74 76 if (Maybe(WEB_Action_Name))from_Message(_link_id_action__msg) is {failure then failure, success(_link_id_action_) then
75 77  
76 78 success(list_view(_view_name_, _columns_, _link_id_action_))
... ...