what about:
booc.exe input.boo /eagerimport

eagerimport => always try to load references (from the current directory)
even if the namespace already exists



On Thu, Oct 2, 2008 at 8:19 PM, Ayende Rahien <[EMAIL PROTECTED]> wrote:

> More than that, if the namespace cannot be found the boo compiler will look
> for an assembly with the same name.So:
> import foo.bar.baz
>
> Will look for assemblies named:
> foo.bar.baz
> foo.bar
> foo
>
> Before giving up.
> The problem is that mscorlib already contains System.Web
>
> On Thu, Oct 2, 2008 at 11:02 AM, Gabriel Schenker <[EMAIL PROTECTED]>wrote:
>
>> that makes sense.
>>
>>
>> On Thu, Oct 2, 2008 at 9:57 AM, Ken Egozi <[EMAIL PROTECTED]> wrote:
>>
>>> I believe it's a matter of references.
>>>
>>> by default the boo compiler references mscorlib for every compilation,
>>> while System.Web.dll is optional.
>>> Same as in csc and vbc
>>>
>>>
>>> On Thu, Oct 2, 2008 at 10:50 AM, Gabriel Schenker <[EMAIL PROTECTED]>wrote:
>>>
>>>> that was quick! thanks. It works now.
>>>> But just a question: when do I have to add the "from" to the import
>>>> statement and when not
>>>> Is e.g. the mscorlib.dll automatically recognized and all others not?
>>>>
>>>> On Thu, Oct 2, 2008 at 9:47 AM, Ayende Rahien <[EMAIL PROTECTED]>wrote:
>>>>
>>>>> import System.Web from System.Web
>>>>>
>>>>>
>>>>> On Thu, Oct 2, 2008 at 10:42 AM, Gabriel Schenker <
>>>>> [EMAIL PROTECTED]> wrote:
>>>>>
>>>>>> ok, I try this one (copied from Castle C# code...)
>>>>>>
>>>>>> import System.Web
>>>>>>
>>>>>> def applicationPath():
>>>>>>   path = HttpContext.Current.Request.ApplicationPath
>>>>>>   if "/".Equals(path):
>>>>>>     path = string.Empty;
>>>>>>   end
>>>>>>   return path
>>>>>> end
>>>>>>
>>>>>> // some more code here...
>>>>>>
>>>>>> but I get the following error now:
>>>>>>
>>>>>>
>>>>>> * Exception Details: *Castle.MonoRail.Framework.MonoRailException:
>>>>>> CommonScripts\statusImage.brail(1,1): BCE0005:
>>>>>> Boo.Lang.Compiler.CompilerError: Unknown identifier: 'HttpContext'.
>>>>>>
>>>>>> interestingly I have no problems with other namespaces and/or classes
>>>>>> of the .NET framework, e.g. System.Threading.Thread
>>>>>>
>>>>>> what am I missing?
>>>>>>
>>>>>> On Wed, Oct 1, 2008 at 11:15 AM, Ayende Rahien <[EMAIL PROTECTED]>wrote:
>>>>>>
>>>>>>> You can't, unfortunately.
>>>>>>> Common Scripts are just plain boo files, no brail magic.
>>>>>>> You can access that from the HttpContext, I assume.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Oct 1, 2008 at 11:44 AM, Gabriel Schenker <
>>>>>>> [EMAIL PROTECTED]> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> I try to write a common script in brail and want to access the
>>>>>>>> siteRoot parameter.
>>>>>>>> But the compiler tells me, that it is not found...
>>>>>>>>
>>>>>>>> my definition of the script is
>>>>>>>>
>>>>>>>> def statusImage(status, title):
>>>>>>>>  return "<img src='${siteRoot}/images/status_${status}.png' alt='$
>>>>>>>> {title}' title='${title}' />"
>>>>>>>> end
>>>>>>>>
>>>>>>>> the exception is:
>>>>>>>>
>>>>>>>> Exception Details: Castle.MonoRail.Framework.MonoRailException:
>>>>>>>> CommonScripts\statusImage.brail(1,1): BCE0005:
>>>>>>>> Boo.Lang.Compiler.CompilerError: Unknown identifier: 'siteRoot'.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Ken Egozi.
>>> http://www.kenegozi.com/blog
>>> http://www.musicglue.com
>>> http://www.castleproject.org
>>> http://www.gotfriends.co.il
>>>
>>>
>>>
>>
>>
>>
>
> >
>


-- 
Ken Egozi.
http://www.kenegozi.com/blog
http://www.musicglue.com
http://www.castleproject.org
http://www.gotfriends.co.il

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to