[Rprotobuf-commits] r592 - in pkg: . R vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Dec 26 23:42:30 CET 2013
Author: murray
Date: 2013-12-26 23:42:30 +0100 (Thu, 26 Dec 2013)
New Revision: 592
Modified:
pkg/ChangeLog
pkg/R/00classes.R
pkg/vignettes/RProtoBuf-intro.Rnw
Log:
Update FileDescriptor '$' dispatch to work properly for the names of
fields defiend in the FileDescriptor, instead of just returning NULL
even for types returend by $ completion.
Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog 2013-12-24 00:36:31 UTC (rev 591)
+++ pkg/ChangeLog 2013-12-26 22:42:30 UTC (rev 592)
@@ -1,3 +1,10 @@
+2013-12-26 Murray Stokely <murray at FreeBSD.org>
+
+ * R/00classes.R: Update FileDescriptor '$' dispatch to work
+ properly for the names of fields defined in the FileDescriptor,
+ instead of just returning NULL even for types returned by $
+ completion.
+
2013-12-23 Murray Stokely <murray at FreeBSD.org>
* DESCRIPTION (Version): increment.
Modified: pkg/R/00classes.R
===================================================================
--- pkg/R/00classes.R 2013-12-24 00:36:31 UTC (rev 591)
+++ pkg/R/00classes.R 2013-12-26 22:42:30 UTC (rev 592)
@@ -290,7 +290,7 @@
"as.list" = function() as.list(x),
"name" = function(...) name(x, ... ),
"package" = function() x at package,
- invisible(NULL)
+ as.list(x)[[name]]
)
})
Modified: pkg/vignettes/RProtoBuf-intro.Rnw
===================================================================
--- pkg/vignettes/RProtoBuf-intro.Rnw 2013-12-24 00:36:31 UTC (rev 591)
+++ pkg/vignettes/RProtoBuf-intro.Rnw 2013-12-26 22:42:30 UTC (rev 592)
@@ -1710,10 +1710,16 @@
\end{table}
Similarly to messages, the \verb|$| operator can be used to extract
-information from the file descriptor, or invoke pseuso-methods.
+fields from the file descriptor (in this case, types defined in the
+file), or invoke pseuso-methods.
Table~\ref{filedescriptor-methods-table} describes the methods
defined for the \texttt{FileDescriptor} class.
+<<>>=
+f <- tutorial.Person$fileDescriptor()
+f
+f$Person
+@
\begin{table}[h]
\centering
\begin{small}
More information about the Rprotobuf-commits
mailing list