Re: Scripting in Gnome

On Tue, 2004-02-03 at 14:54, Bob Smith wrote:
> Question. What would it take, to make GObjects self describing enough
> for a scripting language to be modified to use GObjects automatically.

OS X does something a lot like this. You tell Cocoa about your
scriptable data ("the application has a bunch of frobs, each frob has an
aunt and an uncle, each uncle has a name and a color, etc"), and then
someone can write an AppleScript like:

	tell application iFrobnicate
		set the color of the uncle of the third frob to blue
	end tell

and Cocoa will receive the Apple Events generated from that and do the
equivalent of:

	g_object_get (app, "frobs", &frob_list);
	frob = g_list_nth (frob_list, 3);
	g_object_get (frob, "uncle", &uncle);
	gdk_color_parse ("blue", &color);
	g_object_set (uncle, "color", color);

(except with error checking of course) based on how you described the
data to it. See

-- Dan

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]