Hi Tim and All,
Another quick question / comment
I have started to use the WindowBasic and ArgumentServer but with
unexpected side effects, for example if I add the following function as
a macro
def test(argServer=None):
if (argServer != None):
print(argServer.getCurrentPeaks())
if I call the macro with no peaks selected I get a popup window telling
me the fact. This which may not always be the desired effect...
Can I be presumptious enough to suggest that all the ArgumentServer
functions at least should be 'quiet', i.e. without gui side effects?
Obviously you may feel its to late in the day for this as people are
already using the ArgumnetServer. The other alternative would be to have
a keywoard flag for each function quiet=False
e.g.
def getCurrentPeaks(self, quiet=False):
peaks = self.parent.currentPeaks
if not peaks:
if quiet != False:
self.messageReporter.showWarning('Warning','No peaks currently
selected')
if not self.inGui:
if quiet != False:
print 'Need to define %s.currentPeaks\n' % self.parent
return peaks
regards gary
nb if you (Tim et al.) are snowed under I am happy to make the relevant modifications and submit the results back as a patch. The only question is as to what is the best policy ;-)
--
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK Tel. +44-113-3433024
email: [log in to unmask] Fax +44-113-2331407
-------------------------------------------------------------------
|