The syntax you show for the file matches mine. Im guessing that my issue is coming from the javaprotobuffer implementation that I am using. I am using this custom one that outputs to JavaME http://code.google.com/p/protobuf-javame/
To my knowledge it was just a wrapper around protocol buffers so I assumed i had all the same functionality. I guess I dont, i'll have to try to post on their support since it appears its not a general protocol buffers issue Thank you for your help! stephanie On Mar 16, 3:39 pm, Jason Hsueh <jas...@google.com> wrote: > I'm not familiar with that error. Can you provide the protoc command you are > using, as well as the output of protoc --version? And is your .proto file > simply: > > message Foo { > optional bool getA = 1 [default = true]; > > > > } > On Wed, Mar 16, 2011 at 12:28 PM, steph <preston....@gmail.com> wrote: > > The error text i get is: > > > Error the .proto-file is invalid, content: optional bool > > getA = 1 [default = true];, line number: 2 > > > On Mar 16, 3:25 pm, Jason Hsueh <jas...@google.com> wrote: > > > On Wed, Mar 16, 2011 at 12:17 PM, steph <preston....@gmail.com> wrote: > > > > I want to have a bool value default to true but I cant seem to make it > > > > do that. As stated in the protocol buffer documentation bools default > > > > to false. However since i'm able to set default values on types i want > > > > to set the defautl value of my bool types to true. > > > > > Here is what i've tried: > > > > > optional bool getA = 1 [default = true]; > > > > This first one should work. What did you observe when using this? > > > > > optional bool getA = 1 [default = TRUE]; > > > > > optional bool getA = 1 [default = 1]; > > > > > none of these worked for me. How can i set the bool to default to > > > > true? > > > > > thanks, > > > > steph > > > > > -- > > > > 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.-Hide quoted text - > > > > - Show quoted text - > > > -- > > 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.- Hide quoted text - > > - Show quoted text - -- 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.