cancel
Showing results for 
Search instead for 
Did you mean: 

Error when using custom widget.

Hosting
Associate III

Hey.

I'm trying to use a custom widget. Error:

---------------------------

Microsoft Visual C++ Runtime Library

---------------------------

Assertion failed!

Program: ...mulator\msvs\..\..\build\Debug\bin\Application.exe

File: ..\..\..\..\framework\source\touchgf...\CanvasWidget.cpp

Line: 40

Expression: canvasPainter != 0 && "No painter set"

For information on how your program can cause an assertion

failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)

---------------------------

PS: Problem solved. Was my inattention

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Hi @Hosting​,

Glad you solved it. For everyone else, the problem was that no "Painter" was defined for the CanvasWidget. The Painter knows how to render to various depths of framebuffers. e.g. the PainterRGB565 class can render to 16-bit framebuffers in the RGB565 format.

/Martin

View solution in original post

1 REPLY 1
Martin KJELDSEN
Chief III

Hi @Hosting​,

Glad you solved it. For everyone else, the problem was that no "Painter" was defined for the CanvasWidget. The Painter knows how to render to various depths of framebuffers. e.g. the PainterRGB565 class can render to 16-bit framebuffers in the RGB565 format.

/Martin