Override new xojo framework

I have many methods in a module that use the new framework. Thus, I took the liberty to use the Using Clause in that module. It saves a lot of time coding the full namespace for those new framework classes, etc.

But, so once in a while I need to use the classic framework. One example is the memoryblock I use to load an image. In my module I can’t really use the classic framework, since I use the Using Clause. Or can I?

Who helps me out?

Use the Global prefix.

So to access the old Dictionary after having put a “Using Xojo.Core”:

Dim d As Global.Dictionary

[quote=212198:@Edwin van den Akker]I have many methods in a module that use the new framework. Thus, I took the liberty to use the Using Clause in that module. It saves a lot of time coding the full namespace for those new framework classes, etc.

But, so once in a while I need to use the classic framework. One example is the memoryblock I use to load an image. In my module I can’t really use the classic framework, since I use the Using Clause. Or can I?

Who helps me out?[/quote]

Note that the classic framework is only available in Desktop, Web and Console. iOS is new framework only.

On a related note, I’ve asked for a constant which tells our code when the classic framework is available. <https://xojo.com/issue/39216>

The goal is to be able to write universal code that will probably work on new targets. For example

#if Not TargetiOS // Classic framework available #endif

Is correct at the moment, but will be incorrect once Raspberry Pi targets are available. So I could do

#if TargetDesktop Or TargetWeb Or TargetConsole // Classic framework available #endif

And that would be correct for now. But if there were ever a “no classic framework” switch or compiler directive, or one (or more) of those project types removed the classic framework, it would once again be wrong. So I’m looking for a constant that would tell me this unambiguously.

Why would you expect this to be incorrect once Pi arrives ?

Doesn’t Pi require new framework?

Pi 2 (Linux on ARM) will not require the new framework.

Ok, so bad example. But my point remains.