[Prev][Next][Index][Thread]

RE: first attempt at Harlequin-Dylan



Maxwell,

> I managed to build a simple "Hello World" from scratch.  The next step was
> to define a class, instantiate it, get and set some values.  I can define
> the class and it compiles without error, but when I try instantiating it, it
> still compiles without error, but I get the run-time error
> 'attempt to make an instance of an incompletely initialized class:
> "<my-object>".'
>
> [...]

Your class definitions look fine. If this error crops up, it's usually 
because an attempt has been made to instantiate a class before the code
implementing the class definition has been run. To avoid the problem, 
just make sure the top-level call to main() (or whatever your entry point 
function is called) is the last form in the last file in your project. The
definition of main() can still be anywhere in relation to the class 
definition, it just shouldn't be called until after the class definition
it relies on has had a chance to do its thing.

> is there a Harlequin-Dylan tutorial?
> i'm also looking for info on console IO, file IO, and interfacing with C
> libraries...

As well as the reference sections, there is some tutorial material in the
online documentation ("Getting Started with Harlequin Dylan" and "Building
Applications Using DUIM") along with example code. The DUIM task-list example
includes code for saving and loading task lists.

I can't remember whether it comes with all editions, but source for the
win32 library interfaces is provided along with examples of a couple of 
simple applications with a UI written in Dylan but against the raw, imported
C API (under Examples\Win32 in the installation).

-- Keith



References: