[plt-scheme] snips, snip-classes, and snippy questions.

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jun 20 07:54:10 EDT 2006

At Mon, 19 Jun 2006 20:42:32 -0700, Jordan Johnson wrote:
> Now, I have at least two contexts in which I'll be viewing these  
> snips:  a graph-pasteboard% showing their relationships, and one or  
> more text%s where some of them are part of a document,  
> independently.  Their appearance depends on the editor.  (A small tag  
> with a short label in the graph, a box with full text in the text  
> editor.)  It looks like I could accomplish this by checking the type of
> 	(send (send mysnip get-admin) get-editor)
> -- will this give me what I want, reliably? (And is it the most  
> direct, logical way?)

That seems ok to me.

If you always control the editor, then it's probably better to add a
method to the editor that reports the editor's view mode, instead of
using `is-a?' with text% and pasteboard%.

Matthew



Posted on the users mailing list.