Properties and camelCasing Implemented #15

wants to merge 9 commits into


None yet
3 participants

daball commented Jan 14, 2012

Most of the updates here I just merged swick's property getter/setter and camelCasingMethodsAndProperties into the gir.js and updated example code.

daball and others added some commits Jan 14, 2012

@daball daball Imported swick's object properties mechanism and camelCase() function…
…. Modified camelCase() so that it works with property-name as well as property_name. Modified property activation so that object access security would not throw an Exception, by installing try{}catch{} to trap errors in property setters and getters. Added as a JS object constructor, but then disabled it due to ambiguity--objects have multiple new() functions from gir and there's no way to know which one is a better candidate, if any.
@daball daball Updated examples to camelCasing. Improved multiple_test. Replaced dum…
…p_* examples to a single inspector example, where any object can be interrogated from the command line. Improved Clutter example, however, it does not work due to a problem with static object member, StageManager.
@swick @daball swick get controll over the namespaces 6560771
@daball daball cherry-picked swick's d70009e changed before adding my own …
… proposed code changes

swick commented Jan 15, 2012

+1; like it

daball added some commits Jan 15, 2012

@daball daball Changed load() to import() in C++ land. 47483b9
@daball daball renamed load() to import(), left load() in place for now, added onSig…
…nalShortcut event registration, v_funcs, and fields, added some type reflection, renamed some things, cleaned up some comments, moved all the c-land functions to a sub-object
@daball daball updated example code for gir.import(), added gui to inspector example…
…, observed some new issues in inspector code. c++ needs some updates, but i don't think i'm up to the challenge.
@daball daball Updated README. 3b430ee

daball commented Jan 16, 2012

@swick thanks! These revisions are stable. You'll probably really want to apply them. Someone who can figure out this C++ stuff needs to check out at least 3 things. (1) Objects returned by object methods don't have the prototype actions, eg call, get_property, applied to them, making using them impossible. (2) I can't seem to get static objects to work at all, see Clutter.StageManager for an example failure. (3) GetField and SetField need implementations. I've read through a lot of the C++ code, and I see what it is doing, but I don't know enough about V8 or GObject or GIO or GIR to be of any use here, and my C++ skills are simply not there. I'm probably going to stop adding changes for a while now. I think I've done about all I can without the needed C++ revisions, and I just can't figure out what to write to fix it.


swick commented Jan 17, 2012

Well, I'm responsible for the crappy c++ stuff. Could you make an example for all the 3 cases and maybe open an issue or just send me a gist?


daball commented Jan 18, 2012

@swick At least your C++ code does something. Mine segfaults or refuses to compile. I'm not much of a C++ programmer. I've tried to consolidate some of that into this test. git clone git:// gist-1631103

bb010g commented Jun 2, 2015

Could you rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment