I use the gb4e package to set numbered examples. I want to put these on slides made with beamer. According to the beamer userguide I can make any command overlay specification aware using this in my preamble:
\renewcommand<>{⟨existing command name⟩}[⟨argument number⟩][⟨default optional value⟩]{⟨text⟩}
I tried to do this with gb4e's \ex command. I tried the following:
\newcommand<>{\ex}[][]{\@ifnextchar [{\@ex}{\item}}
I thought that would be right, because gb4e defines \ex as follows:
\def\ex{\@ifnextchar [{\@ex}{\item}}
With that in my preamble my document doesn't compile. Am I misunderstanding something about how this works?

\renewcommandwith\makeatletter/\makeatother. If you haven't done that in your document, it will fail to compile. – Aaron May 5 '11 at 18:41