'sourcefile에서 편집기 자리 표시 자'오류가 계속 발생합니다. 내 NSTextView의 텍스트에 액세스하려고 시도하고 있지만 올바르게 수행하지 않는 것 같습니다.OSX Swift : NSTextView에서 sourcefile 오류의 편집기 자리 표시 자
@IBAction func cancelButton(sender: AnyObject) {
dismissViewController(self)
}
@IBAction func saveButtonHandler(sender: AnyObject) {
let Name: String! = nameField.stringValue;
let Time: String! = timeField.stringValue;
let Yum: String! = yumField.stringValue;
let Instruct = (instructionField.textStorage as NSAttributedString!).string;
let recipe = Recipe(name: Name, time: Time, yum: Yum, type: foodType, instructions: Instruct)
dismissViewController(self)
}
문제 내가 뭘 잘못 라인
let Instruct = (instructionField.textStorage as NSAttributedString!).string;
에서 온다?
정말 고마워요! 당신의 충고가 자리를 잡았고 나는 그것으로 많은 것을 배웠습니다. –
괜찮습니다! @WD – Wes