Compile function NDW_EDIT_TEXT_EVENTS(CtrlEntId, Event, @PARAMS)
#pragma precomp SRP_PreCompiler
#window NDW_EDIT_TEXT

Declare subroutine Set_Property, Send_Event, End_Dialog
Declare function   Get_Property

GoToEvent Event for CtrlEntId else
    // Event not implemented
end

Return EventFlow or 1

//-----------------------------------------------------------------------------
// EVENT HANDLERS
//-----------------------------------------------------------------------------

Event WINDOW.CREATE(CreateParam)
    
    Set_Property(@Window:'.EDB_TEXT', 'TEXT', CreateParam)
    
End Event


Event WINDOW.CLOSE(CancelFlag, Arg1)
    
    Response = Get_Property(@Window, '@RESPONSE')
    End_Dialog(@Window, Response)
    
end event


Event PUB_OK.CLICK()
    
    Text = Get_Property(@Window:'.EDB_TEXT', 'TEXT')
    Set_Property(@Window, '@RESPONSE', Text)
    Send_Event(@Window, 'CLOSE')
    
end event

