File: TODO

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (370 lines) | stat: -rw-r--r-- 11,435 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
* make a proc: optionmenuhelp -nohelp 1 --> proc optionmenu {} that will pass
-nohelp 1 to optionmenuhelp

* gui::_openInput: if the two same files are open add some postfix so
that the tabname will indicate the 2nd file is opened

* when deleting some tab from tabset the enumaration/naming of newly
created tabs are not handled correctly.


* the state of a given line cannot be changed (i.e. no enable,
disable, forget, create): only state of input's variable widgets can
be manipulated: would be cool to do that also for line, group,
namelist There is actually groupwidget (also keywordwidget) method,
but this should be generalized.

* there should be a way to specify the maximum length of label (if
longer, it's split into several lines).

* ::guib::keywordObj::setOptions : needs a better validation for widget and validate option values:
	maybe they should be checked in the guib-keyword's procs

* ::guib::moduleObj::_isDisabledKey : this method should return 0 or 1
	and not return -code continue --> don't use this, the caller code is
	less explicit



------------------------------------------------------------------------
-- BELOW TEXT IS OUT-OF-DATE:
------------------------------------------------------------------------

x.) add a silent save method (no complain). Enhance the save
method. Currently, there is too much complains...

x.) there is a mass with _comafy $ident now. Some procs expects
dim(elem), while the other dim,elem. Check that.

x.) optionmenuhelp widget: menubbuton does not disable upon disable
request

x.) make also "widgetcget" GUIB keyword !!!

x.) keyword widgetconfigure bypass the keywordObj cmd() array, hence
    it become out of date. FIX this synchronization.
DONE; check it

x.) make a public method that will assign all _guibVar elements to
cooresponding variables, i.e., set $varName $_guibVar($ident) !!!

x.) should we allow () chars in indentifier. In principle, this is possible,
    by always _comafy the $ident!!!

x.) varvalue should return value, not textvalue, while vartextvalue
should return textvalue (create a vartextvalue routine and adapt the
code accordingly)
(Partly DONE; checking needed)

x.) make some mechanism which will enable/disable the GUIB-widget
decoration (i.e. Line:, Namelist:, ...), and also chenge the themes on
the fly (NOTE: there is already a -noframe option)

x.) CONSIDER: in moduleObj constructor all the variables and array
elements should be defined in order to avoid variable does not exists
errors !!!

x.) check all Varident strings (fastly DONE)

x.) when testing, test also the namelist "undefined variable"
    test also help for different stacking

x.) getIdFromVarident: the names should be getIdFromVariable & getIdFromIdent.


x.) consider the -textvalue -value -default ... options for dimension & tables.

Usually, the dimensions are used for some numeric values, and above
options are not significant. We can simplify and common -textvalue
-value -default for all the dimension elements. Moreover, the
varObjList list stores only the root of dimension variable (i.e. if we
have dim(10), only the root "dim" is stored. Also the routines
valueToTextvalue and textvalueToValue only takes the root-name into
account !!!

The only expection to the common treatment of the above value is for
-default for dimension, which supposes every element can have
different default-value. Here is the code:

#t.k.
# INCOMING: SYNTAX of -default for the dimension:
# -default { elem1-default elem2-default elem3-default ... }
if { ! [info exists $textVar] } {
    set default [lindex $itk_option(-default) $icount]
    if { $default == "" } {
	set default [lindex $itk_option(-default) end]
    }
    $_moduleObj dimset $var $idim $default
}
#/

x.) implement the cardlist:
	
	cardlist -name **** {
	   card ATOMIC_POSITIONS {
	      var { .... }; var { .... } 
              keyword xxxx; var { .... } 
              newline
              line -name "XXXX" {
		....
	      }		
	      line -name "XXXX" {
		....
	      }
           }
	   card BLA_BLA 
           card WHATEVER
			
        }	


0.) I should rename the nomenclature !!!

There are seven types of guib keywords: 
 
	1. objects -- these create the guib::base object 
                      (page, line, namelist, optional, required, group)

        2. items   -- these are: var, dimension, table, keyword, help

	4. events -- event driven keywords (tracevar, widget,
                     groupwidget, widgetconfigure, keywordconfigure)

        5. getsets -- keywords associated with querying and setting input variables
                     (varvalue, varname, varset, dimvalue, dimname, dimset,
	              tablevalue, tablename, tableset)                     

        6. specials -- special keywords (readfilter, writefilter,
                       postprocess, this, loaddata)

        7. decorations -- these are void, and only create some guib widget 
                          decorations (separator)

Thre are two levels of objects:

    moduleObj  --> this is the top object holding the everything 
                   (i.e. module name -title title -script {...})

    keywordObj --> this are keyword objects (constructed by keywords: 
                   page, line, namelist, optional, required, group)

Hence, I should rename the classes as:

guib::moduleObj
guib::keywordObj


2.) construct the "separator" magewidget 



DONE ------------------------------------------------------------------------
DONE ------------------------------------------------------------------------
DONE ------------------------------------------------------------------------
DONE ------------------------------------------------------------------------
DONE ------------------------------------------------------------------------
DONE ------------------------------------------------------------------------
DONE ------------------------------------------------------------------------

2.) the packwidgets should be stack-like, i.e., specifying packwidgets should
    have effect on a current or a higher stacking levels !!! (DONE)

x.) Transformations:

moduleObj.itcl:

variables:
----------
traceVarList 			--> traceVaridentList
traceVarModeScriptList		--> traceVaridentModeScriptList
varWidgetList			--> varidentWidgetList
varObjList			--> varidentObjList

methods:
--------
getWidgetFromVar --> getWidgetFromVarident
_addVarWidget    --> _addVaridentWidget   
_addVarObj       --> _addVaridentObj   
_getObjFromVar   --> _getObjFromVarident
    

keywordObj.itcl:

methods:
--------
getIdFromVar   --> getIdFromVarname
getIdFromIdent --> getIdFromVarident

Status: DONE

x.) fix this in open.itcl:

body ::guib::moduleObj::_openReadNamelistVar {obj} {
    set ind [string first = $readline]
    if { $ind <= 0 } {
	::tku::errorDialog "syntax error in the input file. Error in the namelist"
    }
    scan [lindex [split $readline =] 0] %s result    

    # do we have dimension/table var(1) or var(1,2) ???
    set postfix [lindex [split $result ()] 1]
    if { $postfix != "" } {
	set postfix (${postfix})
    }

    ::tclu::DEBUG _openReadNamelistVar: postfix=$postfix
    # If namelist's variable are case-insensitive, then try to find a
    # registered variable (i.e. from varObjList) that matches in
    # "-nocase" fashion !!!
     
    foreach {varobj} $varObjList {
	#FIX.t.k.: map from varname --> varident !!!
DONE

x.) replace tablename with tableref, sma for dim*
DONE

x.) check for all *Var routines (_addVarWidget, _addVarObj). Check for
everything that contain "Var"
DONE.

x.) check for all "getOptionValue $id variable" and replace with 
"getOptionValue $id ident"
DONE.

x.) in save.itcl:
		    for {set i $start} {$i <= $end} {incr i} {
			# TODO: a validation against the format-string
			set varName  ${dimName}($i)
			#FIX.t.k.
			#...
DONE.

x.) check for tableName and tableIdent !!! (same for dimName ...)
DONE.

x.) update the getIdFromVar (shoudl refer to ident !!!)
DONE

x.) in open.itcl:
		    while { $readline != {} } {
			set varName     [_openReadNamelistVar $childObj]
			set varValue    [_openReadNamelistValue]
			
			# check if varName is defined; if NOT
			# ... TODO: put it under "undefined" variables
			# (only if undefined variables are supported,
			# otherwise report an error in the input)

------------------->	# TODO: map from varName to varIdent !!!
DONE.

x.) check this code (TODO mark):

body ::guib::moduleObj::_getObjFromVar {varIdent} {
    set i [lsearch -glob $varObjList [list $varIdent *]]
    if { $i == -1 } {
	# TODO: check this ... (I guess it is useless)
	# maybe varIdent corresponds to dimension, 
	# i.e. var(x), but we need just "var"	
	set varIdent [lindex [split $varIdent "("] 0]
	set i [lsearch -glob $varObjList [list $varIdent *]]
    }
    
    if { $i == -1 } {
	return {}
    } else {
	return [lindex  [lindex $varObjList $i]  1] 
    }
}
DONE.

x.) now I changed the syntax to

var ident ?options?

Before fully updating the code, make clear when we want the value of
-variable and when ident!!! For example, ident is unique, the value of
-variable is not (in general). For querying the widgets and other info
of a given variable, the "ident" should be used, but when saving the
file, the value of "-variable" should be used instead.

Due to this, we have to adapt varname-varvalue-varset family of
options. First the "varname" should be renamed to "varref" or
"varpointer" or "var****"

Replacements:

varvalue var       --> varvalue ident
varname  var       --> varref   ident
varset   var value --> varset   ident value

Then we should add an additional routine that returns -variable
option-value of a given key on the basis of ident.

Possible syntax could be:

> keyinfo $ident option
or
> getFromIdent $ident pattern
or
> getFromIdent options $ident pattern
> getFromIdent option  $ident option
or
> indentinfo $ident what (<-- THIS WAS SELECTED !!!)

NOTE: this getFromIndent is not a GUIB keyword since it will probably
be only used internally !!!
DONE.


x.) correct this error:
body ::guib::moduleObj::_manageNameObj {key args} {

    ....
		 
    # ERROR:
    # make a unique name of nameObjList
    # TODO: this is not OK, as later the searching by "gropuwidget"
    # will be unsuccessful !!!
    set _i 0
    while { [lsearch $nameObjList $value] > -1 } {
	set value "${value}~[incr _i]"
    }
    lappend nameObjList [list $value $childObj]
    # END:

    ...
}

SOLUTION: solution is the following syntax: namelist ident -name name { ... }
CONSIDER: consider adapting such a syntax for items and objects, i.e., keyword ident -optionn value { ... }
DONE.

1.) check the validation procedures (nonnegint, nonposint, and alike) (DONE)

3.) namelist variables should be case-insensitive, make a settings()
    variable for specifying the case-insensitivity of the input. (DONE)

4.) there was en error reading line {} do to nesting object possibility.
    The reading was fixed, but writing is still erroneous !!! (DONE)
    seems also writing works)

x.) check what is going on with nameObjList
DONE.

x.) in build.itcl: check for -variable and -ident options !!!
DONE.

x.) table: open.save does not work !!!
DONE.

x.) it is not clear for keyword: 
    keyword ident keyword (are we refering to keyword or to ident when enabling/disabling)!!!
DONE.

x.) make a method/proc for changing the default values of options()
DONE.

x.) handle the "!", i.e., comments in namelists
DONE.