Dead GiD Team,
In some cases, i need to use tkwidget DWLocalSetValue to change the value as well as the state of some fields in order to handle field dependencies.
But i have observed that, when using it to change the state, when i create a material which consists of spaces as well, an error is occured. At the beginning the window is frozen, and when i reopen it, the following message is displayed:
Error message:
Any ideas how to fix it?
Thanks in advance.
Problem when using space in materials' name
Moderator: GiD Team
Re: Problem when using space in materials' name
attach a zip with your problemtype and explain how to repeat the problem (e.g. which material name are you using)
Re: Problem when using space in materials' name
I refer to OpenSees problemtype for some materials, such as Elastic, Elastic Perfectly plastic and more. This error is occured when i make a copy of the template material with a name which contains spaces (e.g. "Elastic E=30GPa" : copy of "Elastic"). This happens in every material that use a tkwidget and inside the SYNC event is used the tkwidget TK_DWSet for changing field value and state too.
TK_DWSet is actually a copy of DWLocalSetValue: just changed the variable "$state" to "$STATE" in line "$action($STATE) $GDN $STRUCT $ifld $VALUE" because with DWLocalSetValue it was returing error.
Although, without spaces in the name, it works fine.
problemtype:
TK_DWSet is actually a copy of DWLocalSetValue: just changed the variable "$state" to "$STATE" in line "$action($STATE) $GDN $STRUCT $ifld $VALUE" because with DWLocalSetValue it was returing error.
Although, without spaces in the name, it works fine.
problemtype:
Re: Problem when using space in materials' name
We have fixed it for next official version 13.0.4, and next developer version 13.1.8d
1- In these versions TK_DWSet of your problemtype is unneded, you can invoke again DWLocalSetValue
(the wrong variable name $state -> $STATE, as you pointed)
2- About the problem with dependencies, creating a material with spaces in its name, the fix are these changes in scripts/DataWindows.tcl (done in next versions):
if [catch "$GidData($iproc) CLOSE $GDN [list $TYPE] [list $QUESTION]" result] {
->
if [catch {$GidData($iproc) CLOSE $GDN $TYPE $QUESTION} result] {
if {[catch {set result [{*}$GidData($TYPE,TKWIDGET,$idx) $Ev $GDN [list $TYPE] [list $GidData($TYPE,QUESTION,$idx)] {*}$args]} msg]} {
->
if {[catch {set result [{*}$GidData($TYPE,TKWIDGET,$idx) $Ev $GDN $TYPE $GidData($TYPE,QUESTION,$idx) {*}$args]} msg]} {
if [catch "$GidData($iproc) SYNC $GDN [list $StructName] [list $QUESTION]" result] {
->
if [catch {$GidData($iproc) SYNC $GDN $StructName $QUESTION} result] {
1- In these versions TK_DWSet of your problemtype is unneded, you can invoke again DWLocalSetValue
(the wrong variable name $state -> $STATE, as you pointed)
2- About the problem with dependencies, creating a material with spaces in its name, the fix are these changes in scripts/DataWindows.tcl (done in next versions):
if [catch "$GidData($iproc) CLOSE $GDN [list $TYPE] [list $QUESTION]" result] {
->
if [catch {$GidData($iproc) CLOSE $GDN $TYPE $QUESTION} result] {
if {[catch {set result [{*}$GidData($TYPE,TKWIDGET,$idx) $Ev $GDN [list $TYPE] [list $GidData($TYPE,QUESTION,$idx)] {*}$args]} msg]} {
->
if {[catch {set result [{*}$GidData($TYPE,TKWIDGET,$idx) $Ev $GDN $TYPE $GidData($TYPE,QUESTION,$idx) {*}$args]} msg]} {
if [catch "$GidData($iproc) SYNC $GDN [list $StructName] [list $QUESTION]" result] {
->
if [catch {$GidData($iproc) SYNC $GDN $StructName $QUESTION} result] {