MatthewASimonson / r-orange

Automatically exported from code.google.com/p/r-orange
Other
0 stars 0 forks source link

redRGUI warnings #496

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I get the following warning when the registry passes over one of my qtWidgets.

REDRCORE:WARNING : 

############################################################
Unhandled exception of type AttributeError occured at 2011-02-15 
15:55:35.403014:
Traceback:
  File: redRGUI.py, line 122 in registerQTWidgets
  Code: c = forname('libraries.%s.qtWidgets.%s' % (package,guiClass),guiClass)
    File: redRGUI.py, line 102 in forname
    Code: classobj = getattr(module, classname)
      AttributeError: 'module' object has no attribute 'canvasItems' 
############################################################

It's true that the module doesn't have a canvasItems class but I'm OK with 
that.  I know the classes that are in my module and I would like to use them.  

Is this a requirement and if so why.  It seems that I should be able to put my 
classes in any form that I want and import them as I need to.

Original issue reported on code.google.com by kylecovi...@gmail.com on 15 Feb 2011 at 10:02

GoogleCodeExporter commented 9 years ago
qtWidgets and signalClasses are controlled directories. they include classes
that other package developers may use. So if these directories exist in your
package they must contain a __init__.py file. and every other file in the
directory much have a class by the same name as the file name.

In 2.0 every file in these directories will also require a corresponding
file in meta/qtwidgets and meta/signalClasses.

If you want code specific to your package put it in a directory other then
widgets, qtwidgets, and signalClasses

Original comment by anup.parikh on 15 Feb 2011 at 10:23

GoogleCodeExporter commented 9 years ago
I think then either remove the try except and require that the qtWidget be 
named the same thing as a class inside of it and make it a real error or remove 
the warning.

from libraries.mypackage.qtWidgets.myqtwidget import someClassA, someClassB

should either be illegal or legal but not somewhere in between

Original comment by kylecovi...@gmail.com on 15 Feb 2011 at 10:51

GoogleCodeExporter commented 9 years ago
I will add this to documentation, change warning to error. I will also
required that packages submitted to our repository have the required
meta files (2.0).

Original comment by anup.parikh on 15 Feb 2011 at 10:56

GoogleCodeExporter commented 9 years ago
Cleared

Original comment by kylecovi...@gmail.com on 23 Feb 2011 at 5:58