Can you wrap MessageBox?

I want to wrap some API2 syntax to use API1 for compatibility. Methods are straightforward but how would I deal with

MessageBox s1 + EndOfLine + s2

Can this be done?

Not sure I follow ?

Brain block - need coffee.

Right. MessageBox IS just a method call anyway, and the whole string is passed (the plus signs confused me momentarily)


Right but I’m not sure you will be able write your OWN global version of MessageBox unless you have a different signature
One of the downsides to everything being in the global namespace
It prevents US from doing certain things
Like this

I make an extension module for my 2018 R3 and it seems to work fine in it.

The whole point is to be able to use API2 code without changing it all the time, and maybe start using API2 syntax myself.

And when / if I move to a higher Xojo version all I would need to do is to delete the extension module and vise versa.

Btw given how many people need to move backwards and forwards with their code I’m surprised there is no wrapper already … or can I just not find it?

AH - I stand corrected. Dave Sisemore had posted about one:

some bits in here as well

1 Like