Re: [go-nuts] defer func running timing

2022-06-26 Thread Suresh Tupakula
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

[go-nuts] Re: find hwnd on win 10

2022-06-26 Thread Howard C. Shaw III
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.

[go-nuts] Re: find hwnd on win 10

2022-06-26 Thread Robert Solomon
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"

Re: [go-nuts] defer func running timing

2022-06-26 Thread Lee Chou
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