Sunday, February 24, 2008

GUI Scheme Programming Tip: Drag and Drop Capability

Here's a tip - if you're looking to develop a desktop GUI application in Scheme and you need to have drag 'n drop capability, you should be looking into the pasteboard object in PLT's MrEd library.

This took me a while to find, as I made too very poor asumptions:

  1. An Editor widgetw would be useful just for text editing
  2. A pasteboard had something to do with Cut-And-Paste

Both of these assumptions were wrong, and if I had read through the manual a bit further I would have found the following:

Programs that need a canvas with dragable objects -- The drawing toolbox provides a generic drawing surface for plotting lines and boxes, but many applications need an interactive canvas, where the user can drag and resize individual objects.

Which is just what I wanted.

Luckily, the kind folks on PLT mailing list striaghtened me out in a hurry.

2 comments:

  1. Anonymous1:34 PM

    Neat, what kind of gui app are you developing in scheme? Anything you can discuss?

    ReplyDelete
  2. It's for an i2x client, so until we launch it, it has to stay hush-hush.

    Though, when I do launch it, I'm sure I'll share a bit about my experience with using MrEd/Scheme.

    Thanks for the interest.

    ReplyDelete