背景图像属性未正确设置
按照这个例子 http://teethgrinder.co.uk/open-flash-chart /gallery-bg-image.php
我正在尝试
import com.extjs.gxt.charts.client.model.ChartModel
ChartModel cm = new ChartModel(graphTitle, "color: #738995;font-weight: bold;font-size: 20px; font-family: arial; text-align: left;");
cm.setBackgroundColour("ffffff");
cm.set("bg_image", "http://teethgrinder.co.uk/open-flash-chart/images/logo.png");
cm.set("bg_image_x","right");
cm.set("bg_image_y","top");
没有 bg_image(_x,_y) 位一切正常 它抛出的位
(字符串):调用 NPObject 上的方法时出错! [插件异常:Actionscript 中出现错误。使用 try/catch 块来查找错误。]。
ChartModel cm = getChartModel(dataSet);
try {
this.setChartModel(cm);
} catch (Exception ex)
{
GWTMessageHandler.handleInfoMessage(
"Message ="+ex.getMessage()+
"Cause = "+ex.getCause()+
"getLocalizedMessage = "+ex.getLocalizedMessage()+
"StackTrace="+ex.getStackTrace());
}
返回消息=(字符串):调用 NPObject 上的方法时出错! [插件异常:Actionscript 中出现错误。使用 try/catch 块查找错误。].Cause = nullgetLocalizedMessage = (String): 在 NPObject 上调用方法时出错! [插件异常:Actionscript 中出现错误。使用 try/catch 块查找错误。].StackTrace=[Ljava.lang.StackTraceElement;@2ff
following this example
http://teethgrinder.co.uk/open-flash-chart/gallery-bg-image.php
I'm trying
import com.extjs.gxt.charts.client.model.ChartModel
ChartModel cm = new ChartModel(graphTitle, "color: #738995;font-weight: bold;font-size: 20px; font-family: arial; text-align: left;");
cm.setBackgroundColour("ffffff");
cm.set("bg_image", "http://teethgrinder.co.uk/open-flash-chart/images/logo.png");
cm.set("bg_image_x","right");
cm.set("bg_image_y","top");
without the bg_image(_x,_y) bit everything works
with the bit it throws
(String): Error calling method on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to find error.].
ChartModel cm = getChartModel(dataSet);
try {
this.setChartModel(cm);
} catch (Exception ex)
{
GWTMessageHandler.handleInfoMessage(
"Message ="+ex.getMessage()+
"Cause = "+ex.getCause()+
"getLocalizedMessage = "+ex.getLocalizedMessage()+
"StackTrace="+ex.getStackTrace());
}
returns Message =(String): Error calling method on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to find error.].Cause = nullgetLocalizedMessage = (String): Error calling method on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to find error.].StackTrace=[Ljava.lang.StackTraceElement;@2ff
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:
听起来 JavaScript 和 ActionScript 之间的交互受到了安全限制的阻碍。尝试这个安全调整。
将您的代码包装在像这样的 try/catch 块中,看看它试图告诉您什么:
在不摆弄代码的情况下,我的第一个猜测是以下几行应该采用数字而不是字符串:
EDIT:
It sounds like the interaction between JavaScript and ActionScript is being hindered by security constraints. Try this security adjustment.
wrap your code in a try/catch block like this and see what it's trying to tell you:
Without fiddling with the code, my first guess would be that the following lines should take numbers instead of strings: