Jump to content

Lua property: Clearing path doesn't work properly


Recommended Posts

When you have a file selector property in lua that you want to clear of an image, then there will still be text remaining.

  • Attach script below
  • Select an image or file via a file selector property.
  • Remove the selected item with the 'Clear' button
  • Althought the Lua property itself displays nothing, the path value itself reads "./"
  • So if you check on whether the path is empty, you will get a 'false' back since there are 2 characters present.

Script.path= "" --path "image" "Text Files (*.text):tex"

function Script:Start()
if self.path == "" then
System:Print("empty")
else
System:print("not empty: "..self.path)
end
end

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...