Merge pull request #66 from bisby/bisby/issue-63-blank-check

Bisby/issue 63 blank check
This commit is contained in:
dkanada 2019-09-27 11:34:14 +09:00 committed by GitHub
commit c0278bd9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 6 deletions

View File

@ -47,9 +47,16 @@ sub itemContentChanged()
setWatchedColor() setWatchedColor()
end sub end sub
sub setFieldText(field as string, value) sub setFieldText(field, value)
node = m.top.findNode(field) node = m.top.findNode(field)
if node = invalid then return if node = invalid or value = invalid then return
' Handle non strings... Which _shouldn't_ happen, but hey
if type(value) = "roInt" or type(value) = "Integer" then
value = str(value)
else if type(value) <> "roString" and type(value) <> "String" then
value = ""
end if
node.text = value node.text = value
end sub end sub

View File

@ -9,6 +9,7 @@ sub updateSize()
itemText = m.top.findNode("itemText") itemText = m.top.findNode("itemText")
maxSize = m.top.getParent().itemSize maxSize = m.top.getParent().itemSize
itemText.width = maxSize[0] itemText.width = maxSize[0]
itemText.height = maxSize[1]
itemText.translation = [0, (maxSize[1] / 2) - 15] itemText.translation = [0, (maxSize[1] / 2) - 15]
end sub end sub

View File

@ -50,9 +50,16 @@ sub itemContentChanged()
setWatchedColor() setWatchedColor()
end sub end sub
sub setFieldText(field as string, value) sub setFieldText(field, value)
node = m.top.findNode(field) node = m.top.findNode(field)
if node = invalid then return if node = invalid or value = invalid then return
' Handle non strings... Which _shouldn't_ happen, but hey
if type(value) = "roInt" or type(value) = "Integer" then
value = str(value)
else if type(value) <> "roString" and type(value) <> "String" then
value = ""
end if
node.text = value node.text = value
end sub end sub

View File

@ -44,9 +44,16 @@ sub itemContentChanged()
' m.top.findNode("TVSeasonSelect").TVSeasonData = m.top.itemContent.seasons ' m.top.findNode("TVSeasonSelect").TVSeasonData = m.top.itemContent.seasons
end sub end sub
sub setFieldText(field as string, value) sub setFieldText(field, value)
node = m.top.findNode(field) node = m.top.findNode(field)
if node = invalid then return if node = invalid or value = invalid then return
' Handle non strings... Which _shouldn't_ happen, but hey
if type(value) = "roInt" or type(value) = "Integer" then
value = str(value)
else if type(value) <> "roString" and type(value) <> "String" then
value = ""
end if
node.text = value node.text = value
end sub end sub