Hi Jerome, i have seen something weird, when i typed a new structure like the following :
typedef struct {
int Type; char data[32]; double X,Y; int Point;
} FeedPacket;
then the editor is closing ecere when i use the code completion into a function , when i typed "." to access a member into that structure, if i replace "Point" with another name it won't crash.... ???
You just found (one of many remaining) auto-completion crashes :)
I will fix the crash. However, what happens is that Point is a registered structure in the Ecere runtime (with an int x and y members), so this would be a syntax error.
I strongly suggest you adopt the Ecere conventions of naming variables, data members and enumeration values starting with a lowercase (and then using camelCase for multiple words), while using words starting with an uppercase for functions and classes. This will avoid this kind of problem.
Another point here is that you are using the C style syntax for declaring your structure rather than the eC style which would go:
struct FeedPacket { int type; char data[32]; double x, y; int point; };
The eC syntax has many advantages whereas the C style syntax is mainly supported for C compatibility. You can read more about it in the chapter on Structures in the first section of www.ecere.com/tao.pdf .
Thank you Jerome, yes i know about the C syntax but i feel more comfortable at the moment using C structures since i am learning Ecere SDK....or maybe i am old fashioned or maybe just don't want to forget how the other part of the world is still coding lol...
in one file, and if in the same project, you open a new file and you type import "file1", you can still cannot access the Arrayof, it will display an error saying "MyStruct unknown"...not very important but just wanted to report it ;)
Yes that's because you are using C structs instead of eC structs. typedefs aren't available outside of an eC file. That is just one of the reasons why I recommend using the eC syntax.