beginner's questions. 
Author Message
 beginner's questions.

[ q-dylan.1 1K ]
I am a new user to dylan language, and I have never do progrmaming in
Window before. I

Q1: I like lisp language(only used it for short time).  I just have the
feeling that dylan is CLOS(??)

Q2: I know that there are several books on dylan, which one is best
for beginner, and which one is best for advanced user.
Where can I find some kind of tutoring material on the WEB?

Q3: Does Harelquin only have window version? ( In fact, I plan to
program in window.)  

Q4: Java has some advantages about programming once(of course,debug
for every platform.)  Does Dylan has same kind of idea?
Of couse, Java is virtual-machine code not binary code.
Maybe my real question is that how many versions of dylan compiler
for different platforms, and how consistent are they?
Do the support almost the same library modulues etc?

Q5: I have download the free-version of Hareelquin dylan recently.
I am curious how to implement some GUI and what are the classes,
method ... should be used.
  a) In Harelquin project window for PC, there is Go menu, under it there are
           library->, menu->.  How to implement it?
  b) How to implemnet print to printer in the menu-bar, and realy
     print a simple text document to printer? (In window and unix).

Q6: In the window, how does the fileames dynamically go into the
menubar?

Ing-Jye



Thu, 30 Aug 2001 03:00:00 GMT  
 beginner's questions.

Quote:

> Q1: I like lisp language(only used it for short time).  I just have the
> feeling that dylan is CLOS(??)

If you know Common LISP and CLOS, you will find Dylan easy to learn. Many
Common LISP features are also available in Dylan.

Quote:
> Q2: I know that there are several books on dylan, which one is best for
> beginner, and which one is best for advanced user.  Where can I find some
> kind of tutoring material on the WEB?

http://www.gwydiondylan.org/learning.phtml

Quote:
> Q3: Does Harelquin only have window version? ( In fact, I plan to
> program in window.)  

Yes. Harlequin only has a Windows version. However, there is also Gwydion
Dylan, which runs under Linux and Unix.

Quote:
> Q4: Java has some advantages about programming once(of course,debug for
> every platform.)  Does Dylan has same kind of idea?  Of couse, Java is
> virtual-machine code not binary code.  Maybe my real question is that how
> many versions of dylan compiler for different platforms, and how
> consistent are they?  Do the support almost the same library modulues
> etc?

We are working on this. In the future, Harlequin and Gwydion Dylan should
be very compatible. Right now, there are still some problems.

Cheers,
Eric



Thu, 30 Aug 2001 03:00:00 GMT  
 beginner's questions.


    Date: Sun, 14 Mar 1999 07:51:01 -0500

    I am a new user to dylan language, and I have never do progrmaming in
    Window before. I

    Q4: Java has some advantages about programming once(of course,debug
    for every platform.)  

Having written a non-trivial application/applet (appletcation?)
in Java (http://www.thecia.net/users/sigue/ergo/ ) I think I can
say with some confidence that it would have been much easier to
write it in Dylan/DUIM in about 1/2 to 2/3 the space (LOC) and
probably 1/2 the time.  Of course it wouldn't run inside a web
browser then, but for something this size anyone who runs it with
any regularity (or has a slow connection, etc.) is going to want
to download it anyway.  I hope to get a chance to convert it to
Dylan/DUIM soon in order to compare the two implementations.  Not
quite a fair comparison since I will undoubtedly do some things
better the second time around, but hopefully educational.

    Does Dylan has same kind of idea?

When Harlequin Dylan is ported to new platforms, DUIM code should
run without modification on the new platform.  Theoretically.

    Of couse, Java is virtual-machine code not binary code.
    Maybe my real question is that how many versions of dylan compiler
    for different platforms, and how consistent are they?
    Do the support almost the same library modulues etc?

As Eric Kidd mentioned, Gwydion and Harlequin are working
together to unify many of the library interfaces.

    Q5: I have download the free-version of Hareelquin dylan recently.
    I am curious how to implement some GUI and what are the classes,
    method ... should be used.
      a) In Harelquin project window for PC, there is Go menu, under it there are
           library->, menu->.  How to implement it?

I think you're asking how to create cascading menus in DUIM?
Here's an example of two ways to do that.  You can build the
menus "by hand" with make(<menu> ...) or you can use command
tables.  The first example is basically a simplification of some
of the code in the DUIM Test Suite example project that comes
with Harlequin Dylan.  The second creates the exact same UI but
uses command tables instead.

---------8<-------- library.dylan -------8<-------

Module: dylan-user

define library menu-example
  use harlequin-dylan;
  use duim;
  export menu-example;
end library menu-example;

define module menu-example
  use harlequin-dylan;
  use simple-format;
  use duim;
end module menu-example;

---------8<-------- menu-example.dylan -------8<-------

Module: menu-example

// example 1 - making menus "by hand"

define frame <menu-example-frame-1> (<simple-frame>)
  // define a pane called submenu that will be used later.
  // Notice this is only separated out as a pane definition for readability.
  // This whole "make(<menu>, ...)" expression could have been put inline
  // in place of "frame.submenu" below.
  pane submenu (frame)
    make(<menu>,
         label: "Submenu",
         documentation: "The color submenu",
         children: vector(make(<menu-button>,
                               label: "Red",
                               value: "Red",
                               activate-callback: change-color-callback),
                          make(<menu-button>,
                               label: "Green",
                               value: "Green",
                               activate-callback: change-color-callback)));
  pane file-menu (frame)
    make(<menu>,
         label: "File",
         children: vector(frame.submenu,
                          make(<menu-button>,
                               label: "Exit",
                               activate-callback: exit-frame)));

  layout (frame)
    make(<drawing-pane>);  // a blank window that does nothing.

  menu-bar (frame)
    make(<menu-bar>,
         children: vector(frame.file-menu));

end frame <menu-example-frame-1>;

define method change-color-callback (gadget :: <gadget>) => ()
  notify-user(format-to-string("Changed color to %=", gadget-value(gadget)),
              owner: sheet-frame(gadget));
end method change-color-callback;

// example 2 - using command tables

define command-table *color-comtab* (*global-command-table*)
  menu-item "Red" = com-set-color-red;
  menu-item "Green" = com-set-color-green;
end;

define command-table *file-comtab* (*global-command-table*)
  menu-item "Submenu" = *color-comtab*;
  menu-item "Exit" = exit-frame;
end;

define command-table *application-comtab* (*global-command-table*)
  menu-item "File" = *file-comtab*;
end command-table *application-comtab*;

define method com-set-color-red (frame :: <menu-example-frame-2>)
  notify-user(format-to-string("Color changed to Red"),
              owner: frame);
end;

define method com-set-color-green (frame :: <menu-example-frame-2>)
  notify-user(format-to-string("Color changed to Green"),
              owner: frame);
end;

define frame <menu-example-frame-2> (<simple-frame>)
  command-table (frame)
    *application-comtab*;

  layout (frame)
    make(<drawing-pane>);  // a blank window that does nothing, but makes
                           // this look more like a real application frame.

end frame <menu-example-frame-2>;

// This will display the first window and when you choose File > Exit
// it will display the second window.  The look exactly the same.
begin
  start-frame(make(<menu-example-frame-1>));
  start-frame(make(<menu-example-frame-2>))
end;

----------------------8<------------------------

      b) How to implemnet print to printer in the menu-bar, and realy
         print a simple text document to printer? (In window and unix).

I don't know the answer to this.  My guess is that you would have
to use the standard Windows API for printing, via the C-FFI
library.

    Q6: In the window, how does the fileames dynamically go into the
    menubar?

You should look in the DUIM Test Suite example project, in
menus.dylan for an example of dynamically modifying a menu, and
in command-tables.dylan for how to use command tables in a more
dynamic way than I did above.

-Carl



Sat, 01 Sep 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Sorry it's beginner's question..

2. Data Type Problem - COM Beginner's question

3. Beginner's question

4. A Beginner's questions

5. A Beginner's questions - THANK YOU

6. Beginner's question

7. Beginner's Question -

8. Beginner's question on AWK

9. How to convert a string into a class (Beginner's question)

10. beginner's question, differences among Smalltalk implementations

11. Beginner's Question - Random Numbers

12. Beginner's Question: What is Eiffel?

 

 
Powered by phpBB® Forum Software