[Scilab-Dev] Adding new properties to graphic objects
Stéphane Mottelet
stephane.mottelet at utc.fr
Fri Apr 6 16:40:58 CEST 2018
Hello,
I just want to give my impressions about the tedious task of adding a
new property to a graphic object, e.g. here a "SnapToTicks" property to
the Slider, directly mapped to the SnapToTicks property of the Java
widget: besides two makefile and the modification to the documentation I
had to create two and modify *11* C,C++ and Java sources files (see the
CR @ https://codereview.scilab.org/#/c/19937/):
scilab/modules/graphic_objects/src/scripts/propertiesMap.properties
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/uicontrol/Uicontrol.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/xmlloader/XMLDomLoader.java
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
scilab/modules/gui/includes/GetUicontrol.h
scilab/modules/gui/includes/SetUicontrol.h
scilab/modules/gui/sci_gateway/c/sci_uicontrol.c
scilab/modules/gui/src/cpp/GetUicontrolSnapToTicks.cpp (NEW)
scilab/modules/gui/src/cpp/SetUicontrolSnapToTicks.cpp (NEW)
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/slider/SwingScilabSlider.java
scilab/modules/hdf5/src/cpp/handle_properties.hxx
Frankly, don't you find that it sucks ?
Many properties could be added at the Scilab level (by using macros) if
we had an overloading mechanism e.g when the user types something like
h.newprop=stuff. Don't you find that such a mechanism could be useful ?
S.
--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
More information about the dev
mailing list