Good!

If I want to set a field type as Message, where I must define the
inner type?

thanks!

On Jul 26, 8:32 pm, Pherl Liu <liuj...@google.com> wrote:
> See my response in the other thread. You can set label to the
> FieldDescriptorProto.
>
> On Tue, Jul 26, 2011 at 12:31 AM, Giancarlo Frison <gfri...@chelab.com>wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I'm attempting to create descriptors dynamically for generating custom
> > message on the fly.
> > The trouble is when I have to describe a field as 'repeated' and
> > dynamically serialize and parse it.
>
> > How define 'repeated' fields?
>
> > This is how I create such descriptors (http://flori.posterous.com/
> > dynamically-creating-protocol-buffer-objects):
>
> > desBuilder = DescriptorProtos.DescriptorProto.newBuilder();
>
> > DescriptorProtos.FieldDescriptorProto.Builder fd1Builder =
> > DescriptorProtos.FieldDescriptorProto.newBuilder()
> >        .setName(fieldName).setNumber(i++).setType(type);
>
> > desBuilder.addField(fd1Builder.build());
>
> > thanks,
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Protocol Buffers" group.
> > To post to this group, send email to protobuf@googlegroups.com.
> > To unsubscribe from this group, send email to
> > protobuf+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/protobuf?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to