It is working for me.

Here's a sample wave:
https://wave.google.com/a/wavesandbox.com/#restored:wave:wavesandbox.com!w%252BA2lBOy1DA

<https://wave.google.com/a/wavesandbox.com/#restored:wave:wavesandbox.com!w%252BA2lBOy1DA>Here's
the Python code that I used:
 17 |       blip = event.blip
 18 |       blip.append("Hey! I'm alive!")
 19         line = element.Line(indent=2,
alignment=element.Line.ALIGN_CENTER)
 20         blip.append(line)
 21         blip.append('Hello!')

Here's the JSON logs:

[{"params": {"capabilitiesHash": "0xfb9cd66"}, "method":
"robot.notifyCapabilitiesHash", "id": "0"}, {"params": {"blipId":
"b+A2lBOy1DB", "waveletId": "wavesandbox.com!conv+root", "waveId":
"wavesandbox.com!w+A2lBOy1DA", "modifyAction": {"modifyHow":
"INSERT_AFTER", "values": ["Hey! I'm alive!"]}}, "method":
"document.modify", "id": "op2"}, {"params": {"blipId": "b+A2lBOy1DB",
"waveletId": "wavesandbox.com!conv+root", "waveId":
"wavesandbox.com!w+A2lBOy1DA", "modifyAction": {"modifyHow":
"INSERT_AFTER", "elements": [{"type": "LINE", "properties": {"indent":
2, "alignment": "c"}}]}}, "method": "document.modify", "id": "op3"},
{"params": {"blipId": "b+A2lBOy1DB", "waveletId":
"wavesandbox.com!conv+root", "waveId": "wavesandbox.com!w+A2lBOy1DA",
"modifyAction": {"modifyHow": "INSERT_AFTER", "values": ["Hello!"]}},
"method": "document.modify", "id": "op4"}]


On Thu, Mar 18, 2010 at 10:12 PM, Jason <[email protected]> wrote:

> I've been working with the Line object in the new Java API.
>
> My robot can tell the client that something should be lineType 'h1' or
> whatever, but it can't make the client indent or align text.
>
> The outgoing JSON contains appropriate messages, for example:
>
>  "1493":{"type":"LINE","properties":{"indent":"2"}},
>
>  "1506":{"type":"LINE","properties":{"alignment":"c"},
>
> but the web client ignores it.
>
> Further, if such a line element occurs somewhere before an image or
> gadget, the web client seems not display the subsequent image/gadgets
> either!
>
> Can anyone else corroborate this?
>
> thanks .. Jason
>
>
>
> On Mar 2, 3:09 am, Byron <[email protected]> wrote:
> > What is the "new API"?
> >
> > I tried to write a TOC Generator robot that would read all the
> > headings in the main blip and create a Table of Contents accordingly.
> > This wasn't working, because I couldn't read aStyledTextheading.
> > Right now my bot ([email protected]) just outputs debug information
> > for all the Styles and Annotations, but I'm still not seeing anything
> > for the headings.
> >
> > Do I have to use/deploy a different version of the Java Client Robot
> > API?
> >
> > Thanks,
> >
> > -Byron
> >
> > On Feb 2, 2:38 pm, "pamela (Google Employee)" <[email protected]>
> > wrote:
> >
> >
> >
> > > Yes, it should work in the new API. It uses the setting of style
> > > annotations instead of the specialStyledTextclasses.
> >
> > > On Tue, Feb 2, 2010 at 10:24 AM, Jason <[email protected]> wrote:
> > > > There are various bugs which have been reported relating to styled
> > > > text, including:
> >
> > > > [  3]
> http://code.google.com/p/wave-robot-java-client/issues/detail?id=3
> > > > [ 12]
> http://code.google.com/p/wave-robot-java-client/issues/detail?id=12
> > > > [ 85]
> http://code.google.com/p/google-wave-resources/issues/detail?id=85
> > > > [341]
> http://code.google.com/p/google-wave-resources/issues/detail?id=341
> > > > [349]
> http://code.google.com/p/google-wave-resources/issues/detail?id=349
> >
> > > > In my experience, there are 2 problems:
> >
> > > > (1) the java robot client api doesn't read the various line types,
> > > > indentation levels, alignment or display direction as Annotations
> >
> > > > (2) if you useStyledTextwith a StyleType to try to set line type,
> > > > indentation level, alignment or display direction, the rich client
> > > > doesn't honour the resulting json sent in the OperationMessageBundle
> >
> > > > I just wanted to check that this is expected to be fixed in the
> > > > Valentines api release?
> >
> > > > thanks .. Jason
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> Groups "Google Wave API" group.
> > > > To post to this group, send email to
> [email protected].
> > > > To unsubscribe from this group, send email to
> [email protected]<google-wave-api%[email protected]>
> .
> > > > For more options, visit this group athttp://
> groups.google.com/group/google-wave-api?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Wave API" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-wave-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-wave-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en.

Reply via email to