Sending mouseUp

dunbarx at aol.com dunbarx at aol.com
Wed Mar 20 16:33:29 EDT 2013


Scott.


I think from the original discussion, the card is not really "live" yet, in that it has not been loaded into memory. So the object exists, but has not arrived. This is earlier than what you characterized as simply not shown yet. Rather, it isn't yet. The "mouseUp" message would have been sent into the ether, and would not have thrown an error, just as if you say:



send "mouseUp" to this card



where no handler exists to trap it.


As I understand from Peter's original post, he did not send the message to an explicitly identified button, which I assume would indeed have thrown an error. Or at least it should have. The only strange thing, derived from my incomplete understanding of just what and when stuff is in existence when "preOpencard" runs, is why the "dispatch" command showed "handled". So, similar to my little test above:



on mouseUp
   dispatch "mouseUp" to this card --no handler anywhere
   answer it
end mouseUp


yields "unhandled". As it should.


Craig 





-----Original Message-----

From: Scott Rossi <scott at tactilemedia.com>
To: LiveCode Mail List <use-livecode at lists.runrev.com>
Sent: Wed, Mar 20, 2013 3:12 pm
Subject: Re: Sending mouseUp


Maybe I'm missing a subtlety of Mark's reply, but unless an object is
being created dynamically, it should be configurable during preOpenCard.
The whole reason for the preOpenCard message in the first place is to be
able to initialize/format stuff on the card before showing it.  Now if a
control hasn't yet been *created* that's one thing, but otherwise you
should be able to configure controls before the card is displayed.

Hope I'm not confusing the issue.


Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design




On 3/20/13 11:43 AM, "Mike Bonner" <bonnmike at gmail.com> wrote:

>Oh duh. So even if its a send in time, and the control DOES exist by the
>time the send kicks in, the underlying stuff doesn't get set right when
>the
>send is queued so it doesn't work?  That actually makes sense.
>
>Think I'm going to start changing how I structure things from now on.
>
>
>On Wed, Mar 20, 2013 at 12:21 PM, Mark Wieder
><mwieder at ahsoftware.net>wrote:
>
>> Peter Haworth <pete at ...> writes:
>>
>> > I guess I'm just very suspicious of anything other than really
>> > straightforward commands in preOpenCard now.
>>
>> Well, here's the thing. It's *pre*OpenCard because the card and its
>> controls
>> haven't been instantiated yet. So sending a message to a control that
>> doesn't
>> officially exist shouldn't work. The script is there in memory, so you
>>can
>> call
>> handlers in it, but it's not yet associated with an on-screen object.
>>The
>> pre
>> handlers exist so that you can set things up before the objects take
>>form.
>>
>> --
>>  Mark Wieder
>>  mwieder at ahsoftware.net
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
>



_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list