![]() UJML Language Reference |
The _x_storeBag() function stores a property bag and returns a boolean value indicating success or failure.
boolean _x_storeBag(string bagName)
|
Parameters |
Description |
|
bagName |
The name of a property bag to store |
The _x_storeBag() function returns a boolean value of true indicating success or false indicating failure.
This function stores a property bag currently in device memory to the device's persistent store. See Property Bag Functions. You must load a property bag before you can store it. See _x_loadBag() function. If a program exits or closes a property bag without storing a property bag all changes to the property bag are lost. See _x_closeBag() function.
The following example shows how to set values into a property bag. It is part of the visualelements.ujml sample.
if (_x_loadBag("&BAG_NAME;"))
{
_x_setBagString("&BAG_NAME;", &BAG_LABEL_TEXT;, mSingleLineText);
_x_setBagString("&BAG_NAME;", &BAG_MULTI_LABEL_TEXT;, mMultiLineText);
_x_setBagBoolean("&BAG_NAME;", &BAG_FONT_STYLE_BOLD;, mFontStyleBold);
_x_setBagBoolean("&BAG_NAME;", &BAG_FONT_STYLE_ITALIC;, mFontStyleItalic);
_x_setBagBoolean("&BAG_NAME;", &BAG_FONT_STYLE_UNDERLINED;, mFontStyleUnderlined);
_x_setBagBoolean("&BAG_NAME;", &BAG_FONT_STYLE_OUTLINED;, mFontStyleOutlined);
_x_setBagInt("&BAG_NAME;", &BAG_FONT_FACE;, mFontFace);
_x_setBagInt("&BAG_NAME;", &BAG_FONT_SIZE;, mFontSize);
_x_setBagInt("&BAG_NAME;", &BAG_FORE_COLOR;, mForeColor);
_x_setBagInt("&BAG_NAME;", &BAG_BACK_COLOR;, mBackColor);
_x_setBagInt("&BAG_NAME;", &BAG_OPACITY;, mOpacity);
_x_storeBag("&BAG_NAME;");
_x_closeBag("&BAG_NAME;");
}|
Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|