View Issue Details

IDProjectCategoryView StatusLast Update
0000362ascendbuild-linuxpublic2011-02-28 15:57
Reporterart 
Assigned Toart 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSVN 
Target Version0.9.7Fixed in Version0.9.8 
Summary0000362: PyGTK interface does not recognize solver_var as a variable type
DescriptionI set variable type to be solver_var in the attached model. This model works in the TclTk interface, but the PyGTK fails to recognize this as a legal type. It is a legal type. I loaded system.a4l manually first and then my model. The type solver_var is there. I then loaded my model again, and it still did not allow that type.
TagsNo tags attached.

Relationships

related to 0000489 resolvedjohn error on right-click->"Select units" on wildcard units variable 

Activities

2008-02-07 03:59

 

vessel01.a4c (541 bytes)

john

2008-02-10 11:04

administrator   ~0000458

I need to clarify this one. I have added a file models/test/solvervar.a4c. This model loads and solves fine in the PyGTK GUI. But I can't right-click and see the units dialog for the solver_var; I get a message saying that "No dimensioned types are available yet (have you loaded a model yet?)".

Then I get an error dialog which contains details as shown below.

Is this the error that you were seeing?

---
Traceback (most recent call last):
  File "pygtk/modelview.py", line 509, units_activate(self=<modelview.ModelView instance at 0x9427fec>, *args=(<gtk.ImageMenuItem object (GtkImageMenuItem) at 0x943066c>,))
        T = self.get_selected_type()
        _un = UnitsDialog(self.browser,T)
        _un.run()
  variables: {'self.browser': ('local', <gtkbrowser.Browser instance at 0xb7ca042c>), 'UnitsDialog': ('global', <class unitsdialog.UnitsDialog at 0x93be7ac>), '_un': (None, None), 'T': ('local', solver_var)}
  File "pygtk/unitsdialog.py", line 28, __init__(self=<unitsdialog.UnitsDialog instance at 0x9731d2c>, browser=<gtkbrowser.Browser instance at 0xb7ca042c>, T=solver_var)
          self.browser.reporter.reportError("No dimensioned atom types available yet (have you loaded a model yet?)")
          raise RuntimeError("no units available")
  variables: {'RuntimeError': ('builtin', <type 'exceptions.RuntimeError'>)}
RuntimeError: no units available

2008-02-10 11:13

 

vessel01-modified.a4c (577 bytes)

john

2008-02-10 11:13

administrator   ~0000460

Ah, OK. I looked at your vessel01.a4c file. I think that the issue is that in the PyGTK GUI, the 'Library' concept is rather different. Each time you load a new model file, the library is cleared out and only model files that are included by REQUIRE statements are ever included. So you always need to explicitly

REQUIRE "system.a4l";

somewhere in your model file.

There were also some problems with the use of the 'real' type. Changing to real_constant fixed this. Let me know what you think about the new uploaded file.

john

2011-02-28 15:57

administrator   ~0000680

The problem with the properties dialog for wildcard variables appears to be solved. There is still a problem with the 'select units' dialog; have filed that as a new bug 0000489.

Issue History

Date Modified Username Field Change
2008-02-07 03:59 art New Issue
2008-02-07 03:59 art Status new => assigned
2008-02-07 03:59 art Assigned To => john
2008-02-07 03:59 art File Added: vessel01.a4c
2008-02-07 03:59 art Target release => 0.9.6
2008-02-10 11:04 john Note Added: 0000458
2008-02-10 11:08 svn
2008-02-10 11:13 john File Added: vessel01-modified.a4c
2008-02-10 11:13 john Note Added: 0000460
2008-02-10 11:15 john Assigned To john => art
2008-02-10 11:15 john Status assigned => feedback
2009-06-28 01:38 john Target Version => 0.9.7
2011-02-28 15:56 john Relationship added related to 0000489
2011-02-28 15:57 john Note Added: 0000680
2011-02-28 15:57 john Status feedback => resolved
2011-02-28 15:57 john Fixed in Version => 0.9.8
2011-02-28 15:57 john Resolution open => fixed