Re: Word Processors




>     John> Ok, I'll bite the bait.  What's the idea?  (c:
> 
> I think he's pulling a Fermat's Last Theorem on us.

Rats.  I will have to detail.

Ok, the idea is that our application should be emitting a special
"description" signal from every possible interesting place that
happens withing the program.  For Gnumeric for example, we would emit
stuff like this:

"Gnumeric:Cell:TextEntered:Col=A,Row=1:9856"
"Gnumeric:Cell:TextOverflow:Col=A,Row=1"
"Gnuemric:Column:SizeChanged:Col=A:Diff=+45pixels"
"Gnumeric:Cell:FontChanged:Col=A,Row=1:Helvetica"
"Gnumeric:File:Save:SomeFileName"

Now, we record the last N emissions of the above messages and every
time we receive one of this new notifications we run a pattern
matching engine on them, for example, we could have an expression like
this (removed the Gnumeric Prefix to simplify):

Rule:
	Cell:TextEntered:(*),(*)*
	Cell:TextOverflowed(\1,\2)*
	Column:SizeChanged(\1)*:Diff>0

Action:
	Show "It seems like you want to make the cell bigger to let
	      your text fit on the screen, you might consider double
	      clicking on the column division to let Gnumeric
	      calculate the best column width for you"

Another example would be:

Rule:
	Cell:TextEntered:(*),(*):(.*)([0-9]+)
	Cell:TextEntered:\1+1,\2:(.*)([0-9]+)
or
	Cell:TextEntered:(*),(*):Monday
	Cell:TextEntered:\1+1,\2:Tuesday

Action:
	Show "It seems like you are filling a list of data, you might
	      consider selecting the first cell and dragging with the
	      autofill button to auto-complete the text for you"
	 

This is my plan.

Best wishes,
Miguel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]