Thread: [litwindow-users] hello
Status: Alpha
Brought to you by:
hajokirchhoff
From: Peter D. <pd...@gm...> - 2004-11-10 10:40:27
|
I've skimmed through the docs on the site and I have some questions: Wouldn't a more dynamic language like python be more suited for rapid UI development? Are python bindings to litwindow planned? -- Peter Damoc Hacker Wannabe http://www.sigmacore.net/ |
From: Hajo K. <mai...@ha...> - 2004-11-11 08:31:06
|
Peter Damoc wrote: > Wouldn't a more dynamic language like python be more suited for rapid UI > development? The goal of the library is to cater to as many developers as possible. That is one of the reasons for choosing C++, but see below. > Are python bindings to litwindow planned? Definitely yes. Would you be interested in contributing? A small 'proof of concept' would be great. Best regards Hajo Kirchhoff |
From: Peter D. <pd...@gm...> - 2004-11-11 19:47:02
|
On Thu, 11 Nov 2004 09:22:38 +0100, Hajo Kirchhoff <mai...@ha...> wrote: > Peter Damoc wrote: >> Wouldn't a more dynamic language like python be more suited for rapid UI >> development? > > The goal of the library is to cater to as many developers as possible. > That is one of the reasons for choosing C++, but see below. > >> Are python bindings to litwindow planned? > > Definitely yes. Would you be interested in contributing? A small 'proof > of concept' would be great. This is way out of my league I'm just an amateur using python as a prosthesis for my exacerbated laziness. Anyway... the way I see it... python is better suited for the job litwindow is aiming. Any serious C++ programmer could learn python in about... let's say one day... and wxpython maybe in about aaa... one weekend. Ok... it might get more thant that to become proficient but still it beats C++. The path is easier in my view comming from python... something like in: - implement some concept mega-smart widget in python using wxpython, clear out the bugs and then port it into C++ for eficienty (if necessary). > Best regards > > Hajo Kirchhoff -- Peter Damoc Hacker Wannabe http://www.sigmacore.net/ |
From: Jake S. <ja...@za...> - 2004-11-15 11:44:58
|
Hello all, I am having some difficulty getting my head around the RULE syntax and what can be achieved. I am trying to implement the add/modify/delete pattern which appears to have been catered for. Is there anywhere that I can find more on this? I have looked around the litwindow website, but I was hoping this might shortcut that process. Hajo, this is a great idea and even better for actually being implemented! :) thanks jake |
From: Hajo K. <mai...@ha...> - 2004-11-15 14:05:11
|
Hi Jake, (this is a cross post from gmane.comp.lib.litwindow.user that hopefully is also of interest to the current GUI discussion on the boost list. The question was how to write a generic implementation for the add/modify/delete user interface pattern) Jake Skinner wrote: > I am having some difficulty getting my head around the RULE syntax and > what can be achieved. I am trying to implement the add/modify/delete > pattern which appears to have been catered for. > you are a bit ahead of the litwindow schedule here. I've put up a new article on the website (a correction of the few layout problems will appear later this day) http://www.litwindow.com/Library/Articles/rapidui_article_3.htm Here is what works: You can already handle the 'modify' part of the add/modify/delete pattern. Have a look at the RSS Reader tutorial, Step 3 and 4 in the documentation. Here is what does not yet work: Action rules have yet to be defined. So you cannot fire an action using the rules and that is the reason why the add/modify/delete rule has to be written yet. To implement Add you will have to intercept the event yourself. What you can do is write a generic algorithm to add a new element and show it. Here is the rough outline: void AddElement(RapidUI &r, string listBoxName) { // first get the aggregate object for the list box aggregate listbox=r.GetWindowAccessor(listBoxName).get_aggregate(); // next get a container object for the "Items" property // of the list box container items=listbox["Items"]; if (items.is_valid()==false) { lw_log() << "Cannot add! List box is not attached to a container."; return; } // now get an accessor to the currently selected element accessor element=listbox["Current"]; // this accessor will contain valid *type* information // even if no *current* element is selected // the next line will create a new object on the heap with 'new' // the new object will have the same type as 'Current' accessor newObject=create_object(element.get_type()); // insert it (copying it) at the first position into the container items.insert(items.begin(), newObject); // delete the temporary object since a copy of it is now contained // in the container newObject.destroy(); // finally tell RapidUI to update the UI // this will update the list box and the new element will // be shown at position 1 r.ValueChanged(items.get_accessor(), false, false); } This is a generic function, meaning that it will work - with any kind of container - with any type of elements contained in the container - with any list widget that knows "Items" and "Current" provided the appropriate data adapters have been created. Hope this helps and thank you for your interest. BTW, I am cc-ing this to the boost mailing list Regards Hajo Speed up GUI coding by a factor of 10x http://www.litwindow.com/library |