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

Weblog Page

Showing 1001 - 1010 of 1561 Postings (summary)

Re: [Xotcl] proper way to access xotcl classes

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

From: Kristoffer Lawson <setok_at_scred.com>
Date: Wed, 7 May 2008 21:01:36 +0300

On 7 May 2008, at 20:54, Matthew Smith wrote:

>
> ---------------------------------------------------------
> How do I access the class methods(i guess they are called) from within
> the tcl file?
> The examples show this:
> --------------------------------------------------------
> # Create Object s1 of class Stack
> % Stack s1
> ::s1
> % s1 push a
> a
> % s1 push b
> b
> % s1 push c
> c
> % s1 pop
> c
> % s1 pop
> b
> # Delete object s1
> s1 destroy
> --------------------------------------------------------
> I have tried this:
> set s1 [Stack]
>

Either this:

set s1 [Stack new]

or

set s1 [Stack s1]

The first version gives you an automatically named object, which is
probably what you usually want to do. You can also explicitly name
objects with the latter version (something you cannot do with Java
and stuff). Mostly you wont need to do this, but there are situations
when it's useful.

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

[Xotcl] nextto

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

From: Victor Mayevski <vitick_at_gmail.com>
Date: Fri, 23 Jan 2015 14:18:11 -0800

Recently I looked over TclOO and noticed a "nextto" feature. It appears to
be pretty useful and I supposed it should be trivial to implement it in NX.
Any ideas how?

Thanks,

Victor

RE: [Xotcl] Has anyone xotcl this for WindowsCE/Windows Mobile/Pocket PC

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, 29 Mar 2006 11:18:56 -0800

XOTcl uses a recent TEA setup, so at least the main library should build for
CE just fine, if all the right configure options are passed in.

  Jeff Hobbs, The Tcl Guy, http://www.ActiveState.com/

-----Original Message-----
From: xotcl-bounces_at_alice.wu-wien.ac.at
[mailto:xotcl-bounces_at_alice.wu-wien.ac.at] On Behalf Of Martin Kendall
Sent: February 10, 2006 9:05 AM
To: xotcl_at_alice.wu-wien.ac.at
Subject: [Xotcl] Has anyone xotcl this for WindowsCE/Windows Mobile/Pocket PC



As there are so many excellent ports of Tcl to the Pocket PC:

http://wiki.tcl.tk/2946

http://wiki.tcl.tk/13487

http://www.evolane.com/software/etcl/

 

I wondered if anyone had compile xotcl to run with one of these before I
embark on evC++

 

Thanks

 

Martin

[Xotcl] 0.84 mixin behaviour changed ??

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

From: Zoran Vasiljevic <zoran_at_archiware.com>
Date: Tue, 13 Mar 2001 10:27:30 +0100

Hi !

I strongly suspect that in0.84 version,
the mixin process is changed, which
brings some incompatibilities.

Please consider this simple example

Class A
Class B

A instproc init {args} {
    [self] instvar C
    [self] mixin B

    set C(Aelement) 1
}
B instproc init {args} {
    [self] instvar C
    set C(Belement) 1
}

A instproc foo {args} {
    puts "[self] A bar"
}
B instproc foo {args} {
    puts "[self] B bar"
}


The 0.83 behaviour...

% A a
% a foo
::a B bar
% a array get C
Belement 1 Aelement 1


The 0.84 behaviour

% A a
% a foo
::a B bar
% a array get C
Aelement 1


WHERE is the "Belement" ??????
It seems that 0.84 does not properly calls the "init"
on the B class before doing an mixin ?
Or am I missing something completely?
Any ideas ?


Cheer's
Zoran Vasiljevic
Archiware

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: Eckhard Lehmann <eckhardnospam_at_gmx.de>
Date: Wed, 02 Jan 2008 20:26:32 +0100

Kristoffer Lawson schrieb:
>>
>> I see that there is no need for another interception technique, but
>> it would be really helpful to have the current filter techiques also
>> applied to ordinary Tcl code inside methods.
>
> Why not just use the Tcl [trace] command for the normal Tcl commands?
How would you do that, together with filters? enterstep/leavestep work
only in Tcl proc's, while filters work only on objects. How could this
be mixed - as methods are composed of calls to objects (e.g. [my],
[self]) as well as ordinary Tcl code?
As long as it is separated, fine. But for Tcl statements in object
methods it seems more difficult to me.

Eckhard

Re: [Xotcl] Improvement proposal for instfilters and guards

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

From: Eckhard Lehmann <eckhardnospam_at_gmx.de>
Date: Tue, 03 Jun 2008 22:55:45 +0200

Gustaf Neumann schrieb:
> So, for your problem, define a meta-class for classes
> with persistant objects and overwrite
> on the class level the methods "create" and "instdestroy". The same
> can be done with the Session class as well. I have not looked at
> the session model of TclHttpd, but from your specification, the
> class structure can look like the code below. The script
> produces the following output:
>
Actually I am using meta classes already, but not for this kind of
behaviour.
It's that only some persistency objects should be available in some
sessions, not all of them in all sessions - but other objects should be
in all sessions. You certainly don't want to have all of your user info
appear in someone else's session while you are logged in on the server ;-).
Anyway, thanks for your kind help!

BTW, have you or somebody else already considered to make an XOTcl
implementation for Jacl (Tcl on Java)?


-- 
Eckhard

[Xotcl] XOTclIDE 0.59 with Visual Regexp

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

From: Artur Trzewik <mail_at_xdobry.de>
Date: Sat, 6 Mar 2004 12:22:39 +0100

Hi!

New Version of XOTclIDE 0.59 is released.
http://www.xdobry.de/xotclIDE

changes:
- New plug-in: Visaul Regexpr that was adapted from
http://laurent.riesterer.free.fr/regexp/
- GUI for Method-Browser, Error-Stack-Browser and Heritage-Browser are
consistent to Componente-Browser and can also diplay in XOTcl mode with
comment and version control informations in status bar.
- small wizard for helping convert tcl procedures to XOTcl instace methods
- for another changes see change-log file

Artur Trzewik

[Xotcl] snit like delegation for xotcl

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, 29 Feb 2004 23:19:42 +0100

Dear XOTcl community,

since someone asked for it, here comes a simple implementation
of delegation similar as done in snit (unknown calls are delegated).
Maybe, someone can use it.

best regards
-gustaf neumann

##############################################################
# define a deletate method and a default behavior for unknown
##############################################################
Object instproc delegate {method obj} {
  my set delegate($method) $obj
}
Object instproc unknown {m args} {
  if {[my exists delegate($m)]} {
    eval [my set delegate($m)] $m $args
  } elseif {[my exists delegate(*)]} {
    eval [my set delegate(*)] $m $args
  }
}

##############################################################
# some syntactic sugar for defining methods
##############################################################
Class instproc methods list {
  foreach {name arguments body} $list {
    my instproc $name $arguments $body
  }
}

##############################################################
# example from the snit homepage: A dog with a tail....
##############################################################
Class Tail -parameter {{length 5}} -methods {
  wag {} {
    puts "[my info parent] Wag, wag, wag."
  }
}

Class Dog -methods {
  init {} {
    set tail [Tail new -childof [self]]
    my delegate * $tail
  }
  bark {} {
    puts "[self] Bark, bark, bark."
  }
}


Dog fido
fido wag
fido bark

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

Re: [Xotcl] xodoc

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

From: Jeff Levesque <jeffreyslevesque_at_gmail.com>
Date: Wed, 19 Aug 2009 09:26:51 -0400

While I'm still working on this I have a couple of other questions. I'm
still learning XOTcl so I'm not sure what some of the code I had to change
did or why it was written that way. Hopefully someone can shed some light on
it for me so I don't cause any aggravation for someone down the road.

*Change #1*
>From xodoc.xotcl.
*Original Code:*
set docdb [XODoc [XODoc autoname docdb]]
::_at_ set analyzerObj $docdb
$docdb analyzeFile $file
*New Code:*
::_at_ set analyzerObj [self]
[self] analyzeFile $file

*Reason:* In order to get the inheritance to document correctly, I removed
the call "$docdb writeFile ${docdir}/$docfilename.html $file" and after all
the files are analyzed the write call is made.

*Change #2
*From metadataAnalyzer.xotcl (in a few places in various forms).
*Original Code:*
set t [$procClass create [my autoname ::xotcl::_at_::t]]
*New Code:
*set t [$procClass new]

*Reason:* Creating all the objects with t as a base name caused older
objects to be overwritten with new objects and then I could not longer
access the information I needed.
*
*
So I'm not sure if there were technical reasons for the code being this way
but I just wanted to point these things out in case this would be a problem.
In addition to the work I mentioned previously, I'm working on supporting
namespace documentation and supporting xotcl documentation for non-xotcl
code.

- Jeff

On Tue, Aug 18, 2009 at 10:00 AM, Gustaf Neumann <neumann_at_wu.ac.at> wrote:

> Hi Jeff,
>
> your work sounds great (pls. send as well the announced generated samples,
> they
> were not included in your message). We are in the process towards xotcl 2.0
> (there will be a paper at the forthcoming tcl conference); therefore it
> would be
> a very good time for such improvements.
>
> all the best
> -gustaf neumann
>
>
> Jeff Levesque schrieb:
>
>> Hi All,
>> I hope this is still the right place for this, but I was wondering if
>> anyone
>> has any interest in some changes I've made to xodoc. I've really only
>> added
>> a couple things but they were big requirements for our documentation and I
>> figured it might be this way for others as well. Here's the feature list
>> and
>> what I've completed so far:
>>
>> - Cleanup the output appearance/Make it look more like javadoc (In
>> progress)
>> - List inherited procedures for each class (Mostly finished)
>> - Fix package (_at_ package provide ...) documentation (Mostly finished)
>> - Create a side navigation bar of classes/procedures (similar to
>> javadoc)
>> (Not started)
>> - Add HTML functionality to xodoc as needed (In progress)
>>
>> I've attached a sample of the files generated from my version of xodoc. If
>> other people are interested I would go through and clean up the code
>> before
>> I made it available.
>>
>> - Jeff
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Xotcl mailing list
>> Xotcl_at_alice.wu-wien.ac.at
>> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
>>
>>
>
>
> --
> Univ.Prof. Dr. Gustaf Neumann
> Institute of Information Systems and New Media
> WU Vienna
> Augasse 2-6, A-1090 Vienna, AUSTRIA
>
>

Re: [Xotcl] XOtcl 1.3 bug

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

From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Thu, 7 Oct 2004 00:45:21 +0300 (EEST)

On Wed, 6 Oct 2004, Gustaf Neumann wrote:

> Hi Attilio,
> if i would be Mr Spock, i would say "fascinating".
>
> The example can be simplified to:
>
> set pippo 1
> Object o
> puts [o exists pippo]
> Object o::p
> puts [o exists pippo]
>
> and was like this already at least in 0.9 (in 2001),
> most likely as well in all versions supporting "exists".

Oop, I think I noticed something like this too but forgot to report it as
I made a workaround. Bad me :-)

(Need to look at that segmentation fault thing again as soon as I have
time)
                               / http://www.fishpool.com/~setok/

Next Page