में बैकक्वोट का उपयोग किया गया है, मैं स्कैला में नया हूं और स्काला में स्विंग काम करने के लिए उदाहरणों में से एक का पालन करता हूं और मैं एक प्रश्न पूछता हूं। , के आधार परस्कैला स्विंग इवेंट
listenTo(celsius, fahrenheit)
reactions += {
case EditDone(`fahrenheit`) =>
val f = Integer.parseInt(fahrenheit.text)
celsius.text = ((f - 32) * 5/9).toString
case EditDone(`celsius`) =>
val c = Integer.parseInt(celsius.text)
fahrenheit.text = ((c * 9)/5 + 32).toString
}
कारण है कि मैं EditDone (`fahrenheit`) और EditDone (` celsius`) में backquote (`) का उपयोग करने के लिए अपने पाठ फ़ील्ड घटकों जैसे की पहचान करने की क्या ज़रूरत है fahrenheit
और celsius
? मैं इसके बजाय EditDone(fahrenheit)
का उपयोग क्यों नहीं कर सकता?
धन्यवाद