Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GacUI.h里StrongTypedColumnProvider类的GetCellDataRext成员 #2

Closed
Phuehvk opened this issue Jan 28, 2017 · 1 comment
Closed

GacUI.h里StrongTypedColumnProvider类的GetCellDataRext成员 #2

Phuehvk opened this issue Jan 28, 2017 · 1 comment
Labels

Comments

@Phuehvk
Copy link

Phuehvk commented Jan 28, 2017

此函数调用description::BoxValue,返回vl::reflection.::description::Value对象,但Value雷里没GetText成员,此前的版本里有,貌似被改成了GetBoxValue

@vczh
Copy link
Member

vczh commented Jan 31, 2017

  1. 拿到Value.GetTypeDescriptor()->GetSerializableType(),看看是不是null
  2. 如果是nullptr,那么哪怕它是BoxedValue你也拿不到字符串
  3. 如果不是nullptr,就调用它的Serialize函数

现在struct和enum都不是serializable的,不过你可以从ITypeDescriptor里面拿到所有元数据,输出自己想要的格式。刚发的Release鼓励你不使用反射,所以如果你确实知道他是什么,那么你就Unbox出来自己整好了。对于primitive type,你可以用TypedValueSerializerProvider来获得字符串。这仍然不包括struct和enum。

@vczh vczh closed this as completed Jan 31, 2017
@vczh vczh added the wontfix label Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants