Boo newbie questions

View: New views
8 Messages — Rating Filter:   Alert me  

Boo newbie questions

by Weave :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have a couple of newbie questions I hope someone will help me with:

How do I refer to one module from another?
For example I have a module called mod1.boo that contains a function
called do_this(), I want to call do_this() from mod2.boo - how do I do
it?

I am trying Boo within MonoDevelop on a computer running Linux Mint, I
can run/build boo scripts from within MonoDevelop but what I end up
with is a Windows *.exe file. I can reboot in Vista and sure enough it
runs OK (albeit accompanied with a command window) but I how do I run
the compiled program on Linux?

Thanks in advance
Weave


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Boo newbie questions

by Montel Edwards-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I cant help you with the first, but with the second.
 Those are not just "Windows exe files" they are mono/.net files.
It can be ran in Linux by having Mono installed.
You said you had Linux Mint and I believe that there is a package "mono-common".
Once that is installed, open a terminal and do
mono <fiename.exe>
so if I wanted to run a file boo.exe i would do
mono boo.exe



On Sun, Sep 27, 2009 at 3:43 PM, the.weavster <steve@...> wrote:

>
> I have a couple of newbie questions I hope someone will help me with:
>
> How do I refer to one module from another?
> For example I have a module called mod1.boo that contains a function
> called do_this(), I want to call do_this() from mod2.boo - how do I do
> it?
>
> I am trying Boo within MonoDevelop on a computer running Linux Mint, I
> can run/build boo scripts from within MonoDevelop but what I end up
> with is a Windows *.exe file. I can reboot in Vista and sure enough it
> runs OK (albeit accompanied with a command window) but I how do I run
> the compiled program on Linux?
>
> Thanks in advance
> Weave
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Boo newbie questions

by Cedric Vivier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

On Mon, Sep 28, 2009 at 4:43 AM, the.weavster <steve@...> wrote:
How do I refer to one module from another?
For example I have a module called mod1.boo that contains a function
called do_this(), I want to call do_this() from mod2.boo - how do I do
it?

If you compiled mod1.boo as a library (dll), then compiling mod2.boo with "-r:mod1.dll" flag will allow you to reference mod1's methods.
See "booc -help" for more information.

Cheers,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Boo newbie questions

by Weave :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thank you both for your help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Boo newbie questions

by Weave :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Just to clarify, if my module references multiple libraries do I call -
r: for each library or is there a delimiter?

For example if I required methods from library1.dll and library2.dll
would I call

-r:library1.dll -r:library2.dll

or -r: <followed by a list of libraries separated by a delimiter...>
(if so what is the delimiter?)

If I then distribute my application do I just need to put my own
libraries in the same folder as the main executable?

Thanks again.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Boo newbie questions

by Cedric Vivier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Sep 29, 2009 at 12:48 AM, the.weavster <steve@...> wrote:
Just to clarify, if my module references multiple libraries do I call -
r: for each library or is there a delimiter?

Both works. You can see that in "booc -help" (delimiter being comma ",").


If I then distribute my application do I just need to put my own
libraries in the same folder as the main executable?


Yes, this is how .NET assembly loading works (first checks the current directory).

Cheers,

 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Boo newbie questions

by horace3d@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Mon, Sep 28, 2009 at 5:25 PM, Cedric Vivier <cedricv@...> wrote:
Hi!


On Mon, Sep 28, 2009 at 4:43 AM, the.weavster <steve@...> wrote:
How do I refer to one module from another?
For example I have a module called mod1.boo that contains a function
called do_this(), I want to call do_this() from mod2.boo - how do I do
it?

If you compiled mod1.boo as a library (dll), then compiling mod2.boo with "-r:mod1.dll" flag will allow you to reference mod1's methods.
See "booc -help" for more information.



i am new to boo and .net and also wondered about this.

how would i set up a boo project with multiple source files with sharpdevelop?

is it the usual way to compile a dll for every source file? isn't it possible like with c/c++ to compile multiple source files into a single dll or exe?




Cheers,





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Boo newbie questions

by Justin Chase-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes normally you would include them all into one exe or dll by adding them to a .booproj file. Then compiling that .booproj file with msbuild (in windows) or mono. The .booproj file is essentially an xml config file similar to Ant for java. If you create a boo project in sharp develop it should automatically create this file for you and give you IDE hooks for adding files to that project. You can reference things you define in other files by wrapping them in classes and namespaces. You can really only have one entry point module per project everything else needs to be in a class.

On Mon, Sep 28, 2009 at 5:04 PM, horace <horace3d@...> wrote:


On Mon, Sep 28, 2009 at 5:25 PM, Cedric Vivier <cedricv@...> wrote:
Hi!


On Mon, Sep 28, 2009 at 4:43 AM, the.weavster <steve@...> wrote:
How do I refer to one module from another?
For example I have a module called mod1.boo that contains a function
called do_this(), I want to call do_this() from mod2.boo - how do I do
it?

If you compiled mod1.boo as a library (dll), then compiling mod2.boo with "-r:mod1.dll" flag will allow you to reference mod1's methods.
See "booc -help" for more information.



i am new to boo and .net and also wondered about this.

how would i set up a boo project with multiple source files with sharpdevelop?

is it the usual way to compile a dll for every source file? isn't it possible like with c/c++ to compile multiple source files into a single dll or exe?




Cheers,









--
Justin Chase
http://www.justnbusiness.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Boo Programming Language" group.
To post to this group, send email to boolang@...
To unsubscribe from this group, send email to boolang+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/boolang?hl=en
-~----------~----~----~----~------~----~------~--~---