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

--~--~---------~--~----~------------~-------~--~----~
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