Article # 217, added by Geoworks, historical record
| first | previous | index | next | last |

Getting the "spinning world" dialog box for FAX, SMS, et al.



This gives a general overview of how to provide the user feedback
dialog that many of the Nokia applications use when sending a
file (FAX, SMS, etc.). This is the dialog that says, "Starting
to send ....", and displays an animated picture of the Earth with
an envelope spinning around it.

First, you need to use MailboxAddressControlClass to put up the
feedback dialog. Send MSG_MAILBOX_ADDRESS_CONTROL_CREATE_FEEDBACK()
to your MailboxAddressControlClass object with an optr to an
uninitialized MSCTransaction structure.

Upon returning, MSCT_feedback of the MSCTransaction structure
will contain the optr to the feedback dialog (FlashingNoteClass).

You must also set up a method for freeing the dialog's resource
afterwards. One easy way to do this is to send a timed event
like this:

    hTimer = TimerStart( TIMER_EVENT_ONE_SHOT,
                         ,
                         ,
                         MSG_GEN_DESTROY_AND_FREE_BLOCK,
                         0,
                         &timerID );
    /*
     * For safety, we make the mailbox own the timer. This way,
     * the timer event won't get freed if our application shuts
     * down before the timer fires.
     */
    hMailboxApp = GeodeFind( "mailbox", 7, 0, 0 );
    HandleModifyOwner( hTimer, hMailboxApp );

If you want, you can set the duration the dialog stays up by sending
MSG_FLASHING_NOTE_SET_DURATION (value must be more than 300).
Although it is not necessary, since MSG_GEN_DESTROY_AND_FREE_BLOCK
will take down the dialog when it is destroying it.