Namespace problem?

2 views
Skip to first unread message

Mike Plavsky

unread,
May 21, 2008, 7:05:47 AM5/21/08
to Specter BDD Framework
Hi,

When I use fully qualified names (with namespace included) my specs
are doing great, but when I use ‘import’ directive it says: Read is
not a member of SpringConfigReader. So the following code works:

reader as SpringConfig.SpringConfigReader
reader = SpringConfig.SpringConfigReader()
objects = reader.Read( config )

and the following doesn’t:

import SpringConfig;

reader as SpringConfigReader
reader = SpringConfigReader()
objects = reader.Read( config )

Why?

Regards,
Mike

Cedric Vivier

unread,
May 21, 2008, 7:15:31 AM5/21/08
to specter-...@googlegroups.com
Weird!

Which version of Boo are you using? Please try again with 0.8.2 if not already on this version.

Btw you do not need to declare 'reader' with 'reader as SpringConfig.SpringConfigReader' as long as it is a local in one of your specify blocks. Boo does this automatically through type inference.

Regards,

Mike Plavsky

unread,
May 21, 2008, 9:49:00 AM5/21/08
to Specter BDD Framework
I use 0.8.2.2960, would you recommend to go to Boo guys with this?

Re inference yes, I know, but in fact I create reader in setup block,
just have sent short version.

On May 21, 3:15 pm, "Cedric Vivier" <cedr...@neonux.com> wrote:
> Weird!
>
> Which version of Boo are you using? Please try again with 0.8.2 if not
> already on this version.
>
> Btw you do not need to declare 'reader' with 'reader as
> SpringConfig.SpringConfigReader' as long as it is a local in one of your
> specify blocks. Boo does this automatically through type inference.
>
> Regards,
>
> On Wed, May 21, 2008 at 1:05 PM, Mike Plavsky <supermapl...@gmail.com>
> wrote:
>
>
>
>
>
> > Hi,
>
> > When I use fully qualified names (with namespace included) my specs
> > are doing great, but when I use 'import' directive it says: Read is
> > not a member of SpringConfigReader. So the following code works:
>
> > reader as SpringConfig.SpringConfigReader
> > reader = SpringConfig.SpringConfigReader()
> > objects = reader.Read( config )
>
> > and the following doesn't:
>
> > import SpringConfig;
>
> > reader as SpringConfigReader
> > reader = SpringConfigReader()
> > objects = reader.Read( config )
>
> > Why?
>
> > Regards,
> > Mike- Hide quoted text -
>
> - Show quoted text -

Mike Plavsky

unread,
May 21, 2008, 10:18:53 AM5/21/08
to Specter BDD Framework
Additional information: just 'boo' code (w/o specter specs) works
perfectly - no compiler errors. So it looks like problem in Specter
framework :( This is a full version of what works fine:

import SpringConfig


config = """<?xml version='1.0' encoding='utf-8' ?>
<objects xmlns='http://www.springframework.net'>
<object id='Object1'>
<property name='Property1' value =
'Value1'/>
</object>
</objects>
"""

reader = SpringConfigReader()
objects = reader.Read( config )

> > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages