Ruby/Tk Some Basic Questions

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default Ruby/Tk Some Basic Questions

    Hi,

    I'm playing with Ruby/Tk and I've got the Perl/Tk book and some other
    text/online documentation to go along with. I am wondering if there is a
    major difference between TkRoot and TkWindow and it might be. In all of the
    ruby examples folks use TkRoot and assign all widgets to it, but the
    TkWindow still exists. So why use one over the other?

    Any input is greatly appreciated.

    Thanks!

    Zach


    Zach Dennis Guest

  2. Similar Questions and Discussions

    1. Basic Questions about FMS. Please help
      Hi, I have see Flash Media Server 2.0.4 that I use to make multiplayer game with shared objects. Now there are 2 more servers called 1 - Flash...
    2. Some basic questions
      Hi All, I've been looking into flex a bit for the last day or two. I have a question though, flex 2 doesn't do player compatibility (pre version...
    3. Basic questions about flex
      I posted earlier on this topic to this forum but the posting seems top have got lost. I use Freebsd/Linux/sun as servers and woulod not use...
    4. couple of basic questions...
      1) does coldfusion mx NOT read .asp pages? as I cannot get mine to view .asp pages but .cfm pages are fine....??? 2) when showing data from a...
    5. Basic Questions
      lallous <lallous@lgwm.org> wrote: od -cx and hd Possibly nothing at all, probably where /u or some other is mounted. Type "mount" or "df...
  3. #2

    Default Re: Ruby/Tk Some Basic Questions

    If you'll forgive another newbie question:

    What is an abstract class?

    I think of classes as abstract already, and objects as concrete. Maybe
    an abstract class is one that never gets instantiated, but is always
    further specified / subclassed before being used?

    David

    On Monday, November 10, 2003, at 08:49 PM, Hidetoshi NAGAI wrote:
    > Hi,
    >
    > From: "Zach Dennis" <zdennis@mktec.com>
    >> I am wondering if there is a
    >> major difference between TkRoot and TkWindow and it might be. In all
    >> of the
    >> ruby examples folks use TkRoot and assign all widgets to it, but the
    >> TkWindow still exists. So why use one over the other?
    >
    > TkWindow class is an abstract class.
    > --
    > Hidetoshi NAGAI
    > (nagai@ai.kyutech.ac.jp)
    >

    David D'Andrea Guest

  4. #3

    Default Re: Ruby/Tk Some Basic Questions

    David D'Andrea wrote:
    > If you'll forgive another newbie question:
    >
    > What is an abstract class?
    >
    > I think of classes as abstract already, and objects as concrete. Maybe
    > an abstract class is one that never gets instantiated, but is always
    > further specified / subclassed before being used?
    Yes, your guess is correct. Abstract base classes are never themselves
    instantiated, but rather provide a set of basic functionality that their
    (concrete) subclasses use.

    Lyle Johnson Guest

  5. #4

    Default Re: Ruby/Tk Some Basic Questions

    I think that is a good question!!

    I know an abstract class in Java, and I just figured the same thing applied
    here in a ruby-ish way, but I was pondering the exact same question! What is
    an abstract class in Ruby?

    Zach

    -----Original Message-----
    From: David D'Andrea [mailto:david.dandrea@sympatico.ca]
    Sent: Tuesday, November 11, 2003 1:05 PM
    To: ruby-talk ML
    Subject: Re: Ruby/Tk Some Basic Questions


    If you'll forgive another newbie question:

    What is an abstract class?

    I think of classes as abstract already, and objects as concrete. Maybe
    an abstract class is one that never gets instantiated, but is always
    further specified / subclassed before being used?

    David

    On Monday, November 10, 2003, at 08:49 PM, Hidetoshi NAGAI wrote:
    > Hi,
    >
    > From: "Zach Dennis" <zdennis@mktec.com>
    >> I am wondering if there is a
    >> major difference between TkRoot and TkWindow and it might be. In all
    >> of the
    >> ruby examples folks use TkRoot and assign all widgets to it, but the
    >> TkWindow still exists. So why use one over the other?
    >
    > TkWindow class is an abstract class.
    > --
    > Hidetoshi NAGAI
    > (nagai@ai.kyutech.ac.jp)
    >



    Zach Dennis Guest

  6. #5

    Default Re: Ruby/Tk Some Basic Questions

    I got this reply from Lyle Johnson (thanks), so just in case anyone
    else was wondering:
    > Yes, your guess is correct. Abstract base classes are never themselves
    > instantiated, but rather provide a set of basic functionality that
    their
    > (concrete) subclasses use.
    I suppose there's no way to enforce the non-instantiation of these
    abstract classes, you just don't unless you're feeling perverse.

    (me never, really!)

    David

    On Tuesday, November 11, 2003, at 01:44 PM, Zach Dennis wrote:
    > I think that is a good question!!
    >
    > I know an abstract class in Java, and I just figured the same thing
    > applied
    > here in a ruby-ish way, but I was pondering the exact same question!
    > What is
    > an abstract class in Ruby?
    >
    > Zach
    >
    > -----Original Message-----
    > From: David D'Andrea [mailto:david.dandrea@sympatico.ca]
    > Sent: Tuesday, November 11, 2003 1:05 PM
    > To: ruby-talk ML
    > Subject: Re: Ruby/Tk Some Basic Questions
    >
    >
    > If you'll forgive another newbie question:
    >
    > What is an abstract class?
    >
    > I think of classes as abstract already, and objects as concrete. Maybe
    > an abstract class is one that never gets instantiated, but is always
    > further specified / subclassed before being used?
    >
    > David
    >
    > On Monday, November 10, 2003, at 08:49 PM, Hidetoshi NAGAI wrote:
    >
    >> Hi,
    >>
    >> From: "Zach Dennis" <zdennis@mktec.com>
    >>> I am wondering if there is a
    >>> major difference between TkRoot and TkWindow and it might be. In all
    >>> of the
    >>> ruby examples folks use TkRoot and assign all widgets to it, but the
    >>> TkWindow still exists. So why use one over the other?
    >>
    >> TkWindow class is an abstract class.
    >> --
    >> Hidetoshi NAGAI
    >> (nagai@ai.kyutech.ac.jp)
    >>
    >
    >
    >
    >

    David D'Andrea Guest

  7. #6

    Default Re:

    I am running

    Ruby 1.8.0
    Tcl/Tk 8.3
    Windows 2000


    Zach




    ----- Original Message -----
    From: "Hidetoshi NAGAI" <nagai@ai.kyutech.ac.jp>
    To: "ruby-talk ML" <ruby-talk@ruby-lang.org>; <zdennis@mktec.com>
    Sent: Tuesday, November 11, 2003 7:51 PM

    > Hi,
    >
    > From: "Zach Dennis" <zdennis@mktec.com>
    > Subject:
    > Date: Wed, 12 Nov 2003 12:28:52 +0900
    > Message-ID: <001901c3a8e6$18952d80$6501a8c0@Laptop>
    > > I'm having bind problems with TkRoot. I want to detect a window resize.
    Here
    > > is what I am attempting:
    >
    > I cannot reproduce your problem.
    >
    > # ruby 1.8.1 (2003-11-07) [i686-linux] & Tcl/Tk8.4.4
    >
    > Please tell me your environment (ruby version, tcl/tk version,
    > platform, and so on).
    > --
    > Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
    >
    >
    >


    Zach Dennis Guest

  8. #7

    Default Re:

    From: "Zach Dennis" <zdennis@mktec.com>
    Subject: Re:
    Date: Wed, 12 Nov 2003 12:58:51 +0900
    Message-ID: <007301c3a8ea$49a4da20$6501a8c0@Laptop>
    > I am running
    > Ruby 1.8.0
    > Tcl/Tk 8.3
    > Windows 2000
    Maybe your problem depends on "Tcl/Tk's vwait problem".
    Could you try the recent version of tcltklib.c?
    There are many changes between between yours and the current CVS.

    # ruby-1.8.0/ext/tcltklib/tcltklib.c : 1253 lines
    # Ruby-CVS/ruby/ext/tcltklib/tcltklib.c : 2396 lines
    --
    Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

    Hidetoshi NAGAI Guest

  9. #8

    Default Re:

    It's late I think I am thinking off base at the moment. Thanks for your help
    Hidetoshi. I'm heading to bed and I'll update tomorrow on any progress.

    Zach

    ----- Original Message -----
    From: "Hidetoshi NAGAI" <nagai@ai.kyutech.ac.jp>
    To: "ruby-talk ML" <ruby-talk@ruby-lang.org>; <zdennis@mktec.com>
    Sent: Tuesday, November 11, 2003 8:18 PM
    Subject: Re:

    > From: "Zach Dennis" <zdennis@mktec.com>
    > Subject: Re:
    > Date: Wed, 12 Nov 2003 12:58:51 +0900
    > Message-ID: <007301c3a8ea$49a4da20$6501a8c0@Laptop>
    > > I am running
    > > Ruby 1.8.0
    > > Tcl/Tk 8.3
    > > Windows 2000
    >
    > Maybe your problem depends on "Tcl/Tk's vwait problem".
    > Could you try the recent version of tcltklib.c?
    > There are many changes between between yours and the current CVS.
    >
    > # ruby-1.8.0/ext/tcltklib/tcltklib.c : 1253 lines
    > # Ruby-CVS/ruby/ext/tcltklib/tcltklib.c : 2396 lines
    > --
    > Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
    >
    >
    >


    Zach Dennis Guest

  10. #9

    Default Re: Help Compiling Ruby 1.8.1

    Hi,

    At Thu, 13 Nov 2003 00:10:08 +0900,
    Zach Dennis wrote:
    > H:\ruby-1.8.1\win32>nmake DESTDIR=temp install
    You have to specify DESTDIR as absolute path.

    --
    Nobu Nakada

    nobu.nokada@softhome.net Guest

  11. #10

    Default Re: Help Compiling Ruby 1.8.1

    Hi,

    At Thu, 13 Nov 2003 02:22:10 +0900,
    Zach Dennis wrote:
    > I:\source\languages\ruby\source\ruby-1.8.1\bcc32>configure
    > 1 file(s) copied.
    > MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
    > MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
    > Creating Makefile
    >
    > ** error 1 ** deleting -prologue-
    Hmmm, do you set TEMP environment variable?

    --
    Nobu Nakada

    nobu.nokada@softhome.net Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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