[quote=487116:@Jeff Tullin]Does it have to be a Rect?
Wouldnt passing a memoryblock of the right size do the trick, whatever it is called, and whichever API1 or API2 was in use?[/quote]
Hi Jeff,
Yes, that is an option that would work. Thanks for the suggestion.
The type name doesnt matter. You could call the structure you are creating MyRect and it would work fine. So maybe just change what you are naming the structures you make for declares?
I am following the naming convention for Microsoft. What I am really curious about is that I can’t use a Xojo.RECT in a structure, but yet I can use almost all of the other data types in a structure?
The fact that the compiler can’t distinguish between the Xojo.Rect class and a Structure you named Rect in a different module or class based on scope alone, never mind context, is unfortunate to say the least given how much existing code has declares using structures named Rect
The new Xojo Rect uses doubles anyway, doesn’t it?
It wouldn’t be compatible even if one of the exposed properties was an array of the Left,Top, Right , and bottom
[quote=487176:@Jeff Tullin]The new Xojo Rect uses doubles anyway, doesn’t it?
It wouldn’t be compatible even if one of the exposed properties was an array of the Left,Top, Right , and bottom[/quote]
Thanks Jeff. I will look into this.
You’ll need it as a structure if you’re passing it through declares so using the new class won’t work, a memoryblock is a bit overkill for something so simple.
I guess we’ll have to fall back to RECTL which is just the same as RECT in win32 land, but its just a name in xojo at the end the day, yay, more borked old code
I renamed RECT to RECT1 and it works well. Xojo.Rect is ignored as its not compatible. I didn’t know about RECTL, and that might be used in a future project. Thanks!