Hi Oliver,
On Fri, Dec 23, 2011 at 6:06 AM, Oliver Sims <
oliver.s...@simsassociates.co.uk> wrote:

> I have the following createCheckBox statement:
>
>    self~createCheckBox(IDC_CB_NODROP, 20, 70, , ,"NOTIFY LEFT", "No Drop",
> ,"CONNECTCHECKS")
>
> The generated notification method is "IDNODROP".  According to the text in
> ooDialog Reference (build 7832 p.558), it should be "NODROP".
>
> Is this a bug in the manual, in the ooDialog code, or in my code?
>

It looks like a bug in the manual.  It looks like something I forgot about
when I documented that method.  Or something. <grin>

1.) In older versions of ooDialog, if the dialog were a RcDialog, in the
new() method, there were 3 opts keywords: CONNECTBUTTON, CONNECTRADIOS, and
CONNECTCHECKS that you could use to have those 3 button types automatically
connected to the clicked event.

2.) In the code for addButton() which is the old deprecated name for the
createPushButton() method, you could optionally have the push button
automatically connected to the clicked event.

3.) However, in the addRadionButton and addCheckbox (old deprecated names
for createRadionButton and createCheckBox methods) you could not have the
automatic connection done.

4.)  A RcDialog parses the .rc script and then uses the UserDialog methods
to create the various controls.  Underneath the covers in the ooDialog
framework, the code to dynamically create all 3 types of buttons is the
same.  All this different, but related stuff, uses the same implementation
code.

So when I was refactoring the code, in this area, it didn't make sense to
me that, if it was a RcDialog, you could have all 3 types of buttons
connected automatically, but if it was a UserDialog you could only connect
a push button's clicked event in the create methods, you couldn't connect a
radio button or a check box.

Since the code was already there, I just allowed automatically connecting
radio buttons and check boxes by documenting that last, previously
undocumented, argument.

But, when writing the documentation, I forgot the underlying code is
inconsistent in that, when it is a radio button or check box, the code
pre-pends 'ID' to the constructed method name.  If it is a push button,
when the method name is constructed the 'ID' text is not pre-pended

It would be much nicer if the method name construction was the same for all
three types of buttons.  But that can't be changed because of backwards
compatibility.  I'll have to fix the documentation.

--
Mark Miesfeld
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to