FROM : Dan Cavanagh
DATE : Thu Jun 29 21:08:37 2006
Yes, I must have not been clear. Since now it's implemented as a
sheet, it's no problem. Initially I was using a modal panel, and
running a panel modally you seem to have to grab user input after you
send NSApp stopModal. But thanks to everyone I now have it all figured
out as a sheet now, and I think I'm actually MVC compliant with the
way I did it.
And thanks for the tip on the tetris source - I'll check it out.
-Dan
From: Erik Buck <erik.<email_removed>>
Date: June 29, 2006 1:35:41 PM CDT
To: <email_removed>
Subject: Re: Getting a return value from a dialog
The statement that worries me is "The thing I was missing is that I could
still grab the text field's value after it was off the screen."
It is a bad idea to store Model data such as the name that goes
with a high score in a View. You should be able to release a dialog
window and all of its contents at any time without any affect on the
Model.
Incidentally, "Cocoa Programming" uses and fully implements a
Tetris game as an example of how to apply the Model/View/Controller
pattern. Doubly incidentally, "Cocoa Programming" also uses a high
score table as an example of master-detail interfaces with table views.
All of the examples are available at
http://www.cocoaprogramming.net/Downloads.html
DATE : Thu Jun 29 21:08:37 2006
Yes, I must have not been clear. Since now it's implemented as a
sheet, it's no problem. Initially I was using a modal panel, and
running a panel modally you seem to have to grab user input after you
send NSApp stopModal. But thanks to everyone I now have it all figured
out as a sheet now, and I think I'm actually MVC compliant with the
way I did it.
And thanks for the tip on the tetris source - I'll check it out.
-Dan
From: Erik Buck <erik.<email_removed>>
Date: June 29, 2006 1:35:41 PM CDT
To: <email_removed>
Subject: Re: Getting a return value from a dialog
The statement that worries me is "The thing I was missing is that I could
still grab the text field's value after it was off the screen."
It is a bad idea to store Model data such as the name that goes
with a high score in a View. You should be able to release a dialog
window and all of its contents at any time without any affect on the
Model.
Incidentally, "Cocoa Programming" uses and fully implements a
Tetris game as an example of how to apply the Model/View/Controller
pattern. Doubly incidentally, "Cocoa Programming" also uses a high
score table as an example of master-detail interfaces with table views.
All of the examples are available at
http://www.cocoaprogramming.net/Downloads.html
| Related mails | Author | Date |
|---|---|---|
| Dan Cavanagh | Jun 29, 04:20 | |
| Lon Giese | Jun 29, 05:30 | |
| Carlos Salinas | Jun 29, 05:44 | |
| Dan Cavanagh | Jun 29, 17:18 | |
| Erik Buck | Jun 29, 20:35 | |
| Dan Cavanagh | Jun 29, 21:08 | |
| Dan Cavanagh | Jun 29, 21:08 |






Cocoa mail archive

