Yes, and the code works fine for exiting now, but the TXBrowse won't work properly.
As a test, I added a TXBrowse to the sample program resmenu.prg (provided with FiveWin). I got exactly the same behavior -- the oWnd:End() works fine, but not the action AutoEdit(). Here is the complete code exactly as I have it. It should compile if you place it in your \FWH\Samples\ folder:
// Using PullDown Menus from resources
#include "FiveWin.ch"
#include "ResMenu.ch" // Some IDs for this Test
#include "xbrowse.ch"
#include "InKey.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
REQUEST DBFCDX
rddsetdefault( "DBFCDX" )
USE CUSTOMER NEW
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 75 ;
TITLE "Using Menus from resources" ;
MENU BuildMenu() MDI
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu, oItem
DEFINE MENU oMenu RESOURCE "Main"
REDEFINE MENUITEM oItem ID ID_ABOUT OF oMenu ;
ACTION MsgInfo( "About FiveWin" )
REDEFINE MENUITEM ID ID_TEST OF oMenu ACTION AutoEdit()
REDEFINE MENUITEM ID ID_EXIT OF oMenu ACTION oWnd:End()
REDEFINE MENUITEM ID ID_DELETE OF oMenu ACTION MsgInfo( "ok: Delete" )
return oMenu
//----------------------------------------------------------------------------//
STATIC FUNCTION AutoEdit()
local oChild, oBrw, oCol
local nFor
DEFINE WINDOW oChild TITLE "Auto edit browse" MDICHILD OF oWnd
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:SetRDD()
for nFor := 1 to len( oBrw:aCols )
oCol := oBrw:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next
oBrw:CreateFromCode()
oChild:oClient := oBrw
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
RETURN NIL
[/code]