jf-roku/components/photos/PhotoDetails.brs

22 lines
711 B
Plaintext
Raw Normal View History

2022-02-06 15:37:02 +00:00
sub init()
2022-02-06 22:38:26 +00:00
m.top.optionsAvailable = false ' Change once Shuffle option is added
m.top.overhangVisible = false
2022-02-06 15:37:02 +00:00
end sub
sub itemContentChanged()
m.LoadLibrariesTask = createObject("roSGNode", "LoadPhotoTask")
m.LoadLibrariesTask.itemContent = m.top.itemContent
m.LoadLibrariesTask.observeField("results", "onPhotoLoaded")
m.LoadLibrariesTask.control = "RUN"
end sub
sub onPhotoLoaded()
if m.LoadLibrariesTask.results <> invalid
photo = m.top.findNode("photo")
photo.uri = m.LoadLibrariesTask.results
else
'Show user error here (for example if it's not a supported image type)
2022-02-06 17:12:32 +00:00
message_dialog("This image type is not supported.")
2022-02-06 15:37:02 +00:00
end if
end sub