Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stopping a Nav Services Choose Object sheet from closing



On 8/27/03 8:18 AM, Douglas Norton didst favor us with:

> I want to stop a Nav Services Choose Object sheet from closing.
>
> I want to select multiple items, and click the Choose (renamed to 'Add')
> button, and have the sheet remain open until such time as I click the Cancel
> button ('Done').
>
> I am running into a problem: when I click the Choose (Add) button the sheet
> closes.
>
> In my event call back I have the following code:
>
>
> if ( kNavCBUserAction == callBackSelector )
> {
> if ( kNavUserActionChoose == callBackParms->userAction )
> {
> NavReplyRecord reply;
> if ( noErr == ::NavDialogGetReply( callBackParms->context, &reply ) )
> {
> // Do stuff with the selection - works fine
> }
>
> // Was hoping this would prevent the close from happening
> NavActionState navState = kNavDontChooseState;
> ::NavCustomControl( callBackParms->context, kNavCtlSetActionState, &navState
> );
> }
> }
>
>
> I would also like to change the message and the button names within this event
> call back too, but I need to get the sheet to stay open first.
>
> Do I need to add a window close carbon event handler onto the underlying nav
> services window and prevent the close event from being acted upon ?
>
> Any suggestions anyone ?
>
> Douglas

It sounds like you've removed the option to cancel, which would be a bad
thing. I'd add an Add button that adds the current selection to the list,
and let the normal buttons have their normal behaviors.

Larry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Stopping a Nav Services Choose Object sheet from closing (From: Douglas Norton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.