Discussion:
question to package nsf/nx
Add Reply
Manfred Stelzhammer
2024-12-13 08:42:41 UTC
Reply
Permalink
Hi

#####script start

nx::Class create myClass -superclass nx::Class {
:object property "nix default"
:method init {} {
:property "nix [[:info class] cget -nix]"
}
}

myClass copy myClass2

myClass2 create Class2 {
:property "nix [[:info class] cget -nix]"
}

Class2 create obj2
puts "nix = [obj2 cget -nix]"

##### end

This script run like expected.
I get "nix = default"

If I add:
#### add

myClass copy myClass3
myClass3 configure -nix "nixclass3"

myClass3 create Class3 {
:property "nix [[:info class] cget -nix]"
}

Class3 create obj3
puts "nix = [obj3 cget -nix] "

#### add end

I get an error "Class3: unable to dispatch method 'property'"


####workaround

myClass configure -nix "nixclass3"
myClass copy myClass3

myClass3 create Class3 {
:property "nix [[:info class] cget -nix]"
}

Class3 create obj3
puts "nix = [obj3 cget -nix] "

#### workaround end

Now I get "nix = nixclass3"


If I configure "-nix" in the baseclass "myClass" and copy this class it
works.
If I copy the baseclass "myClass" and configure "-nix" I get an error.

Is this a normal behavior?


regards

Manfred
Stefan Sobernig
2025-01-04 08:45:15 UTC
Reply
Permalink
Hi Manfred!

We confirm, this is a defect. We are on it and we will report back.

Sry for the late reply.

Best, Stefan
Post by Manfred Stelzhammer
Hi
#####script start
nx::Class create myClass -superclass nx::Class {
       :object property "nix default"
        :method init {} {
    :property "nix [[:info class] cget -nix]"
    }
}
myClass copy myClass2
myClass2 create Class2  {
    :property "nix [[:info class] cget -nix]"
}
Class2 create obj2
puts "nix = [obj2 cget -nix]"
##### end
This script run like expected.
I get "nix = default"
#### add
myClass copy myClass3
myClass3 configure -nix "nixclass3"
myClass3 create Class3 {
    :property "nix [[:info class] cget -nix]"
}
Class3 create obj3
puts "nix = [obj3 cget -nix] "
#### add end
I get an error "Class3: unable to dispatch method 'property'"
####workaround
myClass configure -nix "nixclass3"
myClass copy myClass3
myClass3 create Class3 {
    :property "nix [[:info class] cget -nix]"
}
Class3 create obj3
puts "nix = [obj3 cget -nix] "
#### workaround end
Now I get "nix = nixclass3"
If I configure "-nix" in the baseclass "myClass" and copy this class it
works.
If I copy the baseclass "myClass" and configure "-nix" I get an error.
Is this a normal behavior?
regards
Manfred
Loading...