I moved my code to preOpenStack - I still see the change in location on the
screen.  It appears I will have to resort to some subterfuge like the one
suggested by Scott, or opening the stack invisible initially to make this
work.

>From the dictionary:
"The *preOpenCard* message <dictionary/keyword/1473.xml> is sent before the
openCard <dictionary/message/1706.xml> message <dictionary/keyword/1473.xml>.
Unlike openCard <dictionary/message/1706.xml>, *preOpenCard*
handlers<glossary/h/228.xml>are
executed <glossary/e/188.xml> *before the card
<dictionary/keyword/1384.xml>appears
*. "

"The *preOpenStack* message <dictionary/keyword/1473.xml> is sent before
the openStack <dictionary/message/1709.xml>
message<dictionary/keyword/1473.xml>.
Unlike openStack <dictionary/message/1709.xml>, *preOpenStack*
handlers<glossary/h/228.xml>are
executed <glossary/e/188.xml> *before the stack window
<glossary/s/464.xml>appears
*."

I guess LC's definiton of "before" is a little different than most peoples
:-)
Pete
lcSQL Software <http://www.lcsql.com>



On Sat, Sep 22, 2012 at 12:00 PM, Peter Haworth <p...@lcsql.com> wrote:

> Thanks to all for the explanations and suggestions.  The common thread
> seems to be to use preOpenStack rather than preOpenCard so I'll move my
> code there and see what happens.
> Pete
> lcSQL Software <http://www.lcsql.com>
>
>
>
> On Sat, Sep 22, 2012 at 11:51 AM, Scott Rossi <sc...@tactilemedia.com>wrote:
>
>> FWIW, in most cases a preOpenStack or preOpenCard handler in the card
>> script of the first card should be enough to position/orient a stack.  If
>> you try to set stack properties like windowShape or shadow, those actions
>> can cause the stack to become visible before positioning takes place
>> because they affect the stack's window, but otherwise, you should be able
>> to set a stack's position before opening it.
>>
>> Setting the stack's position to the screenLoc should position the stack at
>> the stack at the center of the main monitor.  No lock screen or splash
>> stack is needed -- it should just work.
>>
>> In the case where you do need to make a change to the stack's window for
>> example, you can do something like this:
>> on preOpenStack
>>   set bottomRight of this stack to -10000,-10000 -- make sure stack is
>> offscreen
>>   set the windowShape of this stack to the id of image 1
>>   set loc of this stack to the screenLoc
>> end preOpenStack
>>
>> That's a over-simple example but the idea is just to keep the stack's
>> location off screen until you're done modifying it.
>>
>> Hope this helps.
>>
>> Regards,
>>
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX Design
>>
>
>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to