Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 03 MAR 1998 02:29:29PM Ken Wachs wrote:

I have a public sub which clears out the selected items in a list box object that I pass to it(i.e. ClearSelectedItems(ListBoxObject)).

From most places in my application, I can access and use this sub without difficulty. Certain calls, however, yield the error message 'Illegal pass by value: ListBoxObject'.

Where does this error message come from? Why does it happen only occasionally?

Thanks,

Ken Wachs


At 03 MAR 1998 05:45PM Stephen Bellefontaine Revelation wrote:

Hello Ken,

I was able to reproduce the error message you were getting.

In the following example I created two AppWindows.

AppWin1 had a Listbox(List1), CommandButton(CmdClrList), and another CommandButton(CmdNextWin).

On AppWin2 I had one CommandButton(Cmd2ClrList)

Here's the code …

1. Appwin1 Public Module

Option Public

Dim PubList as Listbox

Sub ClearList

PubList.Clear

End Sub

2. AppWin1 Init Event

Set PubList=List1

3. AppWin1 CmdClrList Click Event

ClearList

4. AppWin1 CmdNextWin Click Event

Call OpenAppWindow("AppWin2",False)

5. Draw a Listbox on AppWin1 called List1 and add some entries.

6. AppWin2 Cmd2ClrList Click Event

ClearList

After running and pressing either Clear List Button, the Listbox on AppWin1 clears.

Hope this helps,

ViP/DX Tech Suport

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/2f1c55af5c2368b1852565bc006b11e1.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1