[Bioc-devel] adding a validity method to a class

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Mar 31 20:20:50 CEST 2011


On Thu, Mar 31, 2011 at 2:07 PM, Paul Shannon
<pshannon at systemsbiology.org> wrote:
> Hi Steve,
>  validity=validCytoscapeWindow
> rather than
>  validity=function(obj) validCytoscapeWindow (obj)
> does not work, because the function is not defined at the time the class definition is read.  By including it in a function body, the evaluation is deferred until all the source has been read.  I suspect...
> Your second suggestion:
>  setValidity("CytoscapeWindowClass", validCytoscapeWindow)
> *does* work.  But where should such an assignment be made?  At global scope at the bottom of the class file?

Maybe right after the validCytoscapeWindow function definition

> That seems a little ragged!

You know that old chestnut about one person's ragged be another
person's ... "smooth"?

Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

More information about the Bioc-devel mailing list