Skip to content

Instantly share code, notes, and snippets.

@siraj
Created August 2, 2011 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siraj/4e9afb604c85d0bd550a to your computer and use it in GitHub Desktop.
Save siraj/4e9afb604c85d0bd550a to your computer and use it in GitHub Desktop.
Debug Seed Telepathy script
Tp = imports.gi.TelepathyGLib;
var error = "";
var dbus = Tp.DBusDaemon.dup(error);
print(dbus);
var factory = new Tp.SimpleClientFactory(dbus);
// same thing with gjs
** (gjs:4872): DEBUG: Command line: gjs test-gi-import.js
** (gjs:4872): DEBUG: Creating new context to eval console script
[object instance proxy GIName:TelepathyGLib.DBusDaemon jsobj@0xb60027f8 native@0x8fc0010]
**
tp-glib:ERROR:simple-client-factory.c:320:tp_simple_client_factory_constructed: assertion failed: (TP_IS_DBUS_DAEMON (self->priv->dbus))
Aborted
//error
[object TpDBusDaemon]
**
tp-glib:ERROR:simple-client-factory.c:320:tp_simple_client_factory_constructed: assertion failed: (TP_IS_DBUS_DAEMON (self->priv->dbus))
Aborted
// What works with GJS
#!/usr/bin/env seed
Tp = imports.gi.TelepathyGLib;
var error = "";
var dbus = Tp.DBusDaemon.dup(error);
print(dbus);
var factory = Tp.SimpleClientFactor.new (dbus);
print(factory);
/// error with seed
** (seed:27090): CRITICAL **: Line 8 in test-gi-import.js: TypeError '[gobject_constructor (null)]' is not a function (evaluating 'Tp.SimpleClientFactory.c_new (dbus)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment