2023-12-02 01:02 PM - edited 2023-12-02 02:00 PM
Hello all,
Maybe someone knows, why the STM32CubeIDE don,t reconize touchgfx::ScalableImage bat_img_w image?
The error message is "Write occurrence of 'ScalableImage'". Of course I genererate code on TouchGFXDesigner and after in STM32CubeIDE. The Image objects ale reconized correctly but ScalableImage don't. I can't use not reconized object in MainScreenView. Below generated code from TouchGFX.
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef MAINSCREENVIEWBASE_HPP
#define MAINSCREENVIEWBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <mvp/View.hpp>
#include <gui/mainscreen_screen/MainScreenPresenter.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/Image.hpp>
#include <touchgfx/widgets/ScalableImage.hpp>
class MainScreenViewBase : public touchgfx::View<MainScreenPresenter>
{
public:
MainScreenViewBase();
virtual ~MainScreenViewBase();
virtual void setupScreen();
virtual void handleTickEvent();
virtual void handleKeyEvent(uint8_t key);
/*
* Virtual Action Handlers
*/
virtual void tickSlot()
{
// Override and implement this function in MainScreen
}
virtual void toLightScreen()
{
// Override and implement this function in MainScreen
}
virtual void toDarkScreen()
{
// Override and implement this function in MainScreen
}
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::Box __background;
touchgfx::Image light_background;
touchgfx::Image dark_background;
touchgfx::ScalableImage bat_img_w;
private:
};
#endif // MAINSCREENVIEWBASE_HPP
Thanks for helping me :)
Some example from STM32CubeIDE:
Code on simulator and STM32 Discovery works fine, but STM32CubeIDE don't suggests any functions after pressing ALT + Space
Solved! Go to Solution.
2023-12-16 12:00 AM
Hello
I fix it by rebuild index. In STM32IDE, project -> C/C++ index -> rebuild
2023-12-13 05:30 AM
Hello @MSzła.1 ,
It is possible that sometimes when you modify your project and add new code to it, the project in CubeIDE or Visual Studio do not update correctly to accommodate your new code. First please make a backup of your project, then remove your project from the CubeIDE workspace (by right-clicking and selecting delete).
After that, delete the build, config, and generated folders from your TouchGFX folder, and finally, regenerate code from the TouchGFX designer. Now, if you open your project again in CubeIDE, the Scalable image should be recognized.
Please update us with the result of this solution.
Good luck
2023-12-16 12:00 AM
Hello
I fix it by rebuild index. In STM32IDE, project -> C/C++ index -> rebuild
2023-12-18 01:57 AM
Oh nice, good to know.
Thanks for sharing