Guys,
I’m struggling with a piece of code where I check if a textBox is empty. Here is the code:
script myAppDelegate
property parent : class "NSObject"
property aValue : missing value
on button_submitClick_(sender)
set myValue to aValue's stringValue()
if myValue is equal to "" then
display dialog "Required information is missing" with title "myApp"
else
display dialog " Note:" & myValue
end if
end button_submitClick_
end script
The code always goes into the ‘else’ block. Why is the string comparison failing? Is there a method I can use to check if user provided a value in the ‘aValue’ textbox?