You are here: Web Apps with Visual LANSA > 14. Widgets and 3rd Party Integration > 14.6 LANSA Mobile Application Widgets > 14.6.10 xDeviceFileDelete Widget

14.6.10 xDeviceFileDelete Widget

Delete file on mobile device.

Properties

FileName

Fully qualified name of the file to be deleted.

Methods

Delete

Delete the file

Events

Completed

Triggered when file deleting is finished.

Name

Type

Description

Status

Enum

See Status Code

Message

String

 

 

Code Examples

Define_Com Class(#xDeviceFileDelete) Name(#FileDeleter)

Evtroutine Handling(#COM_OWNER.Initialize)
  #Delete.Enabled := false
Endroutine

Evtroutine Handling(#FileDeleter.Initialize)
  #Delete.Enabled := true
Endroutine

Evtroutine Handling(#Delete.Click)
  #FileDeleter.FileName := '/recipes/strawberryMousse'
  #FileDeleter.Delete()
Endroutine

Evtroutine Handling(#FileDeleter.Completed) Status(#returnedStatus) Message(#message)
  #Status := #returnedStatus
  If (#Status <> OK)
    #StatusMessage := #message
  Endif
Endroutine