Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
Thanks. I'll apply the nice workaround for now. Romain Le 29/05/10 23:15, John Chambers a écrit : The idea of modifying .DollarNames to recognize S4 methods is OK, but the problem could arise again. It would be better to have a general solution. The general problem as it seems is that an S3 g

Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread John Chambers
The idea of modifying .DollarNames to recognize S4 methods is OK, but the problem could arise again. It would be better to have a general solution. The general problem as it seems is that an S3 generic called from within its package's namespace (or from some other 3rd package) will not detect

Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
Le 29/05/10 20:23, Deepayan Sarkar a écrit : On Sat, May 29, 2010 at 4:21 AM, Romain Francois wrote: Hello, I'm trying to make .DollarNames generic and implement a method for it in a package. .DollarNames is the function that is now called to get completion possibilities. My R code looks lik

Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Deepayan Sarkar
On Sat, May 29, 2010 at 4:21 AM, Romain Francois wrote: > Hello, > > I'm trying to make .DollarNames generic and implement a method for it in a > package. .DollarNames is the function that is now called to get completion > possibilities. > > My R code looks like this: > > setGeneric( ".DollarNames

Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
This seems to do the trick, but it does not feel right: .onLoad <- function( libname, pkgname ){ utils <- asNamespace( "utils" ) unlockBinding( ".DollarNames", utils ) assignInNamespace( ".DollarNames", .DollarNames, utils ) lockBinding( ".DollarNames", utils

[Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
Hello, I'm trying to make .DollarNames generic and implement a method for it in a package. .DollarNames is the function that is now called to get completion possibilities. My R code looks like this: setGeneric( ".DollarNames" ) setClass("track", representation(x="numeric", y="numer