From: Christian C. <chc...@cl...> - 2001-08-12 09:06:01
|
Eric Bezault wrote : > > Christian Couder wrote: > > > > It solves the typing problem because it's shorter, but it doesn't solve > > the problem that you will in many cases have to create 2 features in > > many classes instead of only one > > The routine should be define once and for all in the > ancestor class. Ok, so I agree with you that put_line features are a good thing, but I don't think they solve the whole problem. For example if you want to set a multi-line message in a message box, you can use one of the following : 1) msg_box.set_msg(error_header + eol + error_msg + eol + help_msg) 2) msg_box.set_msg(error_header + "%N" + error_msg + "%N" + help_msg) 3) my_msg.append_line(error_header) my_msg.append_line(error_msg) my_msg.append_string(help_msg) msg_box.set_msg(my_msg) From this example you can see that 1) is both very short and likely to be portable, while 2) is not likely to be portable and 3) is not short. Regards, Christian. |