The first argument ref should be a widget instance.
But test the follow code, when click btn1, the ref is a string.
<zk xmlns:w="client">
<popup id="pp">
<attribute w:name="open">
function (ref, offset, position, opts)
</attribute>
test
</popup>
<button label="btn1">
<attribute name="onClick">
pp.open(self, "after_start");
</attribute>
</button>
<button label="btn2" popup="pp,after_start"/>
</zk>