Ah-ha!  Many thanks, Mike, that explains it prefectly. 

I went back and read the manual (build 6965) and yes, it did say
(effectively) don't use this. 
May I suggest that it might be better if your warning were to be more
"shouted"?
If you wish, I'll submit a patch with my preferred text.

Atb,
Oliver

 

-----Original Message-----
From: Mark Miesfeld [mailto:[email protected]] 
Sent: 14 June 2011 14:26
To: Open Object Rexx Users
Subject: Re: [Oorexx-users] ooDialog - Lost/Got Focus event not working?

On Mon, Jun 13, 2011 at 8:48 AM,  <[email protected]> wrote:

Sorry for the late reply, I was not at a computer yesterday.  A rare event
in my life. <grin>

> In the initDialog I specify:
>
>    self~connectNotifyEvent("IDC_DECNUM1","GOTFOCUS",yyyy)
>    self~connectNotifyEvent("IDC_DECNUM1","LOSTFOCUS",xxxx)
>
> Both give a zero return code.
>
> However, no matter how much I try to place focus on the edit control 
> "IDCDECNUM1", I never get the methods "xxxx" or "yyyy" invoked.
>
> Am I doing something wromg? Maybe I'm misunsderstanding what "focus" is??

You just need to change to:

    y = self~connectEditEvent("IDC_DECNUM1","GOTFOCUS",yyyy)
    x = self~connectEditEvent("IDC_DECNUM1","LOSTFOCUS",xxxx)

The connectNotifyEvent() connects a generic event.  In general, I'd say it
is less predictable to know if you will get the generic event notification
unless you understand all the nuances of how the underlying controls work.

In order to capture a notification, the notification has to be sent to the
dialog.  Almost all of the notifications we are concerned about in ooDialog
are sent by a dialog control to its parent.

In this case, the edit control sends the got and lost focus notifications to
its parent.  There is no generic message generated.
In general, if an individual control is listed as having an event, the
generic event message is not going to be generated for that event.

By the way, I just looked and in the latest ooDialog doc, for the
connectNotifyEvent()  I pretty much spell that out.

I'm not saying that to discourage questions here, please ask any and all
questions.  It is the only way to get things about ooDialog cleared up.  My
point is, that 2 or 3 years ago the above information was not to be found in
the ooDialog doc, and a lot of the doc was misleading.  That may have
discouraged people from going to the doc to get help with understanding how
to use ooDialog.  But, in the current doc I've gone a long way to try and
clarify how things work.

--
Mark Miesfeld

----------------------------------------------------------------------------
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image Editing
and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to