On 2012-04-22, at 22:00, Daniel Lyons wrote: > Cami, > > On Apr 22, 2012, at 1:32 PM, Camillo Bruni wrote: > >>> It doesn't seem to recognize Pragmata Pro or any other font name I put in, >>> I always get the default font I set in my preferences (which is a system >>> font and works fine). I see there's a FixedFaceFont class, but it looks >>> like a completely different sort of thing. >> >> indeed maybe a workspace will do just fine then :), sadly I'm not that much >> into morphic hence my partial approach here (that's why I personally find it >> far easier to directly use the terminal)... > > Yes, it probably would be, but I think the Smalltalk environment contains > great power, I just need to learn enough to harness it, and that means baby > steps.
well smalltalk spent too much time in the image, it kind of blinds you after some years :). plus by using the terminal you don't leave the environment at all, since you still control everything from within the image. >> - check that you have freetype enabled in your settings (otherwise system >> fonts won't be recognized) > > It is, and it works great, I'm using a system font everywhere else. I take it > the invocation I used was not incorrect then? > >> - as a pragmatic solution I'd change the coding font globally to fixed-width >> (default in my images since I cannot program in a non mono-spaced font :P) > > I can live with that for a while. > >> "open a new workspace " >> ws := Workspace openContents: 'Initial Contents' >> " update the contents of the workspace" >> ws contents: 'new Contents' > > OK, I can do that for writing, but for reading, I will need the read message > to block until I type a character. Is there a way to do that with the > workspace? I guess there is a nicer way to plug things together, but I'd say keep an external text / String / readline and update the contents of the workspace each time they changed... I suggest you read the corresponding chapters in http://pharobyexample.org/ that should help you with most of the UI questions >>> I also don't see how to get started with your Readline implementation. I'm >>> sure I'd like to use it eventually but I want to get something basic >>> working that I can understand first. >> >> for the readline stuff check the test (that's generally the best place to >> see how code works ;) >> see class: RLReadlineTest >> >> a small example is given in RLReadline >> #readlineExample >> >> the basic principle is that you move around a cursor and put characters / >> strings there: >> >> RLReadline >> #write: >> RLReadline >> #writeAll: >> >> I know the readline implementation is quite complex for what it does, but >> you shouldn't bother too much and simply rely on the public interface and >> the example use-cases provided by the tests. > > > Thanks, I'll dig through that later tonight. > > — > Daniel Lyons > >
