ButtonTiles Class


#21

oh yes, oh yes, oh yes!


#22

Ok, I made a start:

How To: Create a Non-App Clarion project?

I will update here as I add more. Of course if anyone else wishes to contribute please do! I recommend using the docs category for now. If we get a bunch of these and it makes sense then we can look at creating a more specific category.


#23

Gah, I made the other one too!

How To: Open a Non-App Clarion project?


#24

@brahn

I’m having some issues implementing this in a multi dll solution.

Your example works fine.

It works fine in the data dll but the moment I include it in one of the other dlls I get compiler errors.

I’ve done the include in the App’s global includes which is fine.

INCLUDE('ButtonTile.inc'),ONCE
INCLUDE('TileManager.inc'),ONCE

The moment I implement the object in the procedure

Tiles           TileManager

I’m getting these compiler errors.

Unresolved External TYPE$TILEMANAGER 
Unresolved External VMT$TILEMANAGER 
Unresolved External [email protected] 
Unresolved External [email protected] 

Any thoughts?
Bertus


#25

Probably need to set the link and dll attributes in the class properly. I was lazy and hard coded them because I was using it in a single exe. Submit a PR to the github repo if you can!


#26

Oh wait, I just looked and they use the _ABCLinkMode_ and _ABCDllMode_ so that should work. Do you have those defines? Which version of clarion?


#27

It’s the latest release of C10 12799. I have those defined. If got another class which I wrote for auto completing with the same defines and that is working without problem.

The other strange thing I found is that your classes are not showing up in the ABC Class Viewer. I did move it to the Clarion10\accessory\libsrc\win folder.

The only reference I’m getting on VMT is the Virtual method table in Russ’ Book: https://books.google.com.au/books?id=Loo8iIBDOdcC&pg=PA36&dq=CLARION+VMt&hl=en&sa=X&ved=0ahUKEwihjffqpvDbAhUIx7wKHfwwBiUQ6AEIKTAA#v=onepage&q=CLARION%20VMt&f=false


#28

How about if you add this the first line of the inc files:

!ABCIncludeFile

#29

It is mentioned in the help file too in fact. In these three sections:

  • IMPLEMENTS(add methods to a CLASS)
  • Implementing of INTERFACEs in Derived Classes
  • Module Definition Files (.EXP Files), Exporting CLASSes

It’s this last one that seems to be most relevant, and should be fixed by including the !ABCIncludeFile

Exporting CLASSes

Exporting CLASS declarations requires a special form of export definition.

You must create two export definitions for the CLASS itself. The first begins with VMT$ followed by the name of the CLASS as the entryname. The second begins with TYPE$ followed by the name of the CLASS as the entryname. These are followed by an export definition for each method in the CLASS to export whose pwords must begin with the name of the CLASS as the first parameter.

For example:

EXPORTS
VMT$MYCLASS @?
TYPE$MYCLASS @?
[email protected] @?
[email protected] @?

#30

Adding the !ABCIncludeFile seemed to do the trick.

I wasn’t trying to export the class anyway.

If refactored your ButtonTile to TileButton just to put them together alphabetically.

I’ve put a template together for it as well, just to make the implementation smoother. The template uses the button’s background property as the Tile background.

You are welcome to have a look here and merge back to your Github if you are happy with the changes.


#31

It looks like the class has a problem with the Clarion resizer functionality.