Michael Sweet wrote:
> FWIW, if we just rename the Fl_Input method then existing code
> that uses position(start,end) will have a very visible effect
> when the program is run.

        That's assuming position(int,int) is called during normal
        operation of the app.

        The program might not ever call position() under normal
        circumstances, and thus be hard to find.

        Also, depending on the input value's contents,
        using a 1.1.x program compiled against 1.3.x,
        the widget could simply 'disappear', leaving most people
        either scratching their heads, or reporting it to us as a "bug"
        (over and over..)

        There might be a long delay in the user seeing the problem,
        since it depends on when the app gets around to calling position().

        I wonder if there's a standard compiler mechanism (pragma?)
        we can have that trigger compiler warnings/errors if someone calls
        input->position(int,int).. it could say:

                Fl_Input::position() is obsolete.
                Either use Fl_Input::select() (to change cursor positions),
                or use Fl_Widget::position() (to change the x/y position).

        I guess this could be a compiler hook similar to the mechanism
        MS uses for the "sprintf() is deprecated, use _snprintf() instead" 
warnings.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to