draw/paint tools in standalone?

Marielle Lange mlange at lexicall.org
Tue Feb 21 15:17:19 EST 2006


Erik Hansen wrote:

> --- Dan Shafer <revolutionary.dan at gmail.com>
> wrote:
>
>> Actually, I suspect that for your app to
>> contain drawing tools, it's
>> going to have to create a palette of its own
>> and manage the process
>> inside your application. The Rev IDE tools only
>> operate within the IDE
>> as far as I know.
>>
> has this been done?
> is there a plugin for sale?

I have written some code to implement your own "pointer" mode  
(selecting an object reveals handles, grabbing the handles let you  
move the object around, resize it), along with basic functions for  
drawing lines and circles. If you still need this, please contact me  
privately for information.

> Once upon a time I started down the road of making a universal  
> drawing tool palette, but in the real world I've found that each  
> app requires something a little different, so I'm not sure it can  
> usefully be done as a one-size-fits-all.

> And then there's the question of how to handle the other properties  
> (line size, fill/back color/pattern, etc.) -- in the same palette a  
> la FileMaker, or in a separate palette that eats up a ton of screen  
> space a la Flash.  Decisions, decisions....
>
> Fortunately it's not too difficult to slap one together from  
> scratch when you need it; mildly tedious if you do it more than  
> once, but if you make enough of them it becomes second nature after  
> a while.

You can have both the FileMaker and Flash options at hand, to choose  
from if you take an object-oriented + MVC approach to the problem.  
You then subdivise a big palette into smaller chunks with limited  
functionalities and you write some generic code for assembling the  
chunks within a toolbar or a palette format. Surprisingly easy to do  
with revolution once you resist the temptation to write your code at  
the smallest object level and to rather write everything at group  
level, with  a dispatching function at group level to identify which  
object has been pressed. With such an approach, it becomes a breeze  
to  to reuse the same widgets in various applications.

Marielle

------------------------------------------------------------------------ 
--------
Marielle Lange (PhD),  Psycholinguist

Alternative emails: mlange at blueyonder.co.uk,

Homepage                                                            
http://homepages.widged.com/mlange/
Easy access to lexical databases                    http:// 
lexicall.widged.com/
Supporting Education Technologists              http:// 
revolution.widged.com/wiki/




More information about the use-livecode mailing list