Hi Lee,
All the defer functions are pushed into stack. When unwinding the stack ,
the last function pushed comes out first and hence you see the execution
order is reversed
On Sun, Jun 26, 2022 at 2:11 AM Lee Chou wrote:
> Hello,
>
> https://go.dev/play/p/J1tVplkIrjt
>
> why o1.Ref print `2`
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforegroundwindow
"The system restricts which processes can set the foreground window. A
process can set the foreground window only if one of the following
conditions is true:
- The process is the foreground process.
The following code will flash the found window on the task bar, but will
not show it so I can see it. I'm looking for something that is similar to
takecommand by JPSoft, which has an activate command that will make the
desired window pop up and be active.
package main
import (
"flag"
"f
Thanks for taking time. It's really big help. I understand what exactly
happened.
best regards
- lee
在2022年6月26日星期日 UTC+8 05:11:29 写道:
> Maybe it's clearer if you look at what's happening like this
> https://go.dev/play/p/jAia9OPJfbY
>
> The arguments to defer are evaluated immediately, but t