Tool/software: Code Composer Studio
Hello,
Is it possible to bind a cpp object in GUI Composer v1? If so, how?
Thanks,
Stephen
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hello,
Is it possible to bind a cpp object in GUI Composer v1? If so, how?
Thanks,
Stephen
Hi Stephen,
It works the same as C project, declare the object that you want GC to bind to as a global object.
For example:
class Rectangle {
int width, height;
public:
void set_values (int,int);
int area() {return width*height;}
};
void Rectangle::set_values (int x, int y) {
width = x;
height = y;
}
Rectangle rect;
int main () {
rect.set_values (3,4);
cout << "area: " << rect.area();
return 0;
}
You should be able bind rect.width to a widget in GC.
Regards,
Patrick