I can't say for certain what grantstreet is doing (that link takes me to a page for a company that doesn't appear to develop software), but like I said, intercepting calls to PrefSetPreference by patching that trap with SysSetTrapAddress would probably enable you to prevent changes to whatever system preference you want (and perhaps putting up an alert telling the user the change is being disallowed).
Also as I said, this will only work if the prefs panels use PrefSetPreference to change pref values. Mark Peters "apple k" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > [...] > > Besides, I've seen another software in the market, > grantstreet software(www.grantstreet.com), which also > provide this kind of features whereby not allow user > attempt to change a certain features of PalmOS General > Panel preference. I guess they must use some sort of > method to control over it. Do you have the idea? Pls > help as i was struggling it all the time. Your > attetion is very much appreciated. > > --- "Mark A. Peters" <[EMAIL PROTECTED]> wrote: > > So it is the system prefs (as presented in the > > "Prefs" application) that you > > want to lock, not the preferences of your own > > application? > > > > Setting a system database like "Saved Preferences" > > or "Unsaved Preferences" > > to read-only is a dangerous thing to do -it would > > probably cause the system > > to crash. Even if you were successful in doing > > this, it would prevent every > > application on the device from changing its own > > prefs. > > > > I can think of only one way programmatically to > > prevent changes to system > > prefs while still allowing users to use "Prefs" to > > see the prefs settings: > > use SysGetTrapAddress/SysSetTrapAddress (pre-OS 5 > > only) to patch > > PrefSetPreference (and others, depending on what OS > > versions you need to > > support) so you can detect an attempt to change a > > system pref and do > > something else instead. Use the beefed-up > > notification manager for this on > > OS 5. This assumes that the prefs app uses this > > API call rather than a > > lower-level call. > > > > Mark Peters > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - File online, calculators, forms, and more > http://platinum.yahoo.com > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
