Re: SystemConfiguration Help
Re: SystemConfiguration Help
- Subject: Re: SystemConfiguration Help
- From: Ryan McGann <email@hidden>
- Date: Fri, 29 Mar 2002 00:52:58 -0500
>
Item 1 is easy. You should just put a notification on "Setup:" and
>
watch for the "CurrentSet" field change.
Good, thanks.
>
Items 2 and 3 are hard. The problem is that the SCF dynamic store
>
only holds references to information about the current set. You want
>
to know if any set, including inactive sets, has changed. This
>
information just isn't in the dynamic store.
>
>
Why do you need info about non-active sets? If you can give me the
>
big picture perhaps I can suggest a better solution.
We are presenting the user with a list of sets, just like the Network
preference pane so that users may create application preferences based
on their network preferences. For example, if the Home configuration is
active, users may want to turn off our product. So we'd need to know
when the names of these sets change so that if the user makes a change
we could update our visual list also. I suppose we could build our menu
every time the user clicks on it (currently it's a popup menu but that
may change), but I'm not sure how expensive that would be.
>
Failing that, the best thing I can think of is to use the dynamic
>
store to watch the "Setup:" key for changes and, each time it
>
changes, check the "LastUpdated" property. This property changes
>
each time the dynamic store is updated from the on-disk preferences,
>
thus it changes any time the on-disk preferences change. When you're
>
notified of the prefs change you then need to manually look for
>
changes in inactive sets by reading the on-disk preferences using the
>
SCPreferencesRef APIs.
That does sound more hard....Unless anybody can think of something
better, I'll try building the menu dynamically and see if that's
terribly slow.
Thanks,
Ryan
----------------------------------------------------------------
Ryan McGann
Software Engineer, Macintosh Internet Security
Symantec Corporation
email@hidden
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.