有时候,我们想在 pdms 设计选择树中快速游走,并且获取对所选对象的一些信息或者做一些操作。
我们可以使用 PDMS 的 track 命令
jmodebug.pmlfrm
setup form !!jmodebug DIALOG DOCKing top resize
title |jmo debug|
TRACK '$!!cdcntrack' call |!this.track()|
toggle .lock 'Enable/Disable Tracking current element' at x0.5 ymax callback '!this.lock()'
textpane .macro anchor top + left + bottom + right at x0 ymax+0.1 width 45 height 10
member .filename is STRING
member .tracking is BOOLEAN
exit
define method .jmodebug()
!this.lock.val = true
!this.tracking = true
endmethod
define method .track()
if(!this.tracking) then
!commands = !this.macro.val
do !cmd values !commands
$!cmd
handle any
$p $!!error.Text $!!error.Line $!!error.command
endhandle
enddo
endif
endmethod
define method .lock()
!this.tracking = !this.lock.val
endmethod
$.
网友评论