[brailleblaster] Re: "Views" that aren't really Views

  • From: Chris von See <chris@xxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Sat, 11 Jun 2011 17:56:49 -0700

I'm not at my computer, but I *think* you should be able to look at the Modify 
and ExtendedModify interfaces in the org.eclipse.swt.events package. Those 
interfaces represent the arguments sent to the respective listeners. You might 
want to check the listener interfaces themselves to verify.

Chris
-- 
Sent from my Android phone.

"John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx> wrote:

That is basically what I was thinking of. The underlying model is a xom 
representation of an xml or utd file. As changes are made through the 
StyledTexts in the DAISY and Braille views they are immediately made 
also in the underlying xom representation. This representation consists 
essentially of nested ArrayList's with the members of each list being 
paricular objects. A node, for example, contains another ArrayList for 
its children and various attributes, ec. When a new document is created 
an empty xom representation is created. This is updated continuously as 
the two views are edited. Similarly, when an existing xml or utd 
document is opened, a xom representation is created and its contents 
presented in the two views for reading and editing. Thus the methods 
which manipulate the xom representation can easily keep track of whether 
a document has been changed. It has nothing to do with StyledText 
directly.

I think this answers some of the concerns of both Michael and Susan.

Where can I find some documentation on ExtendedModify? the StyledText 
doc doesn't even say how they differ.

Well, we are making progress, getting things clarified.

John

On Sat, Jun 11, 2011 at 05:29:34PM -0700, Chris von See wrote:

> You can keep the backing data store synchronized with the data in both 
> the braille and text view using the methods in the extended modify 
> listener. Both views will probably need to share an undo/redo stack in 
> order to ensure the integrity of the data.

> 
> Chris
> -- 
> Sent from my Android phone.
> 
> Susan Jolly <easjolly@xxxxxxxxxxxxx> wrote:
> 
> The StyledText widget does not by default present a View of an underlying 
> document in the MVC sense. It works with a physical copy of the text of the 
> underlying document that it has obtained via its setText method.
> 
> If you really want a proper MVC View, then, as I tried to make clear 
> yesterday, you need to define your own content model (which has to satisfy 
> the StyledTextContent interface) and use the StyledText setContent method to 
> tell the widget to use your content model rather than its default.
> 
> There are probably more sophisticated ways of doing this with JFace since I 
> think that Eclipse itself uses a true MVC paradigm.
> 
> Susan 
> 
> 

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


Other related posts: