GetResourceString()

Namespace ›› System ›› MfResourceManager ›› Methods ››
Parent Previous Next

GetResourceString()

OutputVar := GetResourceString(key, Section)

GetResourceString(key)

Get a resource string from the resource file CORE section

Returns

Returns a string var containing the resource string for key or "" if key is not found.

GetResourceString(key, Section)

Get a resource string from the resource file at the specified Section.

Returns

Returns a string var containing the resource string from Section with key or "" if key is not found.

Parameters

key

the key of th ini file to read from in the resource file.

Section

the section of the ini file to read from in the resource file.

Remarks

Not intended for use by developers but rather by Mini-Framework.

Getting resource strings is done by using MfEnvironment.Instance.GetResourceString("MyKey") and MfEnvironment.Instance.GetResourceStringBySection("MyKey", "someSection")

Related

MfEnvironment

Example

; Example constructor used by MfEnumerableBase class
__New() {
       ; Throws MfNotSupportedException if MfEnumerableBase Abstract class constructor is called directly.
       if (this.__Class = "MfEnumerableBase") {
               ex := new MfNotSupportedException(MfEnvironment.Instance.GetResourceString("NotSupportedException_AbstractClass", "MfEnumerableBase"))
               ex.SetProp(A_LineFile, A_LineNumber, A_ThisFunc) ; set File, Line and Source Properties
               throw ex
       }
       base.__New()
       this.m_isInherited := true ; abstract class can only be inherited
}