On Apr 23, 2006, at 7:50 PM, Charles Ross wrote:

I have the following function, which I want to return to the caller the number of tabs in a TabPanel.

Function TabCount(extends t as TabPanel) As Integer
  dim i as Integer = 1
  dim capt as String
  do
    try
      capt = t.Caption(i)
    catch err as OutOfBoundsException
      return i
    end try
    i = i + 1
  loop
End Function


Whenever I run the program, I get an OutOfBoundsException at the line that sets capt. Why isn't this being caught?

I just tested this code, and the exception was caught. I'm using the current release of REALbasic.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to