What causes this VEVI error?

4 messages Options
Embed this post
Permalink
peter7723

What causes this VEVI error?

Reply Threaded More More options
Print post
Permalink
I have taken the plunge into the Void.

I have used create_interface_objects as suggested, but I get a VEVI error. I think it is from the argument `Current'.

I pass the argument so that it can be used in a `show_modal_to_window' instruction.

Now, object `main_window' references `weather_graph', passing `Current' as argument. Object `weather_graph' initialises entity `window' with this (reverse) reference to `main_window'.

[
   OBSERVATION and QUESTION 1: We have a cycle of references, so is
   it logically impossible to build all without at least one
   detached entity?
]

So, we have in MAIN_WINDOW, the feature
      create_interface_objects
         do
            ...
            create weather_graph.make(Current)
            ...
         end

        weather_graph: WEATHER_GRAPH

QUESTION 2: Is it the passing of argument `Current' that triggers this error?

==============================================================
2 VEVI: Variable is not properly set. Attribute: weather_graph: WEATHER_GRAPH from MAIN_WINDOW MAIN_WINDOW.create_interface_objects (root_cluster) 266, 31
                Error code: VEVI

Error: variable is not properly set.
What to do: ensure the variable is properly set by the corresponding
  setter instruction.

Class: MAIN_WINDOW
Feature: create_interface_objects
Creation procedure: default_create declared in EV_ANY
Attribute: weather_graph: WEATHER_GRAPH from MAIN_WINDOW
Line: 266
 
->      create weather_graph.make (Current)
        create sun_graph.make (Current)
--
Peter Horan             Faculty of Science and Technology
[hidden email]     Deakin University
+61-3-5221 1234 (Voice) Geelong, Victoria 3217, AUSTRALIA
+61-4-0831 2116 (Mobile)

-- The Eiffel guarantee: From specification to implementation
-- (http://www.cetus-links.org/oo_eiffel.html)



Emmanuel Stapf

RE: What causes this VEVI error?

Reply Threaded More More options
Print post
Permalink

>    OBSERVATION and QUESTION 1: We have a cycle of references, so is
>    it logically impossible to build all without at least one
>    detached entity?
> ]

That's right.
 
> QUESTION 2: Is it the passing of argument `Current' that triggers this
> error?

That's right because passing Current is only valid if all attached attributes have
been properly set.

Regards,
Manu
 

------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------  
Peter Gummer-2

Re: What causes this VEVI error?

Reply Threaded More More options
Print post
Permalink
In reply to this post by peter7723
Peter Horan wrote:

> I have taken the plunge into the Void.


You are not the first to have done so:

http://en.wikipedia.org/wiki/File:Le_Saut_Dans_le_Vide.jpg

It looks scary though.

- Peter Gummer
peter7723

Re: What causes this VEVI error?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Emmanuel Stapf
--- In [hidden email], "Emmanuel Stapf [ES]" <manus@...> wrote:
> > QUESTION 2: Is it the passing of argument `Current' that triggers
> > this error?
>
> That's right because passing Current is only valid if all attached
> attributes have been properly set.

Thanks for those clarifications.

Now, does your answer mean this is (sometimes) allowed?

      set_interface_objects
         do
            create weather_graph
               -- All attached attributes set
            weather_graph.set_window(Current)
         end

or must creation be completed as in the following?

      set_interface_objects
         do
            create weather_graph
         end

      initialize
         do
            weather_graph.set_window(Current)
         end
--
Peter Horan