View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001087 | Ecere SDK | ecere | public | 2014-07-11 01:35 | 2018-08-19 17:08 |
Reporter | jerome | Assigned To | jerome | ||
Priority | immediate | Severity | major | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 0.44.09 | ||||
Target Version | 0.44.10 64 | Fixed in Version | 0.44.10 64 | ||
Summary | 0001087: Various class:struct classes issues | ||||
Description | - Watches on a derived class:struct member whose base class has end-padding did not work - Alignment issues as derived classes are bundled together in a single struct - Derived class offset was not correct - OnGetString, OnGetDataFromString and JSON did not add class offset but should have - typed_object& methods when called as a member of a class:struct did not have proper reference level (the address of the class:struct instance should be passed) | ||||
Steps To Reproduce | import "ecere" ConsoleFile con { }; class BaseStruct : struct { public: void * type; int continued; }; static class DerivedStruct : BaseStruct { public: int y, x; }; class Form1 : Window { caption = $"Form1"; background = formColor; borderStyle = sizable; hasMaximize = true; hasMinimize = true; hasClose = true; clientSize = { 632, 438 }; Button button1 { this, caption = $"button1", position = { 296, 120 }; bool NotifyClicked(Button button, int x, int y, Modifiers mods) { DerivedStruct foo { y = 4, x = 5 }; char temp[100]; PrintLn(foo); foo.OnGetString(temp, null, null); PrintLn(temp); delete foo; foo.OnGetDataFromString(temp); WriteJSONObject(con, class(DerivedStruct), foo, 0); return true; } }; } Form1 form1 { }; ---------------- Debugger test: Watch on foo.x should say 5 | ||||
Tags | No tags attached. | ||||
|
Fixed by: https://github.com/ecere/ecere-sdk/commit/abfa4379c019b2bebc30a54331f0077bbe458208 |
|
Review in light of commit https://github.com/ecere/ecere-sdk/commit/62dd46bdb3860ba4ff7e927ad55bc0ab5877a723 which partially reverts the commit that fixed this. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-07-11 01:35 | jerome | New Issue | |
2014-07-11 01:35 | jerome | Status | new => assigned |
2014-07-11 01:35 | jerome | Assigned To | => jerome |
2014-07-11 01:55 | jerome | Note Added: 0001369 | |
2014-07-11 01:55 | jerome | Status | assigned => resolved |
2014-07-11 01:55 | jerome | Fixed in Version | => 0.44.10 64 |
2014-07-11 01:55 | jerome | Resolution | open => fixed |
2014-08-08 18:17 | jerome | Status | resolved => closed |
2018-08-19 17:08 | jerome | Note Added: 0001483 | |
2018-08-19 17:08 | jerome | Status | closed => resolved |