PDA

View Full Version : compile error - ObjectClass Conflict - in StureApsPublicLib



Russell McDougall
7-Jan-2017, 04:54 AM
I think what is happening is not a Dac issue:

The StureApsPublicLib contains a function ObjectClass defined in ObjectInfo.pkg
it takes an object parameter and returns an integer

Dac introduced its own ObjectClass function that does not take any parameter rather it just returns an integer.

An exe that compiled perfectly in 18.2 fails to compile in 19.0 throwing an error because of an incorrect number of parameters.
at line 177 of ObjectInfo.pkg "If (iClass=ObjectClass(Self,hObj)) Begin"
The exe ran perfectly in 18.2.


It seems 19.0 compiler is better at picking up parameter errors.

I suggest the ObjectClass defined in ObjectInfo.pkg needs reworked to use the standard ObjectClass function.

PS. The compiled Libraries are in the same order.

Sture
7-Jan-2017, 05:03 AM
Hi Russell,

Today I will attend to this problem WHILE AT THE SAME TIME baking a chocolate cake.

drumroll ...

-Sture

(in fact, the way I have already solved it is to rename the ObjectClass and ObjectClassName functions to _ObjectClass and _ObjectClassName in Win\ObjectInfo.pkg. But I will update StureApsPublicLib later today (depending upon the outcome of the cake)).

Sture
7-Jan-2017, 11:39 AM
Hi again,

I have uploaded a beta version of the library to this address (ftp://ftp.stureaps.dk/software/dataflex/stureapspubliclib/Beta/).

Once DataFlex 19 has been released a final version.

-Sture

Russell McDougall
7-Jan-2017, 07:20 PM
Grateful thanks.

Talking of cake - just off to Naseby Black Forest cafe for Rhubard and Rasberry cake to celebrate.

Garret Mott
7-Jan-2017, 10:31 PM
Of the cake or the version? ;)

Or is the cake gone by now?

Michael Mullan
7-Jan-2017, 10:41 PM
The cake is a lie.

Sture
8-Jan-2017, 03:17 PM
In between baking and eating it was no lie.

Focus
27-Sep-2017, 04:12 AM
Hi Sture

We have just come across this error using your library with 19.0 too

You Beta link now seem to be inactive

Do you have a link to the released version yet ?

Thanks

PS I assume there is no cake left ? !

Focus
27-Sep-2017, 05:20 AM
OK I can see here that there is a version from the 18th August

Having got this one applications compiles fine

However another complains of constants already defined

CSIDL_ADMINTOOLS etc

I can see these are enum in FileFunctions.pkg and FileFunctionsBeforeLogicInversion.pkg

It's complaining about the former because I assume it is finding the latter first

Sture
27-Sep-2017, 05:24 AM
Hi Andrew,

This shouuld cut it: ftp://ftp.stureaps.dk/software/dataflex/stureapspubliclib/

-Sture

Could be time to bake a new one.

Sture
27-Sep-2017, 05:35 AM
FileFunctionsBeforeLogicInversion.pkg is not for use, only for reference. (and you wouldn't consult it in the case)

I don't know what other package it clashes with. None of mine and not DF19 packages as far as I can tell.

-Sture

Focus
27-Sep-2017, 05:48 AM
OK thanks. It must be a clash with something else. Will investigate

Focus
29-Sep-2017, 03:10 AM
For reference a whole bunch of defines 'clash' with cWindowsEx library