|
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
Batman
註冊時間: 2003-11-15 文章: 348
第 1 樓
|
發表於: 星期五 十月 09, 2015 3:35 pm 文章主題: 建立collection物件後, Compile時出現Undefined |
|
|
local oCaption
oCaption=NewObject('capProduct','myClass')
this.Text1.value=oCaption(1)
this.Text2.value=oCaption(2)
capProduct是Collection, 祗是加了
Add('Batman')
Add('Hello Kitty')
運行時沒問題, 但compile時卻說
Unknown oCaption - Undefined
但還是可以執行, 請問是什麼原因? |
|
回頂端 |
|
|
oldbb
註冊時間: 2007-02-28 文章: 83
第 2 樓
|
發表於: 星期六 十月 10, 2015 8:43 am 文章主題: |
|
|
oCaption=NewObject('capProduct','myClass') ...... oCaption 是 Object
this.Text1.value=oCaption(1) ............................. oCaption 是 function OR array, Unknown oCaption - Undefined
? |
|
回頂端 |
|
|
Batman
註冊時間: 2003-11-15 文章: 348
第 3 樓
|
發表於: 星期六 十月 10, 2015 11:46 am 文章主題: |
|
|
謝謝Oldbb幫肋, 已改好及沒問題了
正寫是 oCaption.Item(1), 可簡寫為 oCaption(1), 不過Compile會出現 Undefined
OldBB 你好有經驗 |
|
回頂端 |
|
|
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|