Filing out Self code

German Morales germanmorales at delta-sys.com
Thu May 13 09:23:17 UTC 2004


Hi again, 
 
I've managed to get the module saved, but the result was not what I 
expected: my code wasn't there. What is a module anyway? I've told 
Self to put the selectors in a module ("Set Module..."), but that 
didn't have effect. Am I doing something wrong? 
 
Anyway, I got what I needed: my sources in a file outside Self. 
 
Since I got all the code carefully typed in a Shell, I could (with 
some effort) get an "inspector" to the string there, and finally did 
a printOnFile:. Is there a "normal" way to save the contents of a 
Shell? 
 
Thanks in advance, 
 
German Morales 
 
 
--- In self-interest at yahoogroups.com, "German Morales" 
<germanmorales at d...> wrote: 
> Thanks, I'll try.  
>   
> German Morales  
>   
> --- In self-interest at yahoogroups.com, Jecel Assumpcao Jr  
> <jecel at m...> wrote:  
> > 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.  
> >   
> > Great!  
> >   
> > > 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  
> > >        "../objects/applications/bar.TMP".  
> > >     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  
> >   
> > self  
> > self/manuals  
> > self/objects  
> > self/objects/applications  
> > self/objects/core  
> > self/objects/glue  
> > self/objects/graphics  
> > self/objects/misc  
> > self/objects/tests  
> > self/objects/ui1  
> > self/objects/ui2  
> > self/objects/ui2/outliner  
> > self/tutorials  
> >   
> > 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.  
> >   
> > -- Jecel 




More information about the Self-interest mailing list