Hi,
I would like to fileout the content of Transcript. But it doesn't seem to be possible because "Squeak Transcript (different from VW Transcript) is the stream of not yet appened text" (nicolas cellier). (How about pharo ?) One solution seems to be to add a dependent to Transcript and log stuff on "updated: #appendEntry". Is there a more practical solution ? Regards, Guillaume Grondin previous discussion on this matter : http://marc.info/?l=squeak-dev&m=119282200100489&w=2 http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2498160 > On Saturday 20 October 2007 3:00 am, nicolas cellier wrote: > >> Transcript must now be viewed as a TranscriptingService you'll have to >> subscribe to... For that reason I would rather call it a Subscript! -- Guillaume GRONDIN (Dr) Ph.D in Computer Science =========================================== Ecole des Mines de Douai - Dept. I.A. 941, rue Charles Bourseul BP 10838 - 59508 Douai Cedex, France Tél : (+33) (0) 3 27 71 24 53 Fax : (+33) (0) 3 27 71 29 17 Email: [hidden email] http://vst.ensm-douai.fr/grondin _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Just playing around. This is probably not thread safe and also not
nice but here it is. I added an inst var log (maybe subclass would be better) and then changed endEntry like below : endEntry "Display all the characters since the last endEntry, and reset the stream" accessSemaphore critical:[ self changed: #appendEntry. log ifNil: [log := WriteStream new]. log nextPutAll: stream contents. stream reset ]. actualEntry ^log contents It actually log whats written programaticaly to the transcript but not what's written directly in it (like in a workspace). hth, Cédrick 2009/7/30 Guillaume Grondin <[hidden email]>: > Hi, > > I would like to fileout the content of Transcript. But it doesn't seem to be > possible because "Squeak Transcript (different from VW Transcript) is the > stream of not yet appened text" (nicolas cellier). (How about pharo ?) > > One solution seems to be to add a dependent to Transcript and log stuff on > "updated: #appendEntry". Is there a more practical solution ? > > Regards, > Guillaume Grondin > > previous discussion on this matter : > http://marc.info/?l=squeak-dev&m=119282200100489&w=2 > http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2498160 > >> On Saturday 20 October 2007 3:00 am, nicolas cellier wrote: >> >>> Transcript must now be viewed as a TranscriptingService you'll have to >>> subscribe to... For that reason I would rather call it a Subscript! > > > -- > Guillaume GRONDIN (Dr) > Ph.D in Computer Science > =========================================== > Ecole des Mines de Douai - Dept. I.A. > 941, rue Charles Bourseul > BP 10838 - 59508 Douai Cedex, France > Tél : (+33) (0) 3 27 71 24 53 > Fax : (+33) (0) 3 27 71 29 17 > Email: [hidden email] > http://vst.ensm-douai.fr/grondin > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > -- Cédrick _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Thanks Cedrick.
However, I really don't understand Selon Cédrick Béler <[hidden email]>: > Just playing around. This is probably not thread safe and also not > nice but here it is. > > I added an inst var log (maybe subclass would be better) and then > changed endEntry like below : > > > endEntry > "Display all the characters since the last endEntry, and reset the stream" > accessSemaphore critical:[ > self changed: #appendEntry. > log ifNil: [log := WriteStream new]. > log nextPutAll: stream contents. > stream reset > ]. > > actualEntry > ^log contents > > It actually log whats written programaticaly to the transcript but not > what's written directly in it (like in a workspace). > > hth, > > Cédrick > > 2009/7/30 Guillaume Grondin <[hidden email]>: > > Hi, > > > > I would like to fileout the content of Transcript. But it doesn't seem to > be > > possible because "Squeak Transcript (different from VW Transcript) is the > > stream of not yet appened text" (nicolas cellier). (How about pharo ?) > > > > One solution seems to be to add a dependent to Transcript and log stuff on > > "updated: #appendEntry". Is there a more practical solution ? > > > > Regards, > >  Guillaume Grondin > > > > previous discussion on this matter : > > http://marc.info/?l=squeak-dev&m=119282200100489&w=2 > > http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2498160 > > > >> On Saturday 20 October 2007 3:00 am, nicolas cellier wrote: > >> > >>> Transcript must now be viewed as a TranscriptingService you'll have to > >>> subscribe to... For that reason I would rather call it a Subscript! > > > > > > -- > > Guillaume GRONDIN (Dr) > > Ph.D in Computer Science > > =========================================== > > Ecole des Mines de Douai - Dept. I.A. > > 941, rue Charles Bourseul > > BP 10838 - 59508 Douai Cedex, France > > Tél : (+33) (0) 3 27 71 24 53 > > Fax : (+33) (0) 3 27 71 29 17 > > Email: [hidden email] > > http://vst.ensm-douai.fr/grondin > > _______________________________________________ > > Beginners mailing list > > [hidden email] > > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > > -- > Cédrick > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -- Guillaume GRONDIN (Dr) Ph.D in Computer Science =========================================== Ecole des Mines de Douai - Dept. I.A. 941, rue Charles Bourseul BP 10838 - 59508 Douai Cedex, France Tél : (+33) (0) 3 27 71 24 53 Fax : (+33) (0) 3 27 71 29 17 Email: [hidden email] http://vst.ensm-douai.fr/grondin _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by cedreek
Thanks Cédric for proposing this solution. Is it better than providing an
accessor for the inst var "collection" which is in Transcript and contains what I want to save in a file ? However, I really don't understant why it is forbidden to access the collection inst var. Regards, Guillaume Grondin Selon Cédrick Béler <[hidden email]>: > Just playing around. This is probably not thread safe and also not > nice but here it is. > > I added an inst var log (maybe subclass would be better) and then > changed endEntry like below : > > > endEntry > "Display all the characters since the last endEntry, and reset the stream" > accessSemaphore critical:[ > self changed: #appendEntry. > log ifNil: [log := WriteStream new]. > log nextPutAll: stream contents. > stream reset > ]. > > actualEntry > ^log contents > > It actually log whats written programaticaly to the transcript but not > what's written directly in it (like in a workspace). > > hth, > > Cédrick > > 2009/7/30 Guillaume Grondin <[hidden email]>: > > Hi, > > > > I would like to fileout the content of Transcript. But it doesn't seem to > be > > possible because "Squeak Transcript (different from VW Transcript) is the > > stream of not yet appened text" (nicolas cellier). (How about pharo ?) > > > > One solution seems to be to add a dependent to Transcript and log stuff on > > "updated: #appendEntry". Is there a more practical solution ? > > > > Regards, > >  Guillaume Grondin > > > > previous discussion on this matter : > > http://marc.info/?l=squeak-dev&m=119282200100489&w=2 > > http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2498160 > > > >> On Saturday 20 October 2007 3:00 am, nicolas cellier wrote: > >> > >>> Transcript must now be viewed as a TranscriptingService you'll have to > >>> subscribe to... For that reason I would rather call it a Subscript! > > > > > > -- > > Guillaume GRONDIN (Dr) > > Ph.D in Computer Science > > =========================================== > > Ecole des Mines de Douai - Dept. I.A. > > 941, rue Charles Bourseul > > BP 10838 - 59508 Douai Cedex, France > > Tél : (+33) (0) 3 27 71 24 53 > > Fax : (+33) (0) 3 27 71 29 17 > > Email: [hidden email] > > http://vst.ensm-douai.fr/grondin > > _______________________________________________ > > Beginners mailing list > > [hidden email] > > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > > -- > Cédrick > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -- Guillaume GRONDIN (Dr) Ph.D in Computer Science =========================================== Ecole des Mines de Douai - Dept. I.A. 941, rue Charles Bourseul BP 10838 - 59508 Douai Cedex, France Tél : (+33) (0) 3 27 71 24 53 Fax : (+33) (0) 3 27 71 29 17 Email: [hidden email] http://vst.ensm-douai.fr/grondin _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Actually, I don't know.
But if you want to save thé content in a file, maybe you can provide a method that access the collection inst var and save its content in a file. See you Cedrick Envoyé de mon iPhone Le 30 juil. 2009 à 17:05, Guillaume Grondin <[hidden email]> a écrit : > Thanks Cédric for proposing this solution. Is it better than providi > ng an > accessor for the inst var "collection" which is in Transcript and > contains what > I want to save in a file ? > > However, I really don't understant why it is forbidden to access the > collection > inst var. > > Regards, > Guillaume Grondin > > Selon Cédrick Béler <[hidden email]>: > >> Just playing around. This is probably not thread safe and also not >> nice but here it is. >> >> I added an inst var log (maybe subclass would be better) and then >> changed endEntry like below : >> >> >> endEntry >> "Display all the characters since the last endEntry, and reset >> the stream" >> accessSemaphore critical:[ >> self changed: #appendEntry. >> log ifNil: [log := WriteStream new]. >> log nextPutAll: stream contents. >> stream reset >> ]. >> >> actualEntry >> ^log contents >> >> It actually log whats written programaticaly to the transcript but >> not >> what's written directly in it (like in a workspace). >> >> hth, >> >> Cédrick >> >> 2009/7/30 Guillaume Grondin <[hidden email]>: >>> Hi, >>> >>> I would like to fileout the content of Transcript. But it doesn't >>> seem to >> be >>> possible because "Squeak Transcript (different from VW Transcript) >>> is the >>> stream of not yet appened text" (nicolas cellier). (How about >>> pharo ?) >>> >>> One solution seems to be to add a dependent to Transcript and log >>> stuff on >>> "updated: #appendEntry". Is there a more practical solution ? >>> >>> Regards, >>>  Guillaume Grondin >>> >>> previous discussion on this matter : >>> http://marc.info/?l=squeak-dev&m=119282200100489&w=2 >>> http://aspn.activestate.com/ASPN/Mail/Message/squeak-list/2498160 >>> >>>> On Saturday 20 October 2007 3:00 am, nicolas cellier wrote: >>>> >>>>> Transcript must now be viewed as a TranscriptingService you'll >>>>> have to >>>>> subscribe to... For that reason I would rather call it a >>>>> Subscript! >>> >>> >>> -- >>> Guillaume GRONDIN (Dr) >>> Ph.D in Computer Science >>> =========================================== >>> Ecole des Mines de Douai - Dept. I.A. >>> 941, rue Charles Bourseul >>> BP 10838 - 59508 Douai Cedex, France >>> Tél : (+33) (0) 3 27 71 24 53 >>> Fax : (+33) (0) 3 27 71 29 17 >>> Email: [hidden email] >>> http://vst.ensm-douai.fr/grondin >>> _______________________________________________ >>> Beginners mailing list >>> [hidden email] >>> http://lists.squeakfoundation.org/mailman/listinfo/beginners >>> >> >> >> >> -- >> Cédrick >> _______________________________________________ >> Beginners mailing list >> [hidden email] >> http://lists.squeakfoundation.org/mailman/listinfo/beginners >> >> > > > -- > Guillaume GRONDIN (Dr) > Ph.D in Computer Science > =========================================== > Ecole des Mines de Douai - Dept. I.A. > 941, rue Charles Bourseul > BP 10838 - 59508 Douai Cedex, France > Tél : (+33) (0) 3 27 71 24 53 > Fax : (+33) (0) 3 27 71 29 17 > Email: [hidden email] > http://vst.ensm-douai.fr/grondin > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |