View · Search · Index
No registered users in community xowiki
in last 10 minutes

Weblog Page

Showing 971 - 980 of 1561 Postings (summary)

Re: [Xotcl] possible bug?

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Krzysztof Frukacz <frukacz.krzysztof_at_gmail.com>
Date: Mon, 10 Jan 2011 21:38:43 +0100

On 01/10/2011 05:10 PM, Gustaf Neumann wrote:
> Dear Krzysztof, you did not include tester.tcl. Without it is hard to
> help you... -gustaf
>

Hello,

Once again - all the files.
The problem: in init of class ExtendedContainer there is a call for two
procs: testA and testB. Both should work, because tmp1 is an object of
class B (which contains testB) which has superclass A (which contains
testA). However the call for testB works, but testA doesn't. Why?
Thank you for you help.

Best regards
-- 
Krzysztof Frukacz






          Re: [Xotcl] full trace support for XOTcl methods/procs

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Kristoffer Lawson <setok_at_fishpool.com>
          Date: Tue, 1 Jan 2008 17:04:19 +0200

          On 1 Jan 2008, at 14:33, Eckhard Lehmann wrote:

          > Especially I look for a way to execute a proc before *every*
          > statement inside an instproc. [trace] can do this via the
          > "enterstep" and "leavestep" operators to [trace add execution]. Is
          > this possible with filters and filterguards?

          As you say, [trace] can do that. For XOTcl methods it is possible
          with filters as they are executed before the actual method, which
          only gets run when [next] is called. So with filters you can handle
          both the enter and the leave. Using filters you could easily build a
          framework that would allow you to specify which methods to catch.
          I've done this with my Memorisation class (for caching). I can
          specify which methods I want to cache and the filter deals with that.
          It was created before filterguards so it may be even easier (and
          faster) to do with today's filters.

                      / http://www.scred.com/
                      / http://www.fishpool.com/~setok/

          RE: [Xotcl] Request for XOTcl proc and var type ahead in tkcon

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Jeff Hobbs <jeffh_at_ActiveState.com>
          Date: Wed, 6 Apr 2005 22:32:19 -0700

          Oh yeah ... tkcon seems to be certainly well enough architectured
          (in this case ;) ) to handle this easily. Add this to tkcon:

          proc ::tkcon::ExpandXotcl str {
              # in a first step, get the cmd to check, if we should handle subcommands
              set cmd [::tkcon::CmdGet $::tkcon::PRIV(console)]
              # Only do the xotcl magic if there are two cmds and xotcl is loaded
              if {[llength $cmd] != 2
                  || ![EvalAttached [list info exists ::xotcl::version]]} {
                  return
              }
              set obj [lindex $cmd 0]
              set sub [lindex $cmd 1]
              set match [EvalAttached [list $obj info methods $sub*]]
              if {[llength $match] > 1} {
                  regsub -all {([^\\]) } [ExpandBestMatch $match $str] {\1\\ } str
                  set match [linsert $match 0 $str]
              } else {
                  regsub -all {([^\\]) } $match {\1\\ } match
              }
              return $match
          }

          and then do this:

          tkcon master set ::tkcon::OPT(expandorder) \
             {Xotcl Variable Procname Pathname}

          Note that this puts pathname at the end, also addressing Gustaf's
          request that it's too picky. You have to have Xotcl before
          Procname for it to be really useful.

          I've added the above proc to the tkcon sources, but I didn't change
          the expandorder to include it yet ... I suspect it's "fast enough",
          but if somebody with a slow machine could confirm, that would be
          nice.

            Jeff Hobbs, The Tcl Guy
            http://www.ActiveState.com/, a division of Sophos

          [Xotcl] Fwd: [tcl_announce] II. European Tcl/Tk User Meeting

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Uwe Zdun <uwe.zdun_at_uni-essen.de>
          Date: Mon, 14 May 2001 14:09:18 +0200

          ---------- Fwd ----------
          Subject: [tcl_announce] II. European Tcl/Tk User Meeting
          Date: 10 May 2001 16:54:40 -0000
          From: Carsten Zerbst <zerbst_at_tu-harburg.de>
          To: tcl_announce_at_yahoogroups.com


          The schedule for the

                          II. European Tcl/Tk User Meeting

          is fixed now. With Andreas Kupries a prominent member of the community was
          found for the keynote speach about the actual state of the Tcl development
          and it's future. Andreas is not only well known for his work at the Tcl
          core but forms together with Jeffrey Hobbs the Tcl group of Active State.

          This years programm offers you a wide range of papers and tutorials, the
          schedule could be found here

          http://www.tu-harburg.de/skf/tcltk/time2001.html

          Registration is open, if you want to present your work in form of a poster
          contact me.

          Bye and see you in Hamburg, Carsten Zerbst

          --
          Dipl. Ing. Carsten Zerbst         |   Come to the
                                            |   2. European Tcl Conference 2001 !
          zerbst_at_tu-harburg.de              |
          http://www.tu-harburg.de/~skfcz   |   http://www.tu-harburg.de/skf/tcltk
          [[Send Tcl/Tk announcements to tcl-announce_at_mitchell.org
            Send administrivia to tcl-announce-request_at_mitchell.org
            Announcements archived at http://www.egroups.com/list/tcl_announce/
            The primary Tcl/Tk archive is ftp://ftp.neosoft.com/pub/tcl/ ]]
          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          -------------------------------------------------------
          -- 
          Uwe Zdun
          Specification of Software Systems, University of Essen
          Phone: +49 201 81 00 332, Fax: +49 201 81 00 398
          zdun_at_xotcl.org, uwe.zdun_at_uni-essen.de
          

          Re: [Xotcl] Xotcl 1.0.1 install buglets

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
          Date: Sun, 2 Mar 2003 20:03:13 +0100

          On Saturday 01 March 2003 05:41, Laurent Duperval wrote:
          > HI,
          >
          > I just installed xotcl 1.0.1 with a version of Tcl taken from CVS. WHen
          > I tried to install and test, I had problems because the
          > tcl_platform(platform) variable couldn't be found in the pkgIndex.tcl
          > files. I had to change all of them to ::tcl_platform(platform).
          >
          > Just thought you should know.

           Dear Laurent, many thanks!
           i fixed all occurances. These changes will be in release 1.0.2.
           This might happen, when a "package require" is executed
           from a non-global environment. i would expect that some
           packages (not neccesarily xotcl ones) might behave differently
           as well in respect to global variables...

           best regards
          -gsutaf
          >
          > L

          -- 
          Univ.Prof. Dr. Gustaf Neumann
          Abteilung für Wirtschaftsinformatik
          WU-Wien, Augasse 2-6, 1090 Wien
          

          [Xotcl] Testing for execution inside object

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Kristoffer Lawson <setok_at_fishpool.com>
          Date: Tue, 3 Oct 2006 13:49:59 +0300

          I need to know if the current procedural context is inside a method
          (isntproc, proc, whatever) or not. What is the best way to do this? I
          used [self] to check by catching the error, but that doesn't work
          particularly well if another package happens to define the command
          [self]. Besides, I've never been fond of having to resort to error-
          catching to find out information (a bit like how people used to test
          for the existence of an array element with [catch]).

                      / http://www.fishpool.com/~setok/

          [Xotcl] Bug: Empty arglist and body throws error

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Schofield, Bryan \(GE Transportation\) <"Schofield,>
          Date: Wed, 27 Oct 2004 16:51:48 -0400

          Hullo -

          I'm afraid I found a bug that will generate an "unable to dispatch" error if the argument list & body of an instproc are both empty. You will notice that as long as either contain something, it's ok. Notice the body of "Bar notpuke", it's just a single comment. See the code below:

          Gustaf -- This is the build that I downloaded from you on October 18th at:
             http://media.wu-wien.ac.at/download/xotcl-1.3.3.tar.gz


          -- blah.tcl --
          package require XOTcl 1.3

          namespace import ::xotcl::*
          Class Foo
          Foo instproc puke {} {}

          Class Bar
          Bar instproc notpuke {} {#}

          Class Ack
          Ack instproc notpuke {a} {}

          Bar b
          b notpuke

          Ack a
          a notpuke x

          Foo f
          f puke


          -- End --
          Produces the following error:
          ::f: unable to dispatch method 'puke'
              while executing
          "f puke"
              (file "/homes/bschofie/blah.tcl" line 20)




          > -----Original Message-----
          > From: xotcl-bounces_at_alice.wu-wien.ac.at
          > [mailto:xotcl-bounces_at_alice.wu-wien.ac.at]On Behalf Of Gustaf Neumann
          > Sent: Friday, October 15, 2004 1:03 PM
          > To: xotcl_at_alice.wu-wien.ac.at
          > Subject: Re: [Xotcl] xotcllib?
          >
          >
          > On Friday 15 October 2004 18:47, Schofield, Bryan \(GE
          > Transportation\) wrote:
          > > Does xotcllib, or some other collection of XOTcl utility
          > packages exist?
          > just the library that comes with the source in xotcl*/library
          > -gustaf
          >
          > --
          > Univ.Prof. Dr.Gustaf Neumann
          > Abteilung für Wirtschaftsinformatik und Neue Medien
          > Wirtschaftsuniversität Wien, Augasse 2-6, 1090 Wien
          > _______________________________________________
          > Xotcl mailing list
          > Xotcl_at_alice.wu-wien.ac.at
          > http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
          >

          Re: [Xotcl] Bug or feature in 1.1.2. Access to subobjects

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Artur Trzewik <mail_at_xdobry.de>
          Date: Wed, 31 Dec 2003 11:24:02 +0100

          Hallo!

          The new convention of calling subobject is indeed interesting.
          I have looked in my code and discovered a lot of
          [self]::subobject method ...
          To write it as
          my subobject method
          must be more performant because [self]::subobject will be every time
          substituted and can be not handled as internal Tcl object.

          Yet XOTclIDE is not compatible with this convention because I use Class
          subobjects as descriptors for methods with the same name as method.
          This subobjects are used to handle version control informations.
          And in the one case a get subobject instead of method call.

          > c) use different nameing conventions for sub-objects, e.g.
          > C o; C o::_at_a
          >

          This is for me the best solution. In the best case I need to change only one
          method.

          The another Aspect in this new feature is the code analyse (syntax checker).
          In the old code by call
          my method
          "method" can be only method. Now it can be also subobject that can
          be defined dynamically.
          Static syntax analyse is so not very reliable.
          But also a human who need to read a code must consider the two cases.
          Convention or another syntax can be good in this case.

          [self]::b method
          my b method; # what is object, what is method name, what is argument
          [my subobject b] method; # alternative but not good for subcommands
          my . b method; # . were special syntax for it
             or build all subobjects with special prefix
          my _at_b method

          There are many pro and contra. It is not clear for me now.

          Happy new year
          Artur Trzewik

          RE: [Xotcl] updated patch for xotcl 1.3.3

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: Schofield, Bryan \(GE Transportation\) <"Schofield,>
          Date: Wed, 1 Dec 2004 08:54:09 -0500

          > -----Original Message-----
          > From: xotcl-bounces_at_alice.wu-wien.ac.at
          >
          > > was this with gcc or cc? Is it possible to get a guest
          > > account for the hpux machine?
          >
          > It didn't actually matter whether it was gcc or HP cc, both
          > failed at the same spot. Unfortunately this machine is
          > behind a firewall, so I couldn't give access regardless. I
          > am still working on some other issues (just fixed the Windows
          > doc building), so I haven't looked into this abnormality at
          > this point. If you have an idea, I'll test it.
          >
          >

          Maybe start a SourceForge project for xotcl so you have access to SourceForge's compile farm?
          http://sourceforge.net/index.php
          http://sourceforge.net/docman/display_doc.php?docid=762&group_id=1

          -- bryan

          [Xotcl] Re: [Xotcl] Abstract class question

          Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

          From: <uwe.zdun_at_uni-essen.de>
          Date: Mon, 11 Dec 2000 17:35:15 +0100 (CET)

          >>>>> "LD" == Laurent Duperval <laurent.duperval_at_netergynet.com> writes:

          LD> Hi,
          LD> How do you enforce abstract methods? For example:

          LD> Class Foo
          LD> Foo abstract instproc procdef args

          LD> Class Bar -superclass
          LD> Bar instproc proc2

          LD> Bar barObj

          LD> I would like an error to be thrown at the "Bar barObj" line because the Bar
          LD> object doesn't define the procdef instproc. Is this rule enforceable? Is my
          LD> only way at it to use assertions?

          there are two answers:

          1. there are many ways to this in XOTcl ... Yes, assertions are one of
          them. Filters are another one. You can intercept every call to
          "abstract" and store all abstract procs/instprocs. Then you check
          all of them for every call. Obviously this is horrible to
          performance. Therefore assertions might be better here, because
          their concept is to be turned off in the final version ... you only
          check for debugging.

          XOTcl is intented as an extensible language. The abstract method is
          defined in predefined.xotcl:

          Object instproc abstract {methtype methname arglist} {
            if {$methtype != "proc" && $methtype != "instproc"} {
              error "invalid method type '$methtype', \
                  must be either 'proc' or 'instproc'."
            }
            [self] $methtype $methname $arglist \
                [list error "Abstract method $methname $arglist called"]
          }


          Here, the definition is quite simplistic. If you require a different
          behavior you can implement an extended version (e.g. with an instmixin
          on Object) ... if you also extend "create" you can check that never an
          instance is created, which has an abstract, unspecialized method.
          Just to show how this could work:

          Class EnforceAbstract
          EnforceAbstract instproc abstract {methtype methname arglist} {
            [self] lappend __abstractMethods $methname
            next
          }
          EnforceAbstract instproc create args {
            set obj [next]
            set class [$obj info class]
            foreach c [concat $class [$class info heritage]] {
              if {[$c exists __abstractMethods]} {
                foreach abstractProc [$c set __abstractMethods] {
                  set implCl [$obj procsearch $abstractProc]
                  if {"$implCl" == "::XOTclClasses${c}::$abstractProc"} {
                    error "Abstract Method not specialized: $c->$abstractProc for $obj"
                  }
                }
              }
            }
            return $obj
          }
          Object instmixin EnforceAbstract


          now your example produces the intended error message

          2. However, the simple implementation of "abstract" is not chosen
          without reason: We have not intended "abstract" as a constraint for
          programming, but as a way to document interfaces. E.g. a documentation
          tool may extract these information. And a programmer knows that it is
          her/his responsiblity to implement the method. This is a different
          philosophy than in languages, like Java, where everything is
          statically checked. However, then you have to live with a far more
          rigid language. The XOTcl philosophy is to constraint only what is
          absolutely necessary and that the programmer can extend constraining
          mechanisms easily (as above). So you can customize the language to the
          context of your problem. E.g. if you never use a part of an interface,
          you don't have to specialize it at all. But if you require that to be
          ensured ... you can do that.


          btw, I'm not sure that checking when the instance is created is the
          best choice in the general case, because in XOTcl you're allowed to
          build object-specific procs, e.g.:


          Object instmixin EnforceAbstract
          Class Foo
          Foo abstract instproc procdef args

          Class Bar -superclass Foo
          #Bar instproc procdef {} {..}
          Bar create barObj
          barObj proc procdef args {puts "I'm a valid implementation"}


          Here, the checking would report an error even though we have an
          implementation that conforms to the abstract interface.


          Regards,

          Uwe



          -- 
          Uwe Zdun
          Specification of Software Systems, University of Essen
          Phone: +49 201 81 00 332, Fax: +49 201 81 00 398
          zdun_at_xotcl.org, uwe.zdun_at_uni-essen.de
          

          Next Page