跳转至

ContactBookClearEntries 清空通讯录

格式

ContactBookClearEntries()

简介

清空通讯录信息。

实例

当运行开始时添加一条通讯录信息到通讯录中并打开通讯录,按下键盘Q键清空通讯录。

import fg
import wx

asset = fg.AssetCreate()
asset.name = 'Main Scene'
asset.state = fg.STATE.VOXMODEL
asset.vmFile = 'mainScene'
asset.icon='icon.png'

fg.AssetRegister(asset)

def onStart(self):
    fg.ContactBookAddEntry("巴斯", "151", "10", "庄园", "天命之人")
    fg.ShowContactBook()

def onKey(self, stamp, key, scancode, action, mods):
    if key==wx.KEY.Q and action==wx.ACTION.PRESS:
        fg.ContactBookClearEntries()

fg.AssetSetStartCBFunc(asset, onStart)
fg.AssetSetKeyCBFunc(asset, onKey)