Since some time, the error trace output looks a bit messy. Especially for objects that hold arrays of other objects. Here an example:
The same holds for
Maikel and me think the log output of objects should be limited to object number and name (as it was before?), for anything more detailed, developers can and should use the IDE (eclipse) as this output as such is not helpful anyway.
Günther, I guess you implemented the detailed object logging, can you revert it to a state that is readable? :-)
ERROR: object call: no function "setMenu" in object "{#338, hWeaponAnimStrike = nil, Prototype = {Axe, ...}}".
by: AddItem({#338, hWeaponAnimStrike = nil, Prototype = {Axe, ...}},1) (obj #657) (planet\Objects.ocd\HUD.ocd\Menu.ocd\Script.c:97)
by: PutObjects({Menu = {#658, ...}, Object = {#32, ...}},{Menu = {#657, ...}, Object = {#325, ...}},{#659, item_object = {#338, ...}, Parallaxity = [...], item_data = [...], Visibility = 2, Name = "Axe", Prototype = {GUI_MenuItem, ...}, item_count = 1, MouseDragImage = {#338, ...}, item_menu = {#658, ...}, item_size = 1104},1) (obj #656) (planet\Objects.ocd\HUD.ocd\Menu.ocd\ContentsMenuController.ocd\Script.c:193)
by: MoveObjects({Menu = {#658, ...}, Object = {#32, ...}},{Menu = {#657, ...}, Object = {#325, ...}},{#659, item_object = {#338, ...}, Parallaxity = [...], item_data = [...], Visibility = 2, Name = "Axe", Prototype = {GUI_MenuItem, ...}, item_count = 1, MouseDragImage = {#338, ...}, item_menu = {#658, ...}, item_size = 1104},1) (obj #656) (planet\Objects.ocd\HUD.ocd\Menu.ocd\ContentsMenuController.ocd\Script.c:231)
by: OnItemSelection({#658, menu_items = [...], Parallaxity = [...], menu_shown = true, Visibility = 2, Prototype = {GUI_Menu, ...}, dragdrop = true, menu_commander = {#656, ...}, menu_object = {#325, ...}},{#659, item_object = {#338, ...}, Parallaxity = [...], item_data = [...], Visibility = 2, Name = "Axe", Prototype = {GUI_MenuItem, ...}, item_count = 1, MouseDragImage = {#338, ...}, item_menu = {#658, ...}, item_size = 1104}) (obj #656) (planet\Objects.ocd\HUD.ocd\Menu.ocd\ContentsMenuController.ocd\Script.c:246)
by: OnItemSelection({#659, item_object = {#338, ...}, Parallaxity = [...], item_data = [...], Visibility = 2, Name = "Axe", Prototype = {GUI_MenuItem, ...}, item_count = 1, MouseDragImage = {#338, ...}, item_menu = {#658, ...}, item_size = 1104}) (obj #658) (planet\Objects.ocd\HUD.ocd\Menu.ocd\Script.c:264)
by: MouseSelection() (obj #659) (planet\Objects.ocd\HUD.ocd\Menu.ocd\MenuItem.ocd\Script.c:37)
The same holds for
Log("%v",someobj)
. Maikel and me think the log output of objects should be limited to object number and name (as it was before?), for anything more detailed, developers can and should use the IDE (eclipse) as this output as such is not helpful anyway.
Günther, I guess you implemented the detailed object logging, can you revert it to a state that is readable? :-)
That would make Arrays and pure PropLists that much more verbose than Objects. Okay, objects and definitions you can examine later given the Number resp. Id, so verbosity there isn't needed as much. Or do you have other arguments? I tried to find a balance between too much and too little information, and a straight revert isn't possible since you could kill the engine by printing an array with a loop before, so we need some more design work than just "readable"...
My suggestion is to treat objects differently than proplists in the trace log. It should look like this:
ERROR: object call: no function "setMenu" in object #338.
by: AddItem(obj #338,1) (obj #657) (planet\Objects.ocd\HUD.ocd\Menu.ocd\Script.c:97)
by: PutObjects({Menu = obj #658, Object = obj #32},{Menu = obj #657, Object = obj #325}, obj #659,1) (obj #656) (planet\Objects.ocd\HUD.ocd\Menu.ocd\ContentsMenuController.ocd\Script.c:193)
by: MoveObjects({Menu = obj #658, Object = obj #32},{Menu = obj #657, Object = obj #325}, obj #659,1) (obj #656) (planet\Objects.ocd\HUD.ocd\Menu.ocd\ContentsMenuController.ocd\Script.c:231)
by: OnItemSelection(obj #658, obj #659) (obj #656) (planet\Objects.ocd\HUD.ocd\Menu.ocd\ContentsMenuController.ocd\Script.c:246)
by: OnItemSelection(obj #659) (obj #658) (planet\Objects.ocd\HUD.ocd\Menu.ocd\Script.c:264)
by: MouseSelection() (obj #659) (planet\Objects.ocd\HUD.ocd\Menu.ocd\MenuItem.ocd\Script.c:37)
What about an ability to attach a format string as a property to a proplist? So you would do something like definition.displayString = "$name$ #$number$", and the toString-method of proplists would respect that property if it finds it?
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill