I am experimenting with using the NSAppleEventDescriptorMBS object instead of 
how I’ve been normally handling descriptors just as memory blocks, but I need a 
way to convert between the 2 in some circumstances. I see that I can get a 
pointer to the aeDesc OUT of an NSAppleEventDescriptorMBS but I don’t see how 
to put one into it. I might make a feature request that the constructor 
optionally take a ptr to a memory block to wrap the class around a particular 
aeDesc that I’ve already gotten from elsewhere.

I’m thinking that I can probably do it at least messily for testing with the 
shared method descriptorWithDescriptorType, but while that takes a memory block 
to the data, the type is separate. I don’t know if that means that you’re going 
to do a coerce on it, or if thats actually the raw data and not the aedesc 8 
byte type/handle object that I normally store as an aedesc? I think I may need 
to manually pull the first 4 bytes of the raw aedesc and use that as the type, 
and get a pointer from the last 4 bytes as another memory block to pass for the 
data?

And if I do that then is the data copied into a new AEdesc? Or is it just 
wrapped around the existing one, so I would need to kill the original after 
making the copy… So thats another step and kind of clunky until I can figure 
out a proper way to wrap an NSAppleEventDescriptorMBS class around an existing 
aeDesc.

I would like to ultimately use these classes as much as possible as it would be 
easier to avoid aedesc leaks since I assume they properly kill the desc when 
they go out of scope otherwise you have to keep track of them manually which is 
problematic ;)

Thanks,
 James


James Sentman                       http://www.PlanetaryGear.org                
http://MacHomeAutomation.com




_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to