On 08/12/2013 12:55 AM, Gavin Lambert wrote:
Quoth L. D. James:
Thanks Gavin  I'm glad that your message suggests that I may have done
something right.  I have tried.  I appreciate your pointing out about
bugs in gtkmm.  I'm sure with my investigation I'll eventually learn
about the bugs and try to assist in the debugging of it, as well as
other compoentns that fall short.
What?  How did you possibly read that from what I said?

The code that you wrote has a bug.  There is nothing wrong with GTK or GTKMM, 
you're just using it wrong.

You are creating a secondary worker thread.  In that worker thread you are 
accessing a GUI widget.  You can't do that.  Not being able to do that is not a 
bug; trying to do it anyway is.

Since you think everyone is telling me something different, I'll follow
your suggestion and reread the thread and keep studying the thread to
see where I'm going wrong.  I understand I might be missing something,
but at present if I can't see it, I can only report on the results and
appreciate any further comments.
So far everyone has been saying the same thing, just phrased differently.  It 
appears however that you have not yet understood any of those suggestions.

I even explicitly told you what you should be doing instead (using a queue with 
a mutex and a Dispatcher), which is the same thing that Andrew Potter suggested 
that you try last week (with a code example, no less).

You appear to be telling me to study and use gtk rather than gtkmm. I
fear that if I did that and tried to post something, I might be
admonished even more for not using gtkmm which this forum is about, and
reinventing the wheel.  I'll take your advise and start studying gtk,
but I'll be very leery to start creating my own interface when you
describe it so complicated that it's broken in gtkmm which has been in
the development for a number of years.
No, that is not what I was suggesting.  I was saying that you should first 
learn how multithreading works in general.  Then how multithreading works in 
GTK+/GTKMM (since the two are basically the same thing, just with different 
syntactic sugar).  And only then try to apply it to your application.


I appreciate your constantly admonishment of my lack on knowledge. I hope you appreciate that I am taking the time to study the terminology that you are tossing around. Your message suggests that I'm taking it lightly. I'm not. Please be advised that I'm spending sleepless nights trying to learn the terminology. I'm posting my messages to learn. I'm asking for code examples and working hard trying to compile them. Everything that comes close to doing something, I'm working with it trying to use it. I'm explaining where the code fails and doesn't work in my case.

So far in the two treads Alan has given me something that works, of which the code snippet that I posted was modeled after in every way that I can imagine does what is needed. Kjell posted an example and description that does what I have been trying to do. He accepted with respect my reference that I couldn't use it because when I removed the unwanted parts it was broken. I inadvertently would remove crucial parts and didn't know how to fix it without putting it back exactly the way it's written and trying again.

He showed a lot of respect for my references, except a little admonishment for talking too much. I'm continuously scolded for talking too much. But at the same time I'm basically saying what you are saying. I don't understand a lot, and a lot of the reading and studying that I'm doing is blurred because of my lack on knowledge. I'm asking questions and trying to fill in the gaps.

Many messages appears to be telling me that I'm trying to do something that is very complicated, using terminology that I don't understand and posting code snippets that doesn't do the task.. as I mentioned, the examples that doesn't hang don't update the gui window between sleep() functions.

You're mentioning other components of gtk and gtkmm that I should implement, components of which I have no idea where to begin and telling me to go out and study. Are you saying don't do anything in the meantime? If it's as complicated as you suggest, that might take years. I hope you appreciate that I need something in the meantime. Using something in the meantime while I continue to study is helping me to get some type of grip.

Kjell told me that I was free to remove everything from his code except for a single entry:
( https://mail.gnome.org/archives/gtkmm-list/2013-August/msg00086.html )
// quote from Kjell
----------------------------------
Since you dislike buttons, can't you remove all buttons and the button box from my example program? Remove all code that has anything to do with the buttons except

     // Start a new worker thread.
     m_WorkerThread = Glib::Threads::Thread::create(
       sigc::bind(sigc::mem_fun(m_Worker, &ExampleWorker::do_work), this));

which you move to ExampleWindow's constructor. And you can change the loop in ExampleWorker::do_work() to make it run forever, if you like.
----------------------------------
// quote end

I really thought I was fully respecting Kjell (as well as everyone else who is contributing) by what I posted.

I might not fully understand what Kjell was saying, but I thought I did. I thought I was doing just that with all the respect in the world. I kept the example from the HelloWorld documentation which had only one widget, a button. I changed the button to a textview widget. I kept all the other lines completely in tack commented out with "// //" to signify it wasn't applicable with textview and couldn't be used. I didn't do anything else but added the single line (to the best of my ability) that Kjell said was needed. And it does perfectly what I was trying to do.

You appear to be admonishing me for ignoring, taking too lightly, or not appreciating the comments in this thread. I do. I'm trying to show all the respect that I know how.

I'm studying the documentation, all of it. It appears to be saying do the same thing that Kjell and Alan has suggested, and it appears to work as expected.

Alan's example from my description:
https://mail.gnome.org/archives/gtkmm-list/2013-August/msg00030.html

You are telling me to do it a different way and at the same time telling me how complicated it is. Without examples of the different way, I don't know where to start.

I described what I was easily doing with Java. Alan appeared to have said it's can be done just as easy with gtkmm and sent me suggestions from his cell phone saying he'd check the details when he got back home. I used the steps in the code that he sent, and used the same steps in the HelloWorld. The steps are working.

I appreciate your expert opinion that the steps are not working. But at present I don't have anything that works to compare it to. The only think that I can do is use what works until I get the experience from all the reading and studying that you're telling me that I need to do (of which I'm doing) and learn differently.

I don't doubt that I might be misunderstanding some of what is presented, but I assure you, it isn't a result of a lack of trying or having respect. I actually thought that I was cooperating in every respect except for talking too much.

Thanks you very respectfully and kindly for your input. I really appreciate it. I'm taking in as much from everything that you type as I can!

-- L. James

--
L. D. James
lja...@apollo3.com
www.apollo3.com/~ljames
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to