Hello everyone,

I am trying to implement completion for proto objects. Proto extends environment in a hierarchical way. Thus completion should list all the names in all it's parent environments.

For "normal" classes defining names.class would do the job, but completion for "environment" is hard coded in utils:::specialCompletions by means of base::ls(). As result defining names.proto does not work.

I tried to make "ls" generic and to do something like:

environment(ls.default) <- asNamespace('utils')
environment(ls) <- asNamespace('utils')
environment(ls.proto) <- asNamespace('utils')

That does not work either.

Is there a way to make utils:::specialCompletions use my "ls" instead of "base::ls"??

I know Deepayan Sarkar is working now on improving the completion system (potentially by introducing "completion" generic). That would definitely solve the problem. But for now, does a quick fix exist?

Thanks a lot,
Vitalie

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to