Assume an instance of a standard clim-stream-pane with a width and height of 0 respectively (though the issue concerns panes of all sizes). If one prints a string *with* linebreaks to this pane, it will properly resize itself to accommodate the text. If the string does *not* include linebreaks, however, the pane will not be resized (and thus, not be visible by the user). I consider this a bug.
A possible solution, and the one I have followed due to my lack of insight into McCLIM internals, is to modify `seos-write-string' in stream-output.lisp to call `change-space-requirements' on the pane with a :min-height parameter of the height of the string being printed. This does ensure that the pane is never too small to accommodate the string, but it is certainly an ugly hack.
Does anyone else have a better solution?
Hello again!
I got my tree diagrams to work with color and all, and I am going to make a example file for others, where should i post it?
I now need to get Swedish characters like ÅÄÖ åäö to work i.e. latin-1 support, when I google it seems that this should work but when I type a Swedish character it does not register - is there something special that I should do? I am using latest CMUCL under Linux...
Also what is the best way to do a pop-up menu window?
In the simplest case I want to make a about dialog. In the other case I want to accept some data, preferably from a number of drop-down menus. I also want to make some dialogs to set preferences... any elegant examples of this to look at somewhere?
Thanks as always for any help!
/Peter
"Peter Braroe" peter.braroe@newsmachine.com writes:
I now need to get Swedish characters like ÅÄÖ åäö to work i.e. latin-1 support, when I google it seems that this should work but when I type a Swedish character it does not register - is there something special that I should do? I am using latest CMUCL under Linux...
Look at the bottom tip on http://mcclim.cliki.net/Tip
You are required to manually find the keysym for the characters you want to support, though.
Hello!
Well I tried the tip, but on my first attempt it bugged out... and then i saw that a ' had snuck in and - sucsess!
Please find the file i used enclosed!
What I trying to figgure the best way for now is:
- How to i most elegantly pop-up a window? (for instance "Are you sure you would like to quit? Save first?)
- How to make items in a formated list clickable through translations
and other things...
Happy weekend to you all!
/Peter
On Wed, 2006-02-15 at 19:13 +0100, Troels Henriksen wrote:
"Peter Braroe" peter.braroe@newsmachine.com writes:
I now need to get Swedish characters like ÅÄÖ åäö to work i.e. latin-1 support, when I google it seems that this should work but when I type a Swedish character it does not register - is there something special that I should do? I am using latest CMUCL under Linux...
Look at the bottom tip on http://mcclim.cliki.net/Tip
You are required to manually find the keysym for the characters you want to support, though.
Peter Braroe peter.braroe@newsmachine.com writes:
- How to i most elegantly pop-up a window?
(for instance "Are you sure you would like to quit? Save first?)
The CLIM function NOTIFY-USER is supposed to do that, but McCLIM does not implement it yet. As a workaround you may use ACCEPTING-VALUES: McCLIM implements enough of its functionality that it should be possible to do what you want.
- How to make items in a formated list clickable through translations
The idiomatic CLIM way to do that, I think, is via presentation to command translators.
Paolo
Troels Henriksen athas@sigkill.dk writes:
Does anyone else have a better solution?
Attached to this post is a patch to stream-output.lisp that fixes the issue and doesn't cause horrible breakage (AFAICS).
This looks like the right thing.
Have you tried any benchmarks of the impact on text output speed (for, say, writing 10,000 lines of text to the pane)? I've feared that reinvoking the layout algorithm (and resizing the CLX mirror, etc) for each line of output would wreck the already unsatisfactory performance in this case.
In many cases (commands or display functions printing substantial output) it would be advantageous to let the output be generated in a batch, and resize the sheet pane once when it completes. This is a different pattern of usage than the lone application-pane which is only written to occasionally, but certainly the programmer should not have to fuss with manually resizing the pane in the latter case.
OTOH, this seems like exactly what changing-space-requirements is for. So long as the appropriate places (execution of command bodies, pane redisplay) in McCLIM are surrounded by this form, performance should not be impacted.
There is an alternate approach whereby growth of the bounding rectangle of a sheet output history would trigger an automatic resize of the sheet. This is clean and appealing, and would work for all manner of output besides text, but I've come to think that for some applications (graphics..) the ability to clip output within the sheet region is a feature rather than a bug.
On 2/16/06, Troels Henriksen athas@sigkill.dk wrote:
Troels Henriksen athas@sigkill.dk writes:
Does anyone else have a better solution?
Attached to this post is a patch to stream-output.lisp that fixes the issue and doesn't cause horrible breakage (AFAICS). -- \ Troels "Athas" Henriksen /\ sigkill.dk/blog (Danish)
mcclim-devel mailing list mcclim-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel