문제가 있습니다. 내 앱에 스톱워치 디스플레이를 추가하고 싶습니다. 이 page을 참조로 사용했습니다. 필수 commons-scxml-0.9.jar 라이브러리 (소스 코드 포함)를 다운로드하고 추가했습니다. 이클립스에 오류가 없습니다하지만 난 슈퍼 클래스 (AbstractStateMachine)이 class 생성자에서, 그것을 디버깅 할 때이 명령으로 호출됩니다.스톱워치 생성자에 URL이 필요합니다. scxmlDocument
슈퍼 (StopWatch.class.getClassLoader()의 getResource ("조직/apache/commons/scxml/env/stopwatch.xml "));
하지만 수퍼 클래스 생성자는 속성을 갖지 않습니다. 최종 URL scxmlDocument이 있지만 만 만 나타납니다.
stopwatch.xml은 어떻게 보이나 어디에서 배치해야하는지 알고 있습니다. 최종 URL scxmlDocument은 어떻게 작성합니까?
나는 모든 것을 시도했지만 아무 것도 효과가 없었습니다.
감사합니다.
`<?xml version="1.0" ?>
<transition event="watch.start" target="running" />
</state>
<state id="running">
<transition event="watch.split" target="paused" />
<transition event="watch.stop" target="stopped" />
</state>
<state id="paused">
<transition event="watch.unsplit" target="running" />
<transition event="watch.stop" target="stopped" />
</state>
<state id="stopped">
<transition event="watch.reset" target="reset" />
</state>
`
, 대신 단지 : 당신이 의존하는 jar 파일에 대해 아무것도 언급이 클래스 경로에 있는지 확인하지 않았지만
그리고 마지막으로, '크로노 미터 '사용? – CommonsWare
나는 이것을 먼저 시험해 본다. 그러나 나는 크로노 미터로 시도 할 것이다. 제안 해 주셔서 감사합니다. – m4gnum