On Fri, Dec 23, 2011 at 9:14 AM, Mark Miesfeld <miesf...@gmail.com> wrote:

> 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?
>>
>
>
> 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.
>
>

This was a good catch on your part.  The more I thought about it, my intent
was really to allow the programmer to automatically connect the check box
and radio button in the same way that you could for the push button.

The last argument for a check box or radio button was undocumented, so the
programmer *could* automatically connect the CLICKED event, if he just knew
about the argument.  The existing code only checked for CONNECTRADIOS and
CONNECTCHECK and I just left it that way.

But today I got to thinking that it would just as easy to, in pseudo code:

if  argument exists then do
    if argument == CONNECTCHECKS then do
        connect using generated name
    end
    else do
        connect using argument value
    end
end

That way you can automatically connect the click event by specifying your
own method name.  CONNECTCHECKS is still okay, preserving backwards
compatibility for the RcDialog.  The programmer *can* use the connect
checks keyword, but it now makes more sense to supply your own method name.

Same thing for a radio button.

So, I fixed that in the code and fixed 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