How do Valas closures map to Genie?

*爱你&永不变心* 提交于 2019-11-30 20:53:31

I think there is not way. You must call another process using "def".

Bus.own_name (BusType.SESSION, "org.example.DemoService", 
          BusNameOwnerFlags.NONE, 
          on_bus_aquired, 
          reg,
          err);

def reg()
    pass

def err()
    print "error"

This isn't possible at the moment:

https://bugzilla.gnome.org/show_bug.cgi?id=746704

Currently Genie only support the deprecated lambda syntax for signals (+=). This patch provides lambda support in most constructs, the only requirement is that braces and parens need to be indent-balanced on multiple line constructs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!