Re: How to split a project in multiple files

gatesphere <[email protected]> Thu, 08 Dec 2011 13:40:44 -0500
Newsgroups gmane.comp.lang.io
Message-ID <[email protected]>
Within your DBus class, you should make a slot called Client, which 
loads your Client.io.

DBus := Object clone do(
    // ...
   Client := doFile("Client.io")
)

... on second thought, this can be shortened to the following:

DBus := Object clone do(
   // ...
   doFile("Client.io")
)

As for autoloading subprotos, I'm not sure, but if you structure your 
DBus object like that, referencing a DBus object would pull in your 
Client object as a slot of DBus, so in theory

DBus Client

would work on the first run.

-->Jake

On 12/8/2011 10:47 AM, Mildred Ki'Lya wrote:
>
> Hi,
>
> I started writing a DBus client library (you can find it on github). 
> This is also my first project in Io, so I need to grasp a few things 
> first.
>
> I just noticed that all my objects are directly in the Lobby. My dBus 
> client is called "Lobby Client" instead of "Lobby DBus Client". This 
> is the same for all the other objects.
>
> Until now, I was using the auto importer feature. That is, if you 
> request an object name to the lobby, it will import the file 
> containing it. That is, if I request "Lobby Client", the file 
> Client.io will be imported. The problem is that if I request "Lobby 
> DBus Client", the file DBus.io will be imported and not Client.io 
> which now contains the sub-object.
>
> Do you have an idea how I could structure my objects and files so it 
> would work?
>
> Thank you,
>
> Mildred
>
>