How to declare a global WindowManager reference


#1

Hi,
I am migrating an application from Clarion6 to Clarion11. On the dictionary I have a global WindowManager reference.

I converted the dictionary and the application. This is the code that is generated by clarion on both platforms:

GLO:CLARION          GROUP,PRE()
FrameWindowManager     &CLASS(WindowManager)
                     END

In Clarion 11, I get compiler errors.

So I deleted the declaration on the dictionary. Now, if I try to create the same group structure, Clarion 11 won’t let me, as you can’t specify the base class inside a group.

If I try to declare the WindowManager object outside of a group, I still get compiler errors. This is the code generated in that case:

GLOREF:FrameWindowManager &CLASS(WindowManager)

This would compile and be usable in Clarion6, but in Clarion11 can’t be compiled.

Is there a way to create a WindowManager reference as global variable in the dictionary?

I know I can do it manually, but this should be doable on the dictionary.

Best regards,
Edgard


#2

In “Data Type” drop box choose “TYPE” (instead of CLASS), turn on “Reference” check box, and in “Base Type” entry field - “WindowManager” (unquoted), this will be generated as x:FrameWindowManager &WindowManager (“x” is a prefix for my global pool).


#3

Hi Mike,

Thanks for the tip. I just tried it, and indeed I get this declaraiont on “ERPDGLO.CLW” (my data-dll app is called ERPDATA.app).

GLOREF:FrameWindowManager &WindowManager

The global data group is prefixed “GLOREF:”

Now I am getting a different error: “Illegal data type: WINDOWMANAGER”.

How in the world does it not know who “WindowManager” is?

The “INCLUDE(‘ABWINDOW.INC’)” line is before the “INCLUDE(ERPDGLO.CLW’)” line. Shouldn’t it be informed of the WindowManager class?

I am confused…

Edgard


#4

Hi again,

As far as I can tell, at least in version 11.0.13244, you can’t declare a reference to an ABC class in the dictionary. Don’t know if this is a bug, or the expected behaviour…

I imagine that you can’t either declare an object of an ABC class on the dictionary for the same reason.

I declared manually on an embed and it is now working.

Thanks anyway,
Edgard


#5

It might not be that its ABC, but rather the placement of the generated code. If its generated before the ABC includes, the error makes sense.