pete at lcsql.com
Wed Mar 20 15:28:33 EDT 2013
That's my confusion too. I have several places where I adjust the
content/appearance of controls on the card and that all works fine, only
sending a message to a control seems to cause a problem.
It seems like the stack is in some partial state of initialization during
preOpenCard where it's OK to do some things with controls but not others.
Adding to the confusion was the fact that "it" contained "handled" after I
changed the send to a dispatch command but the mouseUp logic still wasn't
executed; I would have at least expected it to be "not handled".
Bottom line for me is that if it's not OK to send mouseUp to a button
during preOpenCard, that's fine as long as an error is flagged when you do
it. Maybe this fits into Monte's thread of changing the way error handling
works in LC.
lcSQL Software <http://www.lcsql.com>
On Wed, Mar 20, 2013 at 12:10 PM, Scott Rossi <scott at tactilemedia.com>wrote:
> 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.
> 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
> >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
> >> call
> >> handlers in it, but it's not yet associated with an on-screen object.
> >> pre
> >> handlers exist so that you can set things up before the objects take
> >> --
> >> 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:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode