From: Allison N. <dem...@ma...> - 2008-08-19 10:56:42
|
Hi everyone, I'm currently having trouble with writing some code to generate a Quicktime movie file. When I wish to add an image to the file, I have to create a QTTime struct. When I do this for most of the standard Cocoa structs, such as NSRect, NSPoint etc, I can simply do: point = NSPoint.new(1, 2) This works. However if I try the same idea with a QTTime: qt_time = QTTime.new(1, 10, 0) RubyCocoa dies, claiming it doesn't know the constant QTTime. I have tried looking inside the RubyCocoa framework to see how the magic is done for the NSxxxx structs, but I found the following comment in oc_types.rb: # This module adds syntax-sugar APIs on top of the Cocoa structures. # This is mostly to preserve backwards compatibility with previous versions # of RubyCocoa where the C structures support was hardcoded in the bridge. # Now structures are automatically handled via the metadata mechanism, but # the API is not compatible with what we used to have. If I understand correctly, this means that QTKit has not had metadata generated for it to handle things such as structs etc. Can anyone confirm that this is the case, and if so, point me in the direction of some documentation explaining how it is done. With a bit of luck, I'll even be able to add the QTKit metadata back into the RubyCocoa project. Thanks for any help. Alli |