[self-interest] Filing out Self code
Jecel Assumpcao Jr
jecel at merlintec.com
Wed May 12 03:24:31 UTC 2004
On Tuesday 11 May 2004 21:58, German Morales wrote:
> Hi everybody,
> I'm using Self4Linux.
> I've written some code in a Shell and now I have my objects happyly
> floating in the screen.
> My problem is that I need to put the written code in a document.
My trainee needed this too in order to include the sources in a report
he was writing for a class. I wrote a short piece of code to save the
sources for all the methods in a given object to a file. I don't think
I have that anymore, but it should be simple to rewrite it.
> I've tried different things without success:
> -Copy in Self4Linux, Paste in a linux text editor:
> Nothing happens. It seems that the Self clipboard
> is not connected with the outside world.
I see that 'xStoreBytes:' in 'traits xlib display' does make an effort
to save the contents into the X clipboard in addition to a local
buffer, but it doesn't seem to be working in Linux. I didn't have
better luck in Solaris.
> -Putting all the selectors in a Module, and writing it:
> Fails. I get this error:
> Error: ENOENT while trying to open file
> Receiver is: unixGlobals os_file.
The problem here is that all your files are in a single directory, but
on Solaris and Mac OS X you have a directory tree like
One alternative is to change the prefix that the transporter uses for
saving modules from "../objects/applications/" to "./", but it might be
easier to just put things in an "objects" subdirectory and create an
empty "applications" subdirectory inside that. Don't worry about the
".TMP", since that will be renamed to ".self" if there are no problems
during the file out (this is in order not to ruin a previous version of
the file in case there are problems).
The code generated by the transporter isn't very pretty, but if it isn't
very large you can easily edit away most of the extra stuff by hand.
More information about the Self-interest