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

Re: Dragging nodes



In article <JAMESJ.91Aug29114500@bert.cs.byu.edu> jamesj@bert.cs.byu.edu (JAMES JEREMIAH WAYNE ) writes:

	I am new to MCL, so this message may very well display my ignorance.  I
   would like to represent an undirected graph in a window which is freely
   alterable by the user.  That is, I would like to let the user add and delete
   nodes and edges as well as drag the nodes around to suit his/her fancy and
   trail any associated edges as a node is dragged.  This last is the problem.
   MCL does not seem to have the functions I need to modify a button-dialog-item
   sufficiently to behave in this manner, and while attempting to design a custom
   dialog-item, I discovered that defpascal, which I need to write the definition
   function, appears to be crippled.  It works fine when writing functions with
   no parameters, but when I include even one parameter, the compiler complains
   about its type.  Does anyone have any ideas on how I can get around these
   problems, or possibly an entirely different approach to implementing this?


1) You shouldn't need to do anything with defpascal.

2) If there is a problem subclassing button-dialog-item, could report this
   as a bug?

3) Even if you can't subclass button-dialog-item, you should just be able
   to subclass dialog-item.  The button-dialog-item class doesn't add very
   much behavior.  To create a subclass of dialog-item, you need to define
   a small set of methods, which are described in the manual.

4) The syntax of defpascal is described incorrectly in the manual.  I don't
   know the correct syntax, but I'm sure someone else reading this does.

Hope this helps.

   -andrew