dconway@rhea.trl.oz ( Switched Networks) (06/01/89)
I've been attempting to create a graphics application using the X1.1 Eiffel library (version one). Everything proceeded smoothly until I tried accepting input events. Obviously, I do not understand something vital, because errors are all I seem to produce. (BTW, I feel the "self documenting" features of Eiffel are not sufficient when it comes to learning new classes. Without some indication of what metaphor a particular class is implementing, it can be slow-going trying to understand individual features of the class. Perhaps the commenting in version one left something to be desired?) Yes, I know I should wait until release two filters down to Australia but I need this demo done yesterday, or preferably last week. Besides it is the understanding of the classes I really need, regardless of version. So (in decreasing order of preference): 1. Does anyone have the source of a small windowing application (following the mouse, popping up menus, etc.) they could send me? The best way to understand where I'm going wrong is to see where others went right. or 2. Can someone suggest a reference on the underlying metaphor of the graphics classes? (Something beyond "short" and the Eiffel documentation!) or 3. Can someone explain why this: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class simple2 inherit viewable feature Create(args:arguments) is local in:input; w:world; wi:window; s,t,b:point; do t.create(1.0,1.0); b.create(600.0,600.0); w.Create; w.set_limits(t,b); wi.create; wi.set_width(500.0); wi.set_height(500.0); wi.put_at_absolute(1.0,1.0); wi.associate_world(w); in.create; in.attach(wi); from until false loop in.accept_event; -- process event end; end; end ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ produces: System execution failed. Below is the sequence of recorded exceptions: -------------------------------------------------------------------------------- Object Class Routine Nature of exception Effect -------------------------------------------------------------------------------- ECA98 INPUT accept_event "active_window_not_void": (From GEN_INPUT) Precondition violated. Fail -------------------------------------------------------------------------------- ECA98 INPUT accept_event Routine failure. (From GEN_INPUT) Fail -------------------------------------------------------------------------------- EEF1C SIMPLE2 create Routine failure. Fail -------------------------------------------------------------------------------- and how I could have analysed the problem myself on the basis of "short", etc? Thanx in advance, damian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ who: Damian Conway email:..!seismo!munnari!rhea.trl.oz!dconway where: Network Analysis Section phone: +61-3-541-6270 SNRB, Telecom Research Labs quote: "Zen mind, beginner's mind." Clayton South building (CS) 22 Winterton Road Clayton 3168 AUSTRALIA