简体   繁体   English

考虑过 Traits 名称的限制吗?

[英]Enthought Traits names limitations?

I ran into a weird problem while trying to build a Traits GUI that relies on Matplotlib.我在尝试构建依赖于 Matplotlib 的 Traits GUI 时遇到了一个奇怪的问题。 To summarize it: if, in the example here: http://www.scipy.org/Cookbook/EmbeddingInTraitsGUI , if I replace everywhere the name of the "figure" trait (which, I thought, was just a property I could name the way I want) by, eg, "figu", I get the following error: "An error occured creating a custom editor. Please contact the developer."总结一下:如果在这里的示例中: http://www.scipy.org/Cookbook/EmbeddingInTraitsGUI ,如果我在任何地方替换“figure”特征的名称(我认为,这只是我可以命名的属性我想要的方式),例如“figu”,我收到以下错误:“创建自定义编辑器时发生错误。请联系开发人员。”

Am I doing something wrong, or is that limitation documented somewhere?我做错了什么,还是该限制记录在某处?

Thanks in advance.提前致谢。

Did you remember to change the line in the MakePlot function from您是否记得将MakePlot function 中的行从

fig = editor.object.figure

to

fig = editor.object.figu

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM