Skip to main content
14-Alexandrite
November 2, 2020
Question

Deprecated class wt.prefs.WTPreferences

  • November 2, 2020
  • 1 reply
  • 1260 views

Hello.

 

I found that class

wt.prefs.WTPreferences

has been marked as deprecated. Sadly, there's no accurate info about why it is deprecated. The class provides some methods for getting root preference, create/set context masks and so on.

WTPreferences prefs = (WTPreferences) WTPreferences.root();
prefs = (WTPreferences) prefs.node(prefNode);
prefs.setContextMask(PreferenceHelper.createContextMask());

Is anyone here who knows, what is the replacement for this class (or at least methods used there)?

1 reply

14-Alexandrite
January 11, 2021

In case anyone will need that in the future: see this article: https://www.ptc.com/en/support/article/CS191023

 

Just go and use one of these

PreferenceHelper.service.getValue()

PreferenceHelper.service.getValue(String definitionName, String clientName)