On Wed, Sep 26, 2012 at 6:43 AM, Roger Bilau <s...@bilau.de> wrote:
> Hi,****
>
> the reason for this behaviour is the following routine:****
>
> ** **
>
> ::method onCheckboxChanged unguarded****
>
> expose Column.****
>
> use arg id, itemIndex, state****
>
> itemIndex += 1****
>
> say ID 'Checked row:' itemIndex Column.itemIndex.2 'state:' State****
>
> Column.itemIndex.4 = State****
>
> return 0****
>
> ** **
>
> Any time a row is added this method is executed. ****
>
> And here the cat biting in its own tail : list~check() cannot run before
> list~addrow and list~addrow change indirect my parameter.
>
Well, that at least makes sense. I've been going over your first post
again and again and was just about to ask: "Where the heck does this line
come from"
"200 Checked row: 1 IDNR state: UNCHECKED"
> ****
>
> ** **
>
> Any hint to solve this problem in a more elegant way than using a
> temporary parm?
>
I don't understand what it is you are trying to do, or what the problem is?
Probably, the best thing would be to not connect the onCheckboxChanged()
method until after you had added all the rows. In that way, the method
would not execute while you were adding rows. Something like:
::method initDialog****
expose Column.****
-- Get a reference to the list view.****
list = self~newListView(IDC_LISTVIEW)****
** **
list~addExtendedStyle("FULLROWSELECT GRIDLINES CHECKBOXES HEADERDRAGDROP")
****
** **
list~insertColumn(0, "Select", 25)****
list~insertColumn(1, "Column Name", 75)****
list~insertColumn(2, "Column Type", 45)****
****
do i = 1 to Column.0****
list~addRow(i, , , Column.i.2, Column.i.5)
If column.i.4 = 'CHECKED' then list~check(i-1)****
end
self~connectListViewEvent(IDC_LISTVIEW, "ONCHECKBOXCHANGE", on
CheckboxChanged)
**
This is ooDialog 4.2.0, I forget what the event connection method name is
in prior versions. Don't forget to remove the event connection
from wherever you currently have it.
--
Mark Miesfeld
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users