【发布时间】:2014-03-17 08:46:00
【问题描述】:
例如,我有一个这样的课程:
class firstOne{
....
def A (){
}
}
class secondOne{
// I need to call and use method A from class firstOne
// even I get error if I try to follow Java like calls
// firstOne method = new firstOne();
// method.A()
}
我已经尝试过http://groovy.codehaus.org/Scripts+and+Classes 和http://groovy.codehaus.org/Groovy+Beans 但没办法。任何类型的建议或示例都会非常有帮助。
【问题讨论】:
-
这与 grails 有什么关系?此外,最好避免使用大写字母方法
-
您遇到了什么错误?
-
你的语句需要在代码块而不是类块中
-
它在一个 geb 自动化脚本中。它显示一般错误:“org.spockframework.runtime.ConditionNotSatisfiedError”。我将在几分钟内发布有关该错误的更多详细信息。