axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

TableViewCell, TableView & TableViewDataSource compilation error #1314

Closed asnagni closed 1 year ago

asnagni commented 1 year ago

We are migrating from Cocos2d-x to Axmol and we are having issues with the classes "TableViewDataSource", "TableView", and "TableViewCell". Our assumption is that these classes are in the namespace 'ax::extension'. But when we build our code that we are trying to migrate to Axmol we will have some compilation errors:

  1. error: no type named 'TableView' in namespace 'ax::extension'
  2. error: no type named 'TableViewCell' in namespace 'ax::extension'

My questions would be: 1) The TableView classes, are they in the namespace 'ax::extension'? 2) If the answer to the first question is no, did you move them in a different name space. If yes, what would be that namespace 3) Perhaps these classes were replaced by new ones. If that is case, what would they be?

Thank you for you help. Stay safe

rh101 commented 1 year ago

This kind of question is a little strange, given that any modern IDE or text editor has text search functionality.

The classes are in fact there, in the ax::extension namespace, and the files are in the extensions/GUI directory: image

You can also look at the cpp-tests to verify that it exists, and how it works in the tests.

So, once you have verified that the code exists within the project (via the aforementioned text search functionality), you then need to look at your own code, and at a guess, it would be either an issue with the include statements, or something incorrect in the CMakeLists.txt of your project.

The extensions are build by ensuring AX_ENABLE_EXT_GUI is set correctly, and it defaults to true in core/CMakeLists.txt: option(AX_ENABLE_EXT_GUI "Build extension GUI" ON)

Check if you have set AX_ENABLE_EXT_GUI to OFF or false for some reason.

asnagni commented 1 year ago

Hi RH, I hope you are doing great. There is no strange questions 😊😊😊😊😊😊. Better ask than pretend to know 😂. We tried lot of things but since we couldn’t solved our issue that is why we asked. We will check to make sure that the option “AX_ENABLE_EXT_GUI” is set to ON. We also saw the example that you are referring. It’s the same like cocos2d-x but it was moved (the folder structure is different).

I’m sure we missed something that will look obvious to us when we will resume the work tomorrow. Thank you very much for your help, I do appreciate. We will look into it tomorrow. 

Thank you, Stay safe.

On Aug 29, 2023, at 7:50 PM, RH @.***> wrote:

This kind of question is a little strange, given any modern IDE or text editor has text search functionality.

The classes are in fact there, in the ax::extension namespace, and the files are in the extensions/GUI directory: https://user-images.githubusercontent.com/8603230/264188299-6bf5badf-aeea-4593-92d3-37c1549fbc5d.png You can also look at the cpp-tests to verify that it exists, and how it works in the tests.

So, once you have verified that the code exists within the project (via the aforementioned text search functionality), you then need to look at your own code, and at a guess, it would be either an issue with the include statements, or something incorrect in the CMakeLists.txt of your project.

The extensions are build by ensuring AX_ENABLE_EXT_GUI is set correctly, and it defaults to true in core/CMakeLists.txt: option(AX_ENABLE_EXT_GUI "Build extension GUI" ON)

Check if you have set AX_ENABLE_EXT_GUI to OFF or false for some reason.

— Reply to this email directly, view it on GitHub https://github.com/axmolengine/axmol/issues/1314#issuecomment-1698291393, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI54DTGOWUYK55O3BVCZE7DXXZ54RANCNFSM6AAAAAA4DQSFXM. You are receiving this because you authored the thread.

asnagni commented 1 year ago

“AX_ENABLE_EXT_GUI” was set to OFF. We set it up to ON and everything was fine.

Thank you

asnagni commented 1 year ago

Issue was fixed