From: Kevin S. <kev...@ho...> - 2001-08-17 06:45:01
|
> So, it looks like we should have our own map, probably in the form of a > ruby hash created in C++, and updated each time we create or delete an > object. I think it would make sense to use the C++ pointer as the key, > and > the ruby object VALUE as the value. This way, we can store the callback > data item in the ruby part of our object, along with any similar data we > need in the future. No, wait. I just remembered that we're thinking of creating our own wrapper class for each FLTK C++ class. We can add a local member variable there that contains the ruby object. No hash table needed, and simpler memory management. We could also store callback data there. But as I mentioned, I think there's value in keeping the C++ code to a minimum, and doing as much as we can in ruby. Kevin |