Excluding an entire window from my app

I have a Unit Tests window that uses methods etc in my app. Is there a way I can exclude the entire thing from being built into my app? One can exclude bits of code with #if, and normally the user is not able to access the Unit Test feature. But at present that just means that it’s built-in but never called. What I want is to be able to #if a whole folder away.

At present if I do that then the Linker will complain about a missing reference but I’ll see how to handle that later.

I think the best you can do is the compatibility checkboxes. Turn off the options that actually matter, so the compiler thinks it doesn’t exist.

There are no compatibility checkboxes for Window :slight_smile:

It comes up frequently, it is not possible to exclude a Window at compile time.

Well… whoops. Seems like an odd omission.

(I could be wrong), but this sort of thing (I seem to recall) was the reason why I didn’t ever try to use an OCX in the windows design because I could not exclude it for the Mac build.
Back when, I had to recreate from scratch some of the specialised things I relied on vbx/ocx controls for in VB

If you nowhere access the window, it should be stripped out as an unused class.

Is this useful sort of detail documented anywhere?

Would be very useful having target OS selections for UI interfaces (windows). So you could design different, best fitted UIs for each target OS, and share the core logic with all those. When compiling the project, just the proper target OS window will be compiled (default all, for one design fits all).

1 Like

The stripping of the linker is a feature we had for years.
But I don’t find a documentation page on it.

The information was given in the NUG IMHO. (or in a very old Release Notes).

I’d say it’s probably a little more recent than that because I was aware of the feature, but the NUG predates my time. It might have been in the old PDF manual.

My question is, does it actually work? We found out method name stripping doesn’t actually :grimacing:

1 Like

Totally the wrong place for it.

This is why I complain that there is no facility in the documentation for User Contributed Notes, such as exists in the PHP docs. So what we find is that important details are in Release Notes, Blogs, … So you have to search those too.

The Search facility is rather poor, too. I wanted to find out some details about the IDE. So you’d expect that putting IDE into the docs search box might take me there. But no, as you’ll see if you try it.

1 Like