Yeah, I think I will pursue this. I have been trying to talk myself out of it because I have been building gui components directly in code while learning Vala/Clutter and I did not want to have to learn a whole new way of doing that. In the end, I want to do things in such a way that it will make the application easier to support going forward. I think you have convinced me to give ClutterScript a try and see how things shake out.
thnx Brian On Fri, Jan 20, 2012 at 11:40 AM, Dominique Bureau <[email protected]>wrote: > A simple advice: whenever you build an app that can support some sort of > scripting for the UI definition, use it. > > I used to build pretty much everything in code directly, and realized > eventually that by putting as much as I can into the json, I can rework my > UI layout without re-compiling. Heck, I now leave all UI layout work to the > artists, and I can focus more on actual system code and business logic. > > By the way, this also includes animations and transitions, which is usally > what takes a lot of time to fine tune to get the results you want. > ClutterStates are especially useful in jsons if your app does a lot of > animations. You want your widget to go offscreen to the right instead of > left? No problem. Simply edit the json, modifiy your animation, and restart > (or reload). No compile needed. > > Bottom line, the ClutterScript is simply a mechanism that will build > GObjects defined in a json file. For each object, you can set their > properties direclty in the json. Then, you can fetch only the objects you > need and work with them, using clutter_script_get_object(). > > > -- > Dominique > > > > On Fri, 20 Jan 2012 10:44:21 -0500, Brian Duffy <[email protected]> wrote: > > Good points. Also, all of those brackets are giving me a headache. >> >> On Fri, Jan 20, 2012 at 10:06 AM, Jonathan Ryan < >> [email protected] >> >>> wrote: >>> >> >> On Fri, Jan 20, 2012 at 9:14 AM, Brian Duffy <[email protected]> wrote: >>> >>> Its funny how things sometimes come to me right before I fall asleep at >>>> night or in the morning before I am completely awake. Things that seem >>>> obvious in retrospect. >>>> >>>> It finally dawned on me that I can just load the object from the >>>> ClutterScript and create and add text actors to it as I am traversing my >>>> result set in code. So I guess pursuing this clutter script thing for my >>>> gui is doable. Although, I am still curious if anyone wants to express >>>> reservations about using ClutterScript. >>>> >>>> thnx >>>> >>>> >>>> >>>> On Thu, Jan 19, 2012 at 4:04 PM, Brian Duffy <[email protected]> wrote: >>>> >>>> Hello again, >>>>> >>>>> I'm investigating ClutterScript because the Clutter Cookbook suggests >>>>> that there are numerous benefits to its use. Thus far, all my coding >>>>> (not >>>>> very much) has been without it. Can anyone suggest any drawbacks to >>>>> using >>>>> ClutterScript? >>>>> >>>>> After reading the introduction the first question that came to mind >>>>> was; >>>>> What if I am populating a ClutterBox with some text actors, but I am >>>>> using >>>>> a database to read a list of values that I need text actors for? Would >>>>> I >>>>> have to dynamically generate the JSON code in my program? I noticed >>>>> you can >>>>> load JSON from a string, but then how do you merge the generated code >>>>> with >>>>> the external JSON file? >>>>> >>>>> thnx >>>>> >>>>> -- >>>>> Duff >>>>> >>>>> >>>> >>>> >>>> -- >>>> Duff >>>> >>>> ______________________________**_________________ >>>> clutter-app-devel-list mailing list >>>> clutter-app-devel-list@**clutter-project.org<[email protected]> >>>> http://lists.clutter-project.**org/listinfo/clutter-app-**devel-list<http://lists.clutter-project.org/listinfo/clutter-app-devel-list> >>>> >>>> - The last time I used it, it was hard for me to find docs to see all >>>> the >>>> >>> features it supports. I had to look through the parsing code to find out. >>> - Maybe if new features are added to the API ClutterScript might not >>> reflect them right away? >>> >>> Jonathan >>> >>> ______________________________**_________________ >>> clutter-app-devel-list mailing list >>> clutter-app-devel-list@**clutter-project.org<[email protected]> >>> http://lists.clutter-project.**org/listinfo/clutter-app-**devel-list<http://lists.clutter-project.org/listinfo/clutter-app-devel-list> >>> >>> >>> >> -- Duff
_______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
