Re: How to design / structure sheets
Re: How to design / structure sheets
- Subject: Re: How to design / structure sheets
- From: email@hidden
- Date: Fri, 05 Dec 2008 13:25:25 -0500
My, admittedly beginners's (at Cocoa, but not dev in general) opinion,
is for #2.
Anytime you can separate out something like that is a good thing - you
can then reuse that in some other app without having to abstract it
from your primary app.
Quoting Mike Chambers <email@hidden>:
I am creating a custom sheet for my application which allows a user to
add an item to iCal. However, it is not clear to me the best way to
structure my code.
Im following the info at:
http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/Tasks/UsingCustomSheets.html#//apple_ref/doc/uid/20001290
The Sheet is contained in a separate NIB / XIB file as an NSWindow.
I see two potential options:
1. Instantiate the sheet directly from my App controller and add all
sheet logic to that controller.
2. Create a class for the sheet, and add sheet logic to that class.
Controller would instantiate the class, tell it to open sheet, and
then get notified when it was closed.
Any input on which approach is the better way (or the Cocoa way)? If
#2, do I hook the nib up the its controller class in the same way I do
with my main controller and its nib?
mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden