Cadence Skill 论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6152|回复: 0

[求助] popup试炼出现问题

[复制链接]
发表于 2016-10-5 17:07:19 | 显示全部楼层 |阅读模式
菜鸟刚学习skill,全部copy指导书上面的例子,结果出问题:E- *Error* axlFormTitle: argument #1 should be any user-defined (other) type (type template = "ot") - nil
请告诉帮忙看看问题在哪,谢了

例子的form:
The form file popup.form for this is shown:
FILE_TYPE=FORM_DEFN VERSION=2
FORM
FIXED
PORT 50 5
HEADER "Popup Selector"
POPUP <PRINTP>
"to File""0","to Printer""1","to Script""2".
POPUP <SCRIPTP>
"Record""record","Replay""replay","Stop""stop".
POPUP <MYPOPUP>
"MyPopup1""myPopup1","MyPopup2" "myPopup2".
TILE
TEXT "My Popup Here:"
TLOC 1 1
ENDTEXT
FIELD my_popup
FLOC 12 3
ENUMSET 24
POP "MYPOPUP"
ENDFIELD
FIELD change_pop
FLOC 5 6
MENUBUTTON "Change" 8 3
ENDFIELD
FIELD done
FLOC 15 6
MENUBUTTON "Done" 9 3
ENDFIELD
FIELD print
FLOC 25 6
MENUBUTTON "Print" 9 3
POP "PRINTP"
ENDFIELD
FIELD script
FLOC 35 6
MENUBUTTON "Script" 11 3
POP "SCRIPTP"
ENDFIELD
ENDTILE
ENDFORM

skill代码:
; formpop.il - Create and display a form with a popup
; Form call back function to respond to user selection of any field in the form
(defun _popAction (form)
(case form->curField
("done"
  (axlFormClose form)
(axlCancelEnterFun)
t)
("change_pop"
(case already_changed
(0;Use display/dispatch string pairs
axlFormBuildPopup(form "my_popup"
list(
list("NewPopup A" "mynewpopup_a")
list("NewPopup B" "mynewpopup_b")))
      axlFormSetField(form "my_popup"
"My First Popups")
)
(1;Display string/dispatch integer pairs
axlFormBuildPopup(form "my_popup"
list( list("NewPopup 12" 12)
list("NewPopup 5" 5)))
   axlFormSetField(form "my_popup"
"My Second Popups")
)
(t;String is both display and dispatch
axlFormBuildPopup(form "my_popup"
list( "MyPopNValue1"
"MyPopNValue2"))
   axlFormSetField(form "my_popup"
"My Third Popups")
)
)
already_changed++
t)
("my_popup"
printf( "Got my_popup event:
form->curValue %s", form->curValue)
if( form->curValue
(progn
axlFormSetField( form "my_popup"
form->curValue)))
t)
); case
)
; defun _popAction
; User-callable function to set up and
;   display the Extract Selector form
(defun myPop ()
form = axlFormCreate( (gensym) "popup.form"
'("E" "OUTER") '_popAction t)
if( axlIsFormType(form)
then (print "Created form successfully.")
else (print "Error! Could not create form."))
    axlFormTitle( form "Try My Popup")
    mypopvalue = "my_start_popup"
axlFormSetField( form "my_popup" mypopvalue)
    axlFormDisplay( form)
already_changed = 0
); defun myPop
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|网站地图|Cadence Skill 论坛 ( 蜀ICP备13024417号 )

GMT+8, 2024-4-26 03:26 , Processed in 0.157843 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表