blackberry-webworks/BBX-Framework — comment on commit da1022711f91ef511cb3295a490ad66a185fd696
File: lib/public/webworks.js line 87
By rcruz:

I'm trying to create a __defineGetter__ for the apis so I can do something like "var name = blackberry.app.name ".
The only way I've been able to make that work is by making this return when it is sync and writing my defineGetter like this:

var _self = {};

_self.__defineGetter__('name', function () {
return webworks.exec(null, null, "blackberry.app", "name", null, true);
});

This doesnt use the callbacks at all, but I don't know how to return a value form inside the callback in a sync way.
Help? :(