Author |
Topic: A problem with font under LBB302 (Read 971 times) |
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: A problem with font under LBB302
« Reply #7 on: Sep 18th, 2015, 9:37pm » |
|
> - that is the change I made in 3.02 to fix the resource leak.
Thank you for what you did to fix the resource leak.
Now I have to release more than hundred and fifty font statement only for child window.
> old font used by that control is deleted I think it is more fair if the deletion done if no other control used that font.
I can't imagine I have to inter all this quantity of statements for both parent and child windows.
you know what Richard? you kill my moral ...
Please please, reconsider this modification.
Sarmed
|
|
Logged
|
|
|
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: A problem with font under LBB302
« Reply #8 on: Sep 18th, 2015, 9:48pm » |
|
Arabic different than Latin letters. If they became small it became hard to read. Then we must use Tahoma for small controls or some other like that used with newspapers.
To whom should I go?
To Stefan, Rod, or Alyce ... this game has only one programmer.
|
|
Logged
|
|
|
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: A problem with font under LBB302
« Reply #9 on: Sep 18th, 2015, 9:54pm » |
|
Anatoly,
Thanks for the cat, indeed. Thank you very much.
Regards, Sarmed
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: A problem with font under LBB302
« Reply #10 on: Sep 18th, 2015, 11:09pm » |
|
on Sep 18th, 2015, 9:37pm, SarmedNafi wrote:| Please please, reconsider this modification. |
|
You mean restore the resource leak? That is out of the question. The program which was posted here to demonstrate the leak was using up thousands of font handles every few seconds - left to run for any length of time it would have crashed Windows!
You say you need to add 150 font statements, but why can't you use a loop? For example this should set the font in the textboxes comprising your main grid:
Code: for row = 1 to 15
for col = 1 to 9
handle$ = "#C.";row*10+col
#handle$ "!font Arial 11 bold"
next col
next row Richard.
|
|
Logged
|
|
|
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: A problem with font under LBB302
« Reply #11 on: Sep 19th, 2015, 04:40am » |
|
> You mean restore the resource leak?
No, Richard
I don't say that. But give the user the ability to delete the unused font like what we did with BMP. Or there is a check box option either we delete it manually or let LBB do it automatically (the default). In that case we win the compatibility with LB and the best performance of LBB. With some little notes on help file. I hardly hope you will reconsider this matter.
Regards, Sarmed
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: A problem with font under LBB302
« Reply #12 on: Sep 19th, 2015, 07:18am » |
|
on Sep 19th, 2015, 04:40am, SarmedNafi wrote:| Or there is a check box option either we delete it manually or let LBB do it automatically (the default). |
|
Unfortunately the internal architecture of LBB means that making it a user-selected option is not practical (the code involved is in the LBLIB emulator library not the compiler).
However I think I have worked out how to check the font handle against all the other child controls, to determine if it should be deleted or not, so if that works it should be a full solution.
Richard.
|
|
Logged
|
|
|
|
Rod
Full Member
member is offline


Gender: 
Posts: 110
|
 |
Re: A problem with font under LBB302
« Reply #13 on: Sep 19th, 2015, 9:08pm » |
|
What happens if arial is set as the default font. Can that be done in preferences and then only exceptions need set?
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: A problem with font under LBB302
« Reply #14 on: Sep 19th, 2015, 9:38pm » |
|
on Sep 19th, 2015, 9:08pm, Rod wrote:| What happens if arial is set as the default font. Can that be done in preferences and then only exceptions need set? |
|
I've hopefully fixed the issue reported by Sarmed in LBB v3.03. When you send a FONT command to a child control this version checks whether the 'old' font is currently in use by any of its sibling controls, and only deletes it if not.
So for example if a window has two child controls, and you set the font of both by sending a FONT command to the parent window, changing the font of just one control will not result in the old font being deleted, but subsequently changing the font of the other control will.
Achieving this is a little messy, and will make the FONT command somewhat slower, but normally that won't matter.
Richard.
|
|
Logged
|
|
|
|
|