该物业仍具有validateProperties旧值 [英] The property still has the old value in validateProperties

查看:191
本文介绍了该物业仍具有validateProperties旧值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义渲染器(继承自 AdvancedDataGridItemRenderer ),而且我重写 validateProperties 和使用的价值在宽度属性,但我每次都让旧值!是不是 validateProperties 应该执行性能提交之后,(我打电话超)?这是我的code:

I have a custom renderer (inherits from AdvancedDataGridItemRenderer), and I'm overriding validateProperties and using the value of the width property, but I'm getting the old value every time! Isn't validateProperties supposed to execute after the properties were committed (I'm calling super)? Here's my code:

public override function validateProperties():void
{
    super.validateProperties();
    if ((AdvancedDataGrid(listData.owner).columns[listData.columnIndex].
            showDataTips)&&(textWidth>width))
        toolTip=listData.label;
    else toolTip=null;
}

谢谢!

推荐答案

我解决了它。诀窍是使用 validateSize 宽度属性。 validateProperties 对于那些不属于任何其他团体对此有一个专门的 validateX 功能特性(如为 validateSize validateList ,等等)。

I solved it. The trick is to use validateSize for the width property. validateProperties is for properties that don't belong to any of the other groups for which there's a dedicated validateX function (such as validateSize, validateList, etc.).

这篇关于该物业仍具有validateProperties旧值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆