[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] new methods: avoid chaos, including files



2005/12/30, Pit Noack <rauschabstand@xxxxxx>:
> Hello,
>
> My first post - i am a little bit exited!

Hello nossek! I'm excited too.


> If my questions demonstrate my complete ignorance of SCs philosophy let me
> know!
>
> First:
> Sometimes i would like to add methods to a "standard" SC Class instead of
> creating a subclass. But what do i do when there will be the next update?
> Do have to add all the methods again or is it possible to add methods to a
> class in another file to avoid confusion?

Yes, you can add them in another file - use the plus-sign to indicate
that you're adding to an existing class definition. For example:

+ Server {
     favouriteColor {
          ^Color.red;
     }
}




> Second:
> Is it possible to have a file executed automatically before executing other
> code in the workspace-window - think about something like #include in c.

Yes, you could use

executeFile(pathName)


Best
Dan
--
http://www.mcld.co.uk