|
List Info
Thread: Aw: Re: Aw: Re: HB: representing code
|
|
| Aw: Re: Aw: Re: HB: representing code |

|
2006-02-28 21:57:17 |
|
In message
<247777.1141118199629.JavaMail.ngmail webmail-09.arcor-online.net>,
finn.anklam arcor.de writes
>Hi,
>
>about the sample code : i recognized, that all (not only the list)
>array elements should be initialized in some way, before using the
>array (to make sure to not retrieve random strings or worse), and, the
>lower ascii codes describe control characters (is that their name ?)
>like backspace, delete and others. these cannot be displayed in html
>and should be handled in a different way. just to say : be careful if
>using the sample.
>
>but back to my question : is there a memory limit to wxHtmlWindow ? or,
>i'm just guessing, a limit to the number of tags ? are html tags
>translated to containers and containers displayed as windows ? if so,
>maybe the number of containers or created windows is limited ?
>
>i did some more testing and noticed that in some cases it looks as if
>every window is moved to the upper left position (0,0) of the screen,
>including the taskbar and subwindows like menubars or toolbars. tested
>systems : wxWidgets 2.6.2 on winxp (home edition) and win98se.
>
>i don't know, is this the right forum for this question or which would
>be a better forum ?
>
I'd guess that wx-users would be much better. Sorry I can't help.
Best Regards,
Alec
>many thanks in advance,
>finn
>
>
>----- Original Nachricht ----
>Von: Alec Ross <alec arlross.demon.co.uk>
>An: anthemion-devtools@yahoogroups.com
>Datum: 26.02.2006 21:10
>Betreff: Re: Aw: Re: [anthemion-devtools] HB: representing code
>
>> Hi,
>>
>> Many thanks Finn.
>>
>> The problem I'm seeing is not due to memory limits: all my tests have
>> been on very small test samples.
>>
>> Thanks too for the sample code. Yes, I'll need to do some translation
>> of special characters: but the translation should also account for
>> whitespace characters in the original cpp source that are significant
>> for humans.
>>
>> The exact combination of standard and own-written tool support, and
>> manual editing involved will have to be chosen. I had hoped that
>> something very simple, ideally within HB, such as use of CDATA sections,
>> or external tools such as CPP2HTML or similar would provide good
>> usability.
>>
>> I'm not sure yet how much of this translation I'll be doing. At the
>> moment, manual editing may be the best option.
>>
>> Anyway, thanks again for your helpful suggestions.
>>
>> Regards,
>>
>> Alec
>>
>> In message
>> <14523756.1140978615679.JavaMail.ngmail webmail-03.arcor-online.net>,
>> finn.anklam arcor.de writes
>> >hi,
>> >
>> >maybe this mail has an answer, but a question also :
>> >
>> >1) the question first (so i can't forget it) : is there a memory limit
>> >for wxHtmlWindow ? my app is generating big html tables (the one that
>> >causes problems has 3.808.441 bytes). no problems with smaller tables
>> >(around 700 kb), but with the bigger sizes, when loading the html into
>> >the wxHtmlWindow by calling wxHtmlWindow's SetPage(), the window
>> >freezes for some seconds and then the graphics on my screen go wild. it
>> >looks as if random small parts of open windows are distributed anywhere
>> >over the screen.
>> >
>> >i did not check LoadPage() in code, but in DialogBlocks i did set the
>> >url property of the wxHtmlWindow to a html file with identical html
>> >code. the html loads and is displayed in DialogBlocks editor tab. but,
>> >when i select "Test" in the context menu of the frame object i get the
>> >same behaviour as mentioned above.
>> >
>> >2) the possible answer : i am not much into character sets and
>> >non/unicode conversion etc., so i don't know if i correctly understand
>> >alec's issue. if it is about how to convert special characters to valid
>> >html code, the following code did work fine, at least with special
>> >german characters, like 'ä', 'ß', 'ü'. but i didn't test it for all
>> >characters in the list.
>> >
>> >hope this works for you, too.
>> >
>> >finn
>> >
>> >-------
>> >
>> >wxString arrHtml[256];
>> >bool blnArrHtmlIsset;
>> >
>> >wxString stringToHtml( const wxString& strString )
>> >{
>> > if(! blnArrHtmlIsset ) {
>> >
>> > // set array content only once.
>> > blnArrHtmlIsset = true;
>> >
>> > // following list based on selfhtml's html character reference
>> > // by http://en.selfhtml.org/html/referenz/zeichen.htm.
>> >
>> > // Html.
>> > arrHtml[ (unsigned char) '"' ] = "&quot;";
>> > arrHtml[ (unsigned char) '&' ] = "&amp;";
>> > arrHtml[ (unsigned char) '<' ] = "&lt;";
>> > arrHtml[ (unsigned char) '>' ] = "&gt;";
>> >
>> > // ISO 8859-1 (since Html 3.2).
>> > arrHtml[ (unsigned char) '¡' ] = "&iexcl;";
>> > | |