dcorking / google-wave-resources

Automatically exported from code.google.com/p/google-wave-resources
0 stars 0 forks source link

Adding an event that gets fired when a user changes the blip into edit mode #691

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hey,

I'm not quite sure if I wasn't able to find this kind of event, but I think 
it would be nice to be able to recognize if a user is switching a blip into 
edit mode. I know I can track changes with the DocumentChanged event, but I 
think it's a slight overkill if you just want to get one event when the 
user switches the blip into edit mode (maybe somehting comparable to the 
onBlipSubmitted event). Maybe there is a possibility to restrict the firing 
of an event with the DocumentChanged event to just this case, but I haven't 
really found a way to do that in Java yet. 

Besides, how do you use event filtering with Java, haven't really found 
anything about it explicitly?

Greets 

Stephan

Original issue reported on code.google.com by stephan....@gmail.com on 22 Mar 2010 at 2:20

GoogleCodeExporter commented 9 years ago
What is the use case for wanting to know when they switch into edit mode?

Gadgets can do this now, by the way, using the setModeCallback. So you could 
have a 
robot that listens to an indication from a gadget that it has changed its mode, 
as a 
workaround. I am curious to know the use case for this request, however.

Thanks!

Original comment by pamela.fox on 24 Mar 2010 at 11:26

GoogleCodeExporter commented 9 years ago
Well, right now I'm writing a robot for using Latex in wave. If somebody is 
clicking
the done button, the robot will search through the blip for any Latex Code and
replace it with the rendered Latex image. What I want to do is being able to 
convert
the image back to the Latex Code if the user starts to edit the blip. Right now 
I
solved this issue by reacting to the onDocumentChange event, but in my opinion 
this
is very unefficient. I don't need to get notified whenever there is a change in 
the
blip, I just need to know when the user starts the editing. In addition, there 
are
cases when a user presses done (the rendered image is put into the blip by 
calling
the onSubmittedBlip event) and another robot for example triggers the
onDocumentChanged event right afterwards. Then the image is replaced with the 
Latex
code which can be very annyoing. 

In general, I would just need to be able to react when the user the user starts
editing a blip. Then I could replace the images with the Latex code to enable 
the
user to change it if he wishes to. 

I noticed that you could achieve this by adding gadgets, but I don't really 
want the
code to be cluttered with gadgets. I use this robot right now for writing down 
a lot
of formulas and I don't think this is the best way to do this.

Hope these information help to show somewhat what I mean.

Greets

Stephan

Original comment by stephan....@gmail.com on 24 Mar 2010 at 11:49

GoogleCodeExporter commented 9 years ago
I understand. I think a better design for a LaTex robot would be to have the 
user write 
the LaTex code, and then to constantly export the LaTex out to a PDF or an 
HTML. 

I will file the request, however, and see if it's a possibility.

Original comment by pamela.fox on 25 Mar 2010 at 2:37