The AttnDoSpecialEffects is not really part of the attention manager, but
rather a utility function provided for applications that don't want to use
the attention manager. The flags passed to it are constructed using
kAttnFlagsVibrateBit and kAttnFlagsLEDBit. If you want the user settings to
be used with this function, you've got to read the value of the system
preferences. If you want to use the attention manager to get the user's
attention, then you should call AttnGetAttention to get the ball rolling,
and in this case, the flags you pass should be kAttnFlagsUseUserSettings.
The attention manager will then take care of blinking the LED and operating
the vibrator (if the user enabled them).

I agree that this is confusing.
-- 
Peter Epstein
> ----------
> From:         Andrew Ball
> Reply To:     Palm Developer Forum
> Sent:         Sunday, May 6, 2001 11:29 PM
> To:   Palm Developer Forum
> Subject:      AttnDoSpecialEffects & flag values...
> 
> I'm pretty sure I'm making an incorrect assumption about how 
> AttnDoSpecialEffects gets its flag values.  With the system preferences
> set 
> to vibrate and flash the power led on an m505, I run the following code:
> 
> AttnFlagsType flags;
> Err tempErr;
> flags = kAttnFlagsUseUserSettings;
> tempErr = AttnDoSpecialEffects( flags );
> 
> POSE doesn't vibrate or flash the power button.  With the following code, 
> however:
> 
> AttnFlagsType flags;
> Err tempErr;
> flags = kAttnFlagsAlwaysLED | kAttnFlagsAlwaysVibrate;
> tempErr = AttnDoSpecialEffects( flags );
> 
> I get the desired response.  My assumption in the first example was that 
> kAttnFlagsUseUserSettings would cause the value of the system preferences 
> AttentionFlags value to be read and used without intervention from me.
> The 
> docs say:
> 
> System-wide preferences determine what means are used to get the user's 
> attention.
> 
> yet it seems to be ignored, suggesting that it's not reading the system 
> preferences at all.
> 
> I had a look at the sysPrefs fields and the right bits seem to get flipped
> 
> when changing the user preferences, they just seem to be ignored.
> 
> Do I have to use PrefGetPreferences( ) to actually read in the bit 
> values?  Or is there something else I have to do?
> --
> Andrew Ball
> [EMAIL PROTECTED]
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> 
> 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to