Hi,
I have this functor definition which processes a spreadsheet .csv file.
functor
import
QTk at 'x-oz://system/wp/QTk.ozf'
Open
System
export
GetCell
GetRow
OpenCsv
ParseLine
define
fun {ParseLine L}
{List.toTuple line {String.tokens L &,}}
end
fun {GetCell Record Row Col}
Record.Row.Col
end
fun {GetRow Record Row}
Record.Row
end
proc {OpenCsv File?}
try
FileName={QTk.dialogbox load(title:"Select CSV file"
defaultextension:"csv"
filetypes:q(q("All Files" q("*"))) $)}
in
{New Open.file init(name:FileName flags:[read]) File}
catch
error(_)
then
{System.show 'Error'}
end
end
end
How can I wrap all this in a class definition instead so that FileName
and Record are attributes of a class?
Regards
Mark
--
Mark Richardson
Final year undergraduate
University of Teesside
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users