I would be fine with a form_loaded event. Currently I have no need of
it, but it's entirely possible someone else (including some future me)
would have a use for it.

Anyway, it would be Real Nice if pshow posted to the event queue and
wd processing continued. And if the form_loaded event accomplished
that, I'm all for it. However, looking at the implementation, which
seems to be:

https://github.com/jsoftware/qtide/blob/master/lib/wd/wd.cpp#L904

and

https://github.com/jsoftware/qtide/blob/master/lib/wd/form.cpp#L513

and

https://doc.qt.io/qt-5/qwidget.html#show

I'm still not seeing the mechanism which causes the wd command chain
to cease processing wd commands.

Or perhaps you're saying that QT would need a form_loaded event for wd
to continue processing in this context?? If I understand correctly, it
does not have such an event but apparently we could synthesize one by
overriding the implementation of QWidget::showEvent(QShowEvent *)?

Thanks,

--
Raul

On Sat, Jan 21, 2023 at 5:40 AM bill lam <bbill....@gmail.com> wrote:
>
> pshow post a message to event queue and returns. The window will be
> realized and visible after cascaded events so pshow itself has no control
> on it.
>
> IMO in the spirit of event driven programming, it would better to have a
> form_loaded event that you can query properties of the form or whatever you
> want to do inside the event.
>
>
> On Sat, 21 Jan 2023 at 6:17 PM Raul Miller <rauldmil...@gmail.com> wrote:
>
> > Doesn't asynchronous mean that pshow would show the window after the
> > wd command exited?
> >
> > If so, would it make sense to have some sort of "continue" or
> > "deferred" option on pshow, which would indicate that the developer is
> > comfortable with pshow having a delayed effect rather than cancelling
> > pending commands?
> >
> > Thanks,
> >
> > --
> > Raul
> >
> >
> > On Fri, Jan 20, 2023 at 11:51 AM bill lam <bbill....@gmail.com> wrote:
> > >
> > > I think pshow is asynchronous because the underlying Qt function it calls
> > > is also asynchronous.
> > >
> > > On Sat, Jan 21, 2023 at 12:14 AM Raul Miller <rauldmil...@gmail.com>
> > wrote:
> > >
> > > > https://github.com/jsoftware/qtide/blob/master/lib/wd/wd.cpp
> > > >
> > > > I'm looking at the implementation of wd, and I'm trying to figure out
> > > > why I can't use both pshow and qhwndc in the same sequence of wd
> > > > commands.
> > > >
> > > > Can anyone here help me understand this issue?
> > > >
> > > > Here's a demonstration:
> > > >
> > > > win_close=: {{ wd'pclose'}}
> > > > echo wd {{)n
> > > >   pc win;
> > > >   minwh 300 300;
> > > >   cc gl opengl flush;
> > > >   pshow;
> > > >   qhwndc gl;
> > > > }}
> > > >
> > > > Here, there's no result from qhwndc.
> > > >
> > > > If the pshow line is moved below the qhwndc line, the child handle
> > > > appears but the window no longer pops up.
> > > >
> > > > Of course, I can work around this issue using two invocations of wd --
> > > > but I would like to understand why this is necessary. And, currently,
> > > > I don't really know what I'm looking for. (Nor is this a documented
> > > > issue, inthe command reference --
> > > > https://code.jsoftware.com/wiki/Guides/Window_Driver/Command_Reference
> > > > -- nor anywhere else that I've noticed.)
> > > >
> > > > Any insights would be appreciated.
> > > >
> > > > Thanks,
> > > >
> > > > --
> > > > Raul
> > > > ----------------------------------------------------------------------
> > > > For information about J forums see http://www.jsoftware.com/forums.htm
> > > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to