FROM : Joachim Haagen Bøe
DATE : Tue Nov 12 22:18:07 2002
So the main diffeence is that NSBeginAlertSheet creates a document =20
sheet instead of a new Panel, and that it uses selectors to determine =20=
what happens when the user clicks the buttons ?
Do you have an example of how you use an NSBeginAlertSheet ? I've =20
looked at the API, and it tells me:
void NSBeginAlertSheet(NSString *title, NSString *defaultButton, =20
NSString *alternateButton, NSString *otherButton, NSWindow *docWindow, =20=
id modalDelegate, SEL didEndSelector, SEL didDismissSelector, void =20
*contextInfo, NSString *msg, ...)
However, im not that confident in Cocoa (or C for that matter) and im =20=
not sure how to use selectors.
Thanks,
Joachim
On Wednesday, November 13, 2002, at 03:55 PM, Jeremy Erwin wrote:
>
> On Tuesday, November 12, 2002, at 11:40 PM, Joachim Haagen B=F8e =
wrote:
>
>> According to Aaron Hillegass' book you use a C function to show an =20=
>> alert panel. The declaration is
>>
>> int NSRunAlertPanel(NSString *title, NSString *msg, NSString =20
>> *defaultButton, NSString *alternateButton, NSString *otherButton);
>>
>> I know that Aaron Hillegass' book isn't written for Jaguar, and =20
>> wonder if Apple have implemented an Objective-C function for this =20
>> instead.
>>
>>
> "Learning Cocoa" (1st edition) uses NSBeginAlertSheet, which is still =20=
> a function, but it does incorporate selectors. In that respect it's =20=
> more "Cocoa-ish" than switching on the return code of NSRunAlertPanel.
>
> file:///System/Library/Frameworks/AppKit.framework/Versions/C/=20
> Resources/English.lproj/Documentation/Reference/ObjC_classic/=20
> Functions/AppKitFunctions.html
>
> There's also
> file:///Developer/Documentation/Cocoa/TasksAndConcepts/=20
> ProgrammingTopics/WinPanel/iUsingModalWindows.html
>
> which is probably intended for far more complex situations than simple =
=20
> alert panels.
>
> Jeremy
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>
DATE : Tue Nov 12 22:18:07 2002
So the main diffeence is that NSBeginAlertSheet creates a document =20
sheet instead of a new Panel, and that it uses selectors to determine =20=
what happens when the user clicks the buttons ?
Do you have an example of how you use an NSBeginAlertSheet ? I've =20
looked at the API, and it tells me:
void NSBeginAlertSheet(NSString *title, NSString *defaultButton, =20
NSString *alternateButton, NSString *otherButton, NSWindow *docWindow, =20=
id modalDelegate, SEL didEndSelector, SEL didDismissSelector, void =20
*contextInfo, NSString *msg, ...)
However, im not that confident in Cocoa (or C for that matter) and im =20=
not sure how to use selectors.
Thanks,
Joachim
On Wednesday, November 13, 2002, at 03:55 PM, Jeremy Erwin wrote:
>
> On Tuesday, November 12, 2002, at 11:40 PM, Joachim Haagen B=F8e =
wrote:
>
>> According to Aaron Hillegass' book you use a C function to show an =20=
>> alert panel. The declaration is
>>
>> int NSRunAlertPanel(NSString *title, NSString *msg, NSString =20
>> *defaultButton, NSString *alternateButton, NSString *otherButton);
>>
>> I know that Aaron Hillegass' book isn't written for Jaguar, and =20
>> wonder if Apple have implemented an Objective-C function for this =20
>> instead.
>>
>>
> "Learning Cocoa" (1st edition) uses NSBeginAlertSheet, which is still =20=
> a function, but it does incorporate selectors. In that respect it's =20=
> more "Cocoa-ish" than switching on the return code of NSRunAlertPanel.
>
> file:///System/Library/Frameworks/AppKit.framework/Versions/C/=20
> Resources/English.lproj/Documentation/Reference/ObjC_classic/=20
> Functions/AppKitFunctions.html
>
> There's also
> file:///Developer/Documentation/Cocoa/TasksAndConcepts/=20
> ProgrammingTopics/WinPanel/iUsingModalWindows.html
>
> which is probably intended for far more complex situations than simple =
=20
> alert panels.
>
> Jeremy
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>
| Related mails | Author | Date |
|---|---|---|
| Joachim Haagen Bøe | Nov 12, 20:42 | |
| Jeremy Erwin | Nov 12, 21:55 | |
| Joachim Haagen Bøe | Nov 12, 22:18 | |
| Scott Anguish | Nov 13, 00:41 |






Cocoa mail archive

