on 05-26-2005 3:14 PM
We have a problem with getting correct values from the MatrixObject.
The BSTR objects returned from the String property of the EditText-object didn't work so well, the BSTR object were continually changing, and some seemed to have the same memory addresses.
We therefore try to change the BSTR strings to wstrings in the following code example:
ItemCodeText = MatrixObject->Columns->Item("1")->Cells->Item(Rows)->Specific;
std::wstring ItemCode = (std::wstring)ItemCodeText->String;
DescriptionText = MatrixObject->Columns->Item("3")->Cells->Item(Rows)->Specific;
Descr = (std::wstring)DescriptionText->String;
QuantityText = MatrixObject->Columns->Item("11")->Cells->Item(Rows)->Specific;
Quantity = (std::wstring)QuantityText->String;
PriceText = MatrixObject->Columns->Item("21")->Cells->Item(Rows)->Specific;
Price = (std::wstring)PriceText->String;
In the debugger, ItemCode, Descr and Quantity gives the correct strings, but Price did not work.
It just gives us this:
Price {"⡈ê"}
Can anybody help us?
Hi!
Try to use proberty EditText::Value in the following way:
-
PriceText = MatrixObject->Columns->Item("21")->Cells->Item(Rows)->Specific;
Price = (std::wstring)PriceText-><b>Value</b>;
-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI!
Are you sure that it is exactly price-column?
It's value prefix (<b>&#</b>1031..) looks like letter-code (as in XML or HTML).. (but maybe it's the result of forumengine encoder..)
To check it just try to get value once again from previous column like this:
---
PriceText = MatrixObject->Columns->Item("<b>11</b>")->Cells->Item(Rows)->Specific;
Price = (std::wstring)PriceText->String;
---
What will be the Price value?
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.