passing C++ objects through DND.
- From: Todd Dukes <tdukes ibmoto com>
- To: "gtkmm modeemi cs tut fi" <gtkmm modeemi cs tut fi>, gtk <gtk-list redhat com>
- Subject: passing C++ objects through DND.
- Date: Fri, 16 Apr 1999 13:56:35 -0500
I have turned up a problem in my code with my interpretation
of DND and was wondering how other people have solved it.
For a drag and drop feature, I was passing a list of pointers
to objects throught the selection by using a pointer to an
stl list. What I didn't realize it that gtk is making a copy of
the stl list ( even though I told it the wrong size ) and then
freeing ( not deleting ) it when the drag and drop was finished.
Since I didn't realize this was going on I was also deleting the
list.
The way I was planning to solve this was to send a pointer to a
pointer to the list through the selection. That way I can still
delete the list ( if I let gtk do it, it won't call delete) and
gtk can still free the pointer. This seems like it will work fine
as long as the drag and drop targets are the same application.
Has anyone else solved this problem a better way?
thanks,
Todd.
--
==============================================================
| Todd Dukes E-MAIL: tdukes@ibmoto.com |
| Motorola Somerset Phone: (512) 424-8008 |
| MS OE70 |
| 6300 Bridgepoint Parkway Building #3 |
| Austin, Texas 78730 |
==============================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]