The ooDialog Reference (build 7341) section 16.41 ~getItemInfo (ListView)
says::
    Return value:
          Returns .true on success and .false on error.

On my ListView, the user selects an item, which enables a pushbutton. On
pressing the pushbutton, the selected item is actioned. This works fine. But
if I select an item, then de-select it, then press the pushbutton, the value
-1 is returned from ~getItemInfo, and the program closes with an error. I
expected it to return .false. 

Is this an error on my part, or is the documentation incomplete? The
ooDialog Reference also says, under "Details":

    Raises syntax errors when incorrect arguments are detected.

 

The console output is:

  CustomerListView-showCustomer-01: item selected = -1
     202 *-* if lvCustomers~getItemInfo(item, info)
  Error 88:  Invalid argument
  Error 88.907:  Argument 1 must be in the range 0 to 4294967295; found "-1"

The code is:

  ::METHOD showCustomer UNGUARDED
    expose lvCustomers rootDlg
    item = lvCustomers~selected
    say "CustomerListView-showCustomer-01: item selected =" item
    info=.Directory~new
    if lvCustomers~getItemInfo(item, info) then do
      ...
    end
    else do
      say "No item selected!"
    end


 

<<attachment: winmail.dat>>

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to