altID

Richard Gaskin ambassador at fourthworld.com
Mon May 28 16:50:05 EDT 2007


David Bovill wrote:

 > On 28/05/07, Richard Gaskin <ambassador at fourthworld.com> wrote:
 >> If you're referring to sub-components within a group which is acting
 >> as a custom control, do you really want users to be able to rename
 >> those? If there's a need, would it make more sense to do so as a
 >> property setting of the containing group, where it could be managed?
 >
 >  An example for me would my my "tree view", or your "table view" -
 > a user may place a couple of these on a card and then want to script
 > them easily.
 >
 > Yes, they can refer to "the tree_Field of group 1". But this is
 > forcing the user to use a new form of syntax which they may not be
 > used to - so I'd like them to be able to rename the field to whatever
 > they like - now the field is part of a group with a title with drop
 > down menus and context menu for the lines... - that group is called
 > the "tree view".

A matter of preference I suppose.  Built-in compound objects like 
scrolling fields don't let you name the scrollbar control, but instead 
have you set a property of the field which in turn affects its attached 
scrollbar.

But if you find it easier to let the user address subcomponents 
directly, I see no harm in it.

For myself, when I make a compound custom control I treat it as a black 
box as much as possible, providing an API for its use and leaving what 
goes on under the hood up to the object.

-- 
  Richard Gaskin
  Lead Programmer, ResearchWare Inc.
  __________________________________
  richard at researchware.com




More information about the use-livecode mailing list