How to be certain that a class has_default

4 messages Options
Embed this post
Permalink
Chris Saunders-4

How to be certain that a class has_default

Reply Threaded More More options
Print post
Permalink
I have a class that inherits from ARRAY2.  The class is generic and the
generic part is declared like this: [G -> {COMPARABL rename default_create
as omparable_default_create, out as comparable_out, twin as comparable_twin
end, FIELD} create default_create end].  Notice that G must define
`default_create'.  When `default_create' is called I get this exception
"has_default: Precondition violated.".  I was expecting that has_default
from ARRAY must be fulfilled because G must have `default_create' defined.
Am I incorrect?

Regards
Chris Saunders

Peter Gummer-2

Re: How to be certain that a class has_default

Reply Threaded More More options
Print post
Permalink
Chris Saunders wrote:

> ...  I was expecting that has_default
> from ARRAY must be fulfilled because G must have `default_create'  
> defined.
> Am I incorrect?

No. 'has_default' has nothing to do with 'default_create'.

Didn't someone already answer this question for you a few weeks ago?

- Peter Gummer
Chris Saunders-4

Re: How to be certain that a class has_default

Reply Threaded More More options
Print post
Permalink
Peter, I did post a very similar question fairly recently and don't think I
received a reply that satisfied what I was looking for.  I may have not
asked the question very well.  What I'm looking for is a way to satisfy
has_default from class ARRAY.

Regards
Chris Saunders

----- Original Message -----
From: Peter Gummer
To: [hidden email]
Sent: Saturday, September 05, 2009 7:30 PM
Subject: Re: [eiffel_software] How to be certain that a class has_default


  Chris Saunders wrote:

> ... I was expecting that has_default
> from ARRAY must be fulfilled because G must have `default_create'
> defined.
> Am I incorrect?

No. 'has_default' has nothing to do with 'default_create'.

Didn't someone already answer this question for you a few weeks ago?

- Peter Gummer

 

Emmanuel Stapf

RE: How to be certain that a class has_default

Reply Threaded More More options
Print post
Permalink
`has_default' is True when it is an expanded type or a detachable type.

Regards,
Manu

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Chris Saunders
> Sent: Saturday, September 05, 2009 6:14 PM
> To: [hidden email]
> Subject: Re: [eiffel_software] How to be certain that a class has_default
>
> Peter, I did post a very similar question fairly recently and don't think
> I
> received a reply that satisfied what I was looking for.  I may have not
> asked the question very well.  What I'm looking for is a way to satisfy
> has_default from class ARRAY.
>
> Regards
> Chris Saunders
>
> ----- Original Message -----
> From: Peter Gummer
> To: [hidden email]
> Sent: Saturday, September 05, 2009 7:30 PM
> Subject: Re: [eiffel_software] How to be certain that a class has_default
>
>
>   Chris Saunders wrote:
>
> > ... I was expecting that has_default
> > from ARRAY must be fulfilled because G must have `default_create'
> > defined.
> > Am I incorrect?
>
> No. 'has_default' has nothing to do with 'default_create'.
>
> Didn't someone already answer this question for you a few weeks ago?
>
> - Peter Gummer
>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

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