set stack rect in startup handler

Martin Baxter mblivecode at harbourhosting.co.uk
Mon Mar 24 14:13:24 EDT 2014


Hi Phil,

That's correct, although as Craig pointed out you can run the startup
handler in the IDE from the message box, which I did on his suggestion
as a test.

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

On 24/03/14 17:51, Phil Davis wrote:
> If I remember correctly, the startup message isn't available to our
> stacks in the IDE. Otherwise (in standalones) it should be.
> 
> Phil Davis
> 
> 
> On 3/24/14, 7:21 AM, Martin Baxter wrote:
>> This:
>>
>> on startup
>>    set the rect of this stack to "100,100,300,300"
>> end startup
>>
>> Does not seem to work in version 6.6 (at least for me, on Linux)
>>
>> Obviously the idea is to set the initial position of an application
>> window.
>>
>> What happens is that the window is correctly sized to 200 * 200 px, but
>> the specified position on screen is not honoured. The stack window may
>> open centered or displaced by whatever other windows are already open.
>> Setting the loc doesn't seem to work either.
>>
>> This worked for me in 6.5.2 and earlier.
>>
>> I'm thinking this is a bug, does anyone else have any insight on this?
>>
>> Martin





More information about the use-livecode mailing list