set stack rect in startup handler

Martin Baxter mblivecode at harbourhosting.co.uk
Wed Mar 26 15:49:39 EDT 2014


On 26/03/14 16:55, Robert Brenstein wrote:
> On 24.03.2014 at 18:13 Uhr +0000 Martin Baxter apparently wrote:
>> Turns out that, when startup is run in the IDE, setting the stack rect
>> works as I would expect, the size and position are modified correctly.
>> But in a standalone, the stack size is set but not its position. So the
>> startup handler obviously runs, but setting the stack rect doesn't have
>> the side-effect of setting the loc.
>>
>> The same line in a preopenstack handler does work correctly however, so
>> it is specifically in a standalone's startup handler that this issue
>> appears to manifest.
>>
>> Anyway I have now bug-reported it.
>>
>> Martin
> 
> Curious that this worked in an earlier version. Isn't startup run before
> anything else? If so, it is quite likely that stack windows are not
> there yet when it runs.
> 
> RObert
> 

Hi Robert

Startup runs before any other scripts but the standalone must at least
be completely loaded into memory beforehand, in order for the startup
script to be accessible and executable.

I would expect that setting the stack rect can precede the creation of
the stack window, in the startup handler it's probably just stored as a
property, and not actually used until some time later when the window is
actually drawn.

I've been doing that in standalone startup handlers since way back, so
it is definitely 6.6 that is different.

The bug report is now marked as confirmed BTW.

Martin




More information about the use-livecode mailing list