> source code of  listing 17-1(the first ecample of Chapter 17) of the book 
> "Programming in Unicon"... dosen't work.  why does this happen?

Sorry about that, the book and code are not yet 100% in sync.  The
method called attrib() in the book is currently named set_attribs(),
the method called show() is currently named show_modal(), and the
syntax for invoking a superclass' initially() method is
object$superclass.methodname() not object.superclass.methodname().

I expect the attrib() method will get renamed per the book, to look and feel
more like the built-in function WAttrib(), but we will change the book to
correspond to reality on the other two points, where the book's proposed
changes don't seem compelling any more.  Anyhow, here is the complete text
of Listing 17-1 as it runs under the current Unicon distribution.

link gui
class TestDialog : _Dialog(b)
  method dialog_event(ev)
    if ev.get_component() === b & ev.get_code() > 0 then
      dispose()
  end
initially
   self$_Dialog.initially()
   add(Label("label=Click to close", "pos=50%,33%", "align=c,c"))
   add(b := TextButton("label=Button", "pos=50%,66%", "align=c,c"))
   set_attribs("size=215,150", "bg=light gray", "font=serif", "resize=on")
   show_modal()
end

procedure main()
   TestDialog()
end


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to