Hello Penn,
thank you for your answer.
For the string return it works now, but what about returning structs?
example: (Building small GUI with 2 checkboxes and return
the struct that catches the values the user set)
#include <Origin.h>
#include <GetNbox.h>
typedef struct tagGUIValues{
bool a;
bool b;
bool bGUICanceld;
} GUIVALUES;
GUIVALUES openGUI(){
GUIVALUES gv;
// Build GUI
GETN_TREE(tr)
GETN_CHECK(a, "Checkbox 1", false)
GETN_CHECK(b, "Checkbox 2", true)
// initialize GUI and read values into struct
if(GetNBox(tr, "label text", "some other text")){
gv.a = tr.a.nVal;
gv.b = tr.b.nVal;
gv.bGUICanceld = false;
return gv;
}
else {
gv.bGUICanceld = true;
out_str("GUI canceld!");
return gv;
}
}
This is definetly corect code and compiles fine, runs fine, but creates the same
error message as with the "return string" example above.
-------------------------------------------
Another question concernig basic I/O operations
we have
out_int("number is = ",12); //for int
out_str("number is = 12"); // for strings
out_double("number is = ",12.00); //for double
out_tree ... // for trees
what about something like "out_bool();"
Does s.th. like this exists?
greets
datrix