Filtered by date 2017-01-02, 251 - 260 of 1541 Postings (
all,
summary)
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
How do I rename a Class instproc? For example:
Class T -parameter { {msg "Hello world!"} }
T instproc hi {} {
puts [my msg]
}
T instparametercmd msg
T t
t hi
t msg "Good Bye!"
t rename hi bye
t bye
Also, what's the difference between using "instparametercmd" and
"parametercmd" in the example above?
Thanks,
Kevin
--
Kevin Van Workum, PhD
Sabalcore Computing Inc.
Run your code on 500 processors.
Sign up for a free trial account.
www.sabalcore.com
877-492-8027 ext. 11
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
Thanks - I'll give that a go.
Matthew
-----Original Message-----
From: xotcl-bounces_at_alice.wu-wien.ac.at
[mailto:xotcl-bounces_at_alice.wu-wien.ac.at]On Behalf Of Neophytos
Demetriou
Sent: 02 February 2006 19:48
To: xotcl_at_alice.wu-wien.ac.at
Subject: Re: [Xotcl] Ordering of Children
Matthew Dodwell wrote:
> MemoryLineController instproc AddNode {name} {
> eval GUINode [self]::[my autoname gNode%02d] -DisplayName {$name}
> }
* Replace the body of addNode as follows:
my lappend __children [eval GUINode ...etc... ]
and [my info children *gNode*] in CreateTreeview as follows:
[my set __children]
OR
* Use an OrderedComposite class that does it for you. You will either
have to mix it in or define it as one of the superclasses of
MemoryLineController, i.e.:
Class MemoryLineController -superclass OrderedComposite
Class OrderedComposite
OrderedComposite instproc children {} {
set children [expr {[my exists __children] ? [my set __children] : ""}]
return $children
}
OrderedComposite instproc add obj {
my lappend __children $obj
$obj set __parent [self]
}
Best,
Neophytos
_______________________________________________
Xotcl mailing list
Xotcl_at_alice.wu-wien.ac.at
http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
> One other thought... have you tried explicitly namespace scoping
> your object... I know that there were some namespace issues with the
> early 1.3 series.
>
> try:
> TestA ::a
> ::a x 1
Yahoo! Brilliant! "TestA ::a" did the trick. Thanks.
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
Dear Victor,
i don't think, nx/xotcl should brace a scalar return values.
Look at plain Tcl:
Tcl does not brace a string with a space either:
% set x "a b"
a b
For what reason should nx/xotcl do it? There are many other
commands in nx, doing the same, such as e.g. "create"
% nx::Object create "a b"
::a b
% nx::Object create "a b::c d"
::a b::c d
% nx::Object create "a b::e"
::a b::e
... and therefore "info parent" has no reason to add braces:
% "a b::c d" info parent
::a b
In situations, where a list is returned (potentially
multiple elements) the elements have to be are proper list
elements and therefore these elements are escaped, even if
the result is a list with a single element:
% "a b" info children
{::a b::e} {::a b::c d}
This is the same in plain Tcl as well: "info commands"
returns a list of elements:
% info commands "::a *"
{::a b}
% info commands "::a b::*"
{::a b::e} {::a b::c d}
again, the command as a scalar:
% lindex [info commands "::a b::*"] 0
::a b::e
%
So, the rule is: list are properly escaped, scalars are the
plain values.
all the best
-gustaf
On 16.03.11 01:48, Victor Mayevski wrote:
> Hello Gustaf,
>
> I encountered an issue with [info parent] and where parent's name
> contains a space. While [info children] behaves correctly by returning
> a list:
> {::pa rent::child}
> [info parent] just returns the name:
> ::pa rent
> instead of:
> {::pa rent}
> This is fixable by using [list [info parent]] but I wonder if that
> should be the default behavior in NX anyway?
>
> Thanks,
>
> Victor
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
I just tried this with 1.3.6 and it appears to be working. Sort of
related question, how do people handle the swizzling/unswizzling of
autogenerated object names (eg ::xotcl__#0) when restoring an object?
On Sun, 27 Mar 2005 02:17:43 -0500, Aamer Akhter <aakhter_at_gmail.com> wrote:
> Hello,
>
> I seem to be missing something basic in the usage of Serializer:
>
> package require XOTcl
> namespace import ::xotcl::*
> package require xotcl::serializer
> set a [Object new]
> $a set b hello
> Serializer deepSerialize $a
>
> the last command doesn't seem to return anything. I had expected the
> creation and config code for $a. What am I missing?
>
> --
> Aamer Akhter / aakhter_at_gmail.com
>
--
Aamer Akhter / aakhter_at_gmail.com
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
Dear list,
I'm playing with the example codes placed here:
http://next-scripting.org/xowiki/getstart but the XOTcl example isn't working as expected.
I have the following error:
./tclsh8.5 proba1.tcl
::g: unable to dispatch method 'parameter' during '::g.parameter'
::g ::xotcl::Object->residualargs
::Greeter ::xotcl::Class->create
invoked from within
"Greeter create g -parameter Anna"
(file "proba1.tcl" line 13)
the code in the proba1.tcl file is:
package require XOTcl
xotcl::Class create Greeter -parameter name
Greeter instproc say_hello {} {
my instvar name
puts "Welcome $name!"
}
Greeter instproc say_bye {} {
my instvar name
puts "Goodbye $name!"
}
Greeter create g -parameter Anna
g say_hello
The nx version is working well.
Any hints are appreciated.
TIA,
feri
P.s.: The nsf2.0b3 and git versions display the same error.
--
Kulcsár Ferenc <crusader_at_netbsd.hu>
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
When XOTcl exits, it seems that the [destroy] method is called on all
objects. The first question is whether this is wise .. possibly. The
problem is I would like to build a transparent layer for persistence
storage which could be applied to a wide range of applications. The
problem naturally is that the objects in the persistence storage get
destroyed when the application exits :-)
/
http://www.fishpool.com/~setok/
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
Murr, Florian schrieb:
> In XOTcl (1.3.8) there seems to be no initialisation of parameters
> during dynamic class change.
>
this is intended behavior. when an object changes its class, it is not
clear
that someone want's to re-initialize variables, etc.. btw, there is a
similar situation,
when mixining-in classes with parameter definitions.
> See code below: a1 and a2 behave differently.
>
they don't behave differently on themselves, you are doing different
things there.
certainly, when you call a method setting an instvar, it is afterwards
there,
if you don't call it, its not there.
I think, you question is: how can i get the default values from parameters
set, when i change dynamically the class. The following definition
helps you with that:
=============================
Object instmixin add \
[Class new -instproc class args {next; ::xotcl::Class::Parameter
searchDefaults [self]}]
=============================
btw, you can get rid of the string-map-INFO business by using
...
package require xotcl::trace
...
A instproc pp {} { my showVars }
...
hope this helps
-gustaf neumann
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
Dear Job Seeker,
How can we help you find your DREAM JOB?
Resume Author.com is an established resume writing and distribution firm that
specializes in custom-tailored career development. We have a dedicated staff of resume writers
and an Opt-In E-mail Distribution Network of over 19,000 recruiters and employers (We can have your
professional resume in their hands in a matter of minutes).
We're so confident in the effectiveness of our services that we guarantee job interviews!!!
Learn more about the most effective career marketing services available.
Resume Writing & Editing Services Click Here
Starting at only 79.95
E-mail Resume Distribution Services Click Here
Starting at only 29.95
Best Regards,
Adam Erickson
Client Development,
Resume Author
Would you like to test our quality? We provide a
FREE Resume Critique for all interested parties.
CONCERNED ABOUT JUNK MAIL? SO ARE WE.
As a ResumeAuthor.com Sales Representative, I believe you meet the criteria
we look for in a resume writing and distribution customer. If, however, you feel that you have received this email in error,
I apologize. We will comply with all removal requests.
To be removed type "remove" in the subject line and MAIL TO:
aerickson@resumeauthor.com
this is the only way to be removed. Hitting reply will NOT remove you.
This message is sent in compliance of the new email bill section 301.Per Section
301, Paragraph (a)(2)(C) of S. 1618.
Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM
I've now also documented the issue and the solution I'm using on Tcl's Wiki, for reference:
http://wiki.tcl.tk/26791Feel free to disagree but I wanted that security in my code :-)
--
Kristoffer Lawson, Co-Founder, Scred // http://www.scred.com/