Call to public subroutine yields very strange error message... (ViP Specific)
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.ClearEnd 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