locked
ISettingsTab: getting and saving settings? RRS feed

  • Question

  • The SDK walks you through creating a settings tab, but it gives no detail on how to get/save settings (the SDK explicitly says the tutorial doesn't cover this - what's the point of a settings tutorial if you're only learning how to display the tab?).

     

    I've played around with reflector and done some experimentation, but I'm still not getting it. A few questions:

     

    1) The SDK talks about using commit() to return true when you've saved data to "backend objects." Is there some WHS API for this, or are we talking about app.config/.ini file or something similar?

     

    2) How can I get the GUID of the current tab? I can opensettings(GUID), if I already know the appropriate value. There's the SettingsGuid property on the tab, but I can't figure out the name of the object that has the property to get it. Not a big deal, but it'd be nice to know.

     

    3) How do I retrieve settings (such as which columns are active in a listview, for example) from the settings tab? Or is that done by accessing the "backend object" directly?

     

    It feels like I'm missing something really obvious here.

    Monday, January 14, 2008 10:02 AM
    Moderator

Answers

  • Hi!

    As far as I know, the WHS API doesn't provide a way to store your settings, you have to do that on your own...

    However, there is a way to create an application directory (stored in D:\folders\<GUID>, with duplication if wanted) where you can save your data to.

     

    Regards, Alex

    Monday, January 14, 2008 10:20 AM
  • Information about application folders is in the SDK.
    Tuesday, January 15, 2008 4:20 AM
    Moderator

All replies

  • Hi!

    As far as I know, the WHS API doesn't provide a way to store your settings, you have to do that on your own...

    However, there is a way to create an application directory (stored in D:\folders\<GUID>, with duplication if wanted) where you can save your data to.

     

    Regards, Alex

    Monday, January 14, 2008 10:20 AM
  • Ah, so I was over-thinking the functionality. Do you have any more info on creating the application directory?

     

    Monday, January 14, 2008 6:09 PM
    Moderator
  • Information about application folders is in the SDK.
    Tuesday, January 15, 2008 4:20 AM
    Moderator
  • Thanks Ken. Mea culpa for not RTFM Smile

     

    Tuesday, January 15, 2008 4:31 AM
    Moderator