Making "Wells": Whose Control Is It Anyway?

J. Landman Gay jacque at hyperactivesw.com
Wed Feb 23 13:04:16 EST 2005


On 2/23/05 9:04 AM, Jerry Balzano wrote:

> Rev Users -
> 
> I have to say I'm a little jealous ... a posting headed "OT: Help with 
> motivation" gives rise to a thread of over 20 messages,

That's because we can write that stuff off the top of our heads without 
having to look up anything, or even do any focused thinking. ;)

> and I can't even 
> get a little nibble with an actual scripting question here [see below].

Check out the "dragEnter" system message. If you are doing a drag 
operation (as opposed to a "grab",) you should get a dragEnter message 
every time the cursor enters another object. If your dragEnter handler 
is in the card or stack script, it can check "the target" to see which 
object the cursor is in.

> 
>     - gjb
> 
> On Feb 22, 2005, at 11:25 AM, Jerry Balzano wrote:
> 
>> While I have the precious time and attention of those (many) who are 
>> more expert in Rev than I:  I'm still struggling with what looks like 
>> the inelegance of my solution to a kind of pseudo 
>> dragging-and-dropping of these groups.
>>
>> Here's the situation: say the user is dragging a green group.  Other 
>> grouped controls on the card have green "slots" (actually fields with 
>> different text color) that need to signal that they will "accept the 
>> drop" of the green group, which they do by hiliting their border 
>> (actually turning off their threeD property temporarily).  Since I 
>> have an object attached to my cursor (the green group I'm dragging), 
>> no handlers in the other controls on the card will get triggered 
>> (right?), so I seem to have no choice but to iterate over the 
>> controls, and do a test inside the original green-group handler (or — 
>> gasp — inside an "idle" handler) like
>>     if the mouseLoc is within the rect of control i
>>     then set the threeD of control i to false
>>
>> I foresee this "solution" scaling badly as the number of controls on 
>> the card increases.  But I don't at the moment see a better one.  Is 
>> there?
>>
>> Thanks again to listmembers for sharing your expertise with me,
>> Jerry
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 
> 


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list