can someone help me to correct the error.
Error:= oMenu:Action( oWnd:End()) why my oWnd(Object) becomes nil.I doent want oWnd to declare static
#include "FiveWin.ch"
*-------------------------------------------------------------------*
FUNCTION main()
*-------------------------------------------------------------------*
LOCAL oWnd
DEFINE Window oWnd;
Title "ListBox";
Menu BuildMenu(oWnd)
Activate Window oWnd
RETURN nil
*-------------------------------------------------------------------*
FUNCTION BuildMenu(oWnd)
*-------------------------------------------------------------------*
LOCAL oMenu
Menu oMenu
MenuItem "File"
Menu
MenuItem "CreateList"
separator
MenuItem "Exit"
IF oWnd !=nil
oMenu:Action( oWnd:End())//ERROR//
ENDif
ENDMenu
ENDMenu
RETURN oMenu