Re: demo assistant



On Fri, 2010-04-30 at 10:15 +0200, deloptes wrote:
> Murray Cumming wrote:
> 
> >> 
> >> Thanks, for the hint. I have gone the same way shown in the example.
> >> Unfortunately I have stumbled on one problem I can not solve. I have to
> >> exchange data between the assistant and the main window. How would
> >> someone do it? Can you give me another hint?
> >> I need basically to get the data from the assistant in the main window
> >> after apply() is called in the assistant. What would one experienced
> >> programmer do (I'm not that advanced)?
> >> We have many examples on how to deal with dialogues from within another
> >> window, but there is no example on how to get a return value from
> >> Assistant.
> > 
> > I think it's just a matter of accessing the child widgets. I would make
> > the widgets (or pointers to them) member variables of a derived Window
> > or Assistant.
> > 
> > This is obviously something we should show in the assistant example, in
> > ExampleWindow::on_assistant_apply(). CCing David King so he can add it
> > to his to do list, please.
> > 
> > 
> 
> Thanks for the fast response. Actually I hope you won't get insulted, by I
> think you could be more cooperative in your communication.
> 
> The first time I asked about assistant, you (or someone else) said write a
> patch. In the meanwhile someone has done this already. If it was planned it
> would be nice to know prior to spending time on it.

You didn't write a patch. You wrote some code. And in several ways that
code wasn't in the style of the existing examples, so I asked David to
write something from scratch, because it's simple.

> Second I asked for example on getting responses from assistant and you say
> CC David King. Why don't you cc him along replying to my posting. I don't
> have his e-mail. If you don't want to cc him, why don't you just send me
> his e-mail.

Sorry, I forgot to actually CC him. I'm not perfect.

> This is exactly like firstlevel support in an odd company, where something
> is said only to bounce the customer back.

I suggested to you how to do it. I told you that we'll fix the example
soon to show you _exactly_ how to do it. And honestly, this is
elementary C++.

For unpaid support that seems more than reasonable. If you want a
perfect response in minutes rather than days then maybe you'd like to
pay someone to do it. 

> I can not demand on more cooperativeness (as we are doing all this on free
> bases), but it would be extremely nice and helpful if you'd do so. (And by
> you I mean all)
> 
> About the actual problem.
> I was also thinking to pass variables as pointers to the assistant, but I
> really need to call a function when apply is called, so I was thinking of
> kind of callback or something. The issue is that I would have to cross link
> the two windows.

So I would have a get_result() function in my derived Window class.

> The second approach would be to register the objects in my main window,
> where also the assistant object is located and to use references, but it
> would make the main window too complex.

No, I would avoid letting the two windows interfere with each other's
widgets.

> More details
> I actually need to update a treeview after apply is clicked. Thus in the
> assistant I get all properties for an object(s) that will appear in a
> treeview. When apply is clicked the data from the assistant is checked and
> if correct it should go (be merged) into the treeview.
> 
> Of course there are many ways to do something, but I can not think of some
> elegant one. I'm sure there is a solution in gtkmm but I don't know the API
> that well to get it
> 
> thanks in advance



-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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