Board Logo
« BB___FONT »

Welcome Guest. Please Login or Register.
Nov 20th, 2017, 10:23pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ


« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: BB___FONT  (Read 4637 times)
jaba
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1049
xx BB___FONT
« Thread started on: Aug 26th, 2010, 12:38pm »

I got to wondering. If you do not specify a font for your GUI program windows, where does the default font spec come from.? I tried changing the editor font, the printer font and the Windows default for Active windows and it made no change.
User IP Logged

JACK - Windows 8.1 64-bit; 2.5 GHz Intel i3 processor; 6.00 GB RAM;
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3711
xx Re: BB___FONT
« Reply #1 on: Aug 26th, 2010, 2:23pm »

It defaults to the system default font, which is usually Arial.

As you can see Windows has too many places where you can specify look and feel.
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Facundo
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1301
xx Re: BB___FONT
« Reply #2 on: Aug 26th, 2010, 3:30pm »

I think that the BB_FONT page could show all the possible methods, like the page for CLS

The edit controls will use the exclamation mark before the command.
User IP Logged

cundo aka MSlayer
uncleBen
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1679
xx Re: BB___FONT
« Reply #3 on: Aug 26th, 2010, 3:42pm »

There are at least 3 different syntaxes for each control:

Code:
print #handle, "command"
#handle, "command"
#handle "command"
 


If you repeat those for each control that supports the command, wouldn't it get very lengthy?

-------

Personally I like things that have a system. Invoking any of the methods looks the same, so I'd rather have it shown just once how it generally works, and not have the same thing repeated over and over for each command. But that's just me.
User IP Logged

Passing arrays to subroutines, functions that work with any types, quick string indexing and much more - JBExtensions.

Tired of Minesweeper? Try TomatoSweeper
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3711
xx Re: BB___FONT
« Reply #4 on: Aug 26th, 2010, 3:56pm »

on Aug 26th, 2010, 3:42pm, uncleBen wrote:
There are at least 3 different syntaxes for each control:

Code:
print #handle, "command"
#handle, "command"
#handle "command"
 


That is plain wrong, there are only two officially supported formats to print to a handle.
The one, which is omitting the PRINT and keeping the comma is just not caught by the syntax parser for whatever reason.



In my opinion, repeating that there are only two ways of printing to a handle will save people from confusing the incorrect formats of keywords in the future.

We do have many problems related to wrong syntax, so the BB must show what is allowed and where.
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Facundo
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1301
xx Re: BB___FONT
« Reply #5 on: Aug 26th, 2010, 4:05pm »

We could at least put a mention that some controls will require the exclamation mark.
User IP Logged

cundo aka MSlayer
jaba
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1049
xx Re: BB___FONT
« Reply #6 on: Aug 26th, 2010, 4:21pm »

When writing this, my thought was to show how to specify a font string and let the individual controls show how it's used.
User IP Logged

JACK - Windows 8.1 64-bit; 2.5 GHz Intel i3 processor; 6.00 GB RAM;
jaba
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1049
xx Re: BB___FONT
« Reply #7 on: Aug 26th, 2010, 4:40pm »

on Aug 26th, 2010, 3:56pm, Stefan Pendl wrote:
That is plain wrong, there are only two officially supported formats to print to a handle.
The one, which is omitting the PRINT and keeping the comma is just not caught by the syntax parser for whatever reason.



In my opinion, repeating that there are only two ways of printing to a handle will save people from confusing the incorrect formats of keywords in the future.

We do have many problems related to wrong syntax, so the BB must show what is allowed and where.

I'm not sure this page should really show how to print to a handle. This seems more like how to specify the font. How about a second syntax that is for "Specifying fonts for Text Controls"? which would show the !. No other point would have to be made of how it's used with various controls.

Just a thought...
User IP Logged

JACK - Windows 8.1 64-bit; 2.5 GHz Intel i3 processor; 6.00 GB RAM;
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3614
xx Re: BB___FONT
« Reply #8 on: Aug 27th, 2010, 01:31am »

Stefan, you said

Quote:
That is plain wrong, there are only two officially supported formats to print to a handle.
The one, which is omitting the PRINT and keeping the comma is just not caught by the syntax parser for whatever reason.


--------------------------------------------------------------------------------

In my opinion, repeating that there are only two ways of printing to a handle will save people from confusing the incorrect formats of keywords in the future.

We do have many problems related to wrong syntax, so the BB must show what is allowed and where.


As far as I understand, now _all three_ methods work. (just looked at Janet's 'Tetris Wannabe' Code history page at JB Wiki - it obviously worked fine).
So why put more restrictions then language itself imposes?
And what "future" you are talking about?
JB2.0, nowhere seen and nothing heard of?
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3711
xx Re: BB___FONT
« Reply #9 on: Aug 27th, 2010, 02:48am »

on Aug 27th, 2010, 01:31am, tsh73 wrote:
As far as I understand, now _all three_ methods work. (just looked at Janet's 'Tetris Wannabe' Code history page at JB Wiki - it obviously worked fine).
So why put more restrictions then language itself imposes?
And what "future" you are talking about?
JB2.0, nowhere seen and nothing heard of?


Yes, they work and yes, Janet is guilty of using the unofficial format.

Why make it more complicated than it needs to be?
  • use PRINT and a comma
  • use no PRINT and no comma

What do you gain from the additional stupid comma, just one more useless character to type?



JB 2.0 will come and it will be a total rewrite from scratch, so sticking to the supported formats is mandatory to make sure one does not need to convert his whole work.

If you do not hear of it, it does not mean that it is not coming.
« Last Edit: Aug 27th, 2010, 02:49am by Stefan Pendl » User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3614
xx Re: BB___FONT
« Reply #10 on: Aug 27th, 2010, 03:02am »

Glad JB2 is coming. No, really glad.

Quote:
What do you gain from the additional stupid comma, just one more useless character to type?

With it, I got one less thing to worry about - knowing it will work with (,) or without.
Then I wite code, I omit print.
Then I make stuff with FF, it inserts print, comma.
Often I remove that print to match my lines, but do leave comma (because it's, well, almost invisible).
And knowing that by this I do not commit criminal offence will make me all warm and fuzzy inside.
laugh

BTW interesting place from Help | Sending commands:
Quote:
The word "print" is optional, as is the comma after the window or control handle. If these are omitted, Just BASIC adds them in the compiling process.

It looks like JB internally converts to old sintax, with print and comma.

BTW2 Could you point me to a source condemning
#handle, "command string"
as unofficial? Just curious. (yep, I read "Basic GUI Question") on LB forum. I see nothing set in stone, though - and help file not quite clear on it.)
« Last Edit: Aug 27th, 2010, 03:35am by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Janet Terra
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 3061
xx Re: BB___FONT
« Reply #11 on: Aug 27th, 2010, 07:20am »

I am in full agreement with Stefan's opinion that the Just BASIC wiki site should be in strict compliance with the coding rules set forth in the Help File. It's better to conform now than to have to edit code that may not work in future JB releases. I have been busy editing my JB wiki code to have either the print with the comma or no print and no comma.

Perhaps we should all concede that there are only two officially supported syntax styles and put our energies into something more constructive, positive, and way more fun. wink
User IP Logged

Janet Visit me at BASIC Samplings
jaba
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1049
xx Re: BB___FONT
« Reply #12 on: Aug 27th, 2010, 07:45am »

Seems like this thread sort of got off track from my original question, which was about the default font spec. I didn't get a response to my post about a second syntax example for a font spec for text contols, so I'll try again.
Quote:
I'm not sure this page should really show how to print to a handle. This seems more like how to specify the font. How about a second syntax that is for "Specifying fonts for Text Controls"? which would show the !. No other point would have to be made of how it's used with various controls.
Jack
User IP Logged

JACK - Windows 8.1 64-bit; 2.5 GHz Intel i3 processor; 6.00 GB RAM;
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3614
xx Re: BB___FONT
« Reply #13 on: Aug 27th, 2010, 08:30am »

Janet, I see you doing this.
Your choise, your time.
But I feel this is self-censoring without reason.
Fixing programs for future versions is pointless - they are not here, and you cannot predict then it will came or that changes will be.
For me, everything that works is supported. I'll start bothering then (and if) it'll stop working.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
uncleBen
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1679
xx Re: BB___FONT
« Reply #14 on: Aug 27th, 2010, 10:53am »

In a future version, the syntax, as far as I understand, is going to be what it is in RunBasic. No idea if there are plans to keep the old syntax for backward compatibility, or you'll just have to convert your old code to the new syntax (a script to do so shouldn't be hard to write).

Code:
#handle FONT("fontname", pointSize [,"bold"][, "italic"]) 
 


As BB__FONT is now, I'd still add
Code:
print #handle, "font ..."
 


to it. However, I don't see much value in listing the alternative(s) without PRINT. May-be they could be mentioned in connection with the PRINT command, but the point should indeed be how you specify fonts (etc), not all the various ways how you can invoke the command.

As to the exclamation mark, may-be all the controls that support the command, should be listed, and the example given once for either group. The controls could be listed using the keywords they are identified by in JB (graphicbox, not Graphic Box etc).
User IP Logged

Passing arrays to subroutines, functions that work with any types, quick string indexing and much more - JBExtensions.

Tired of Minesweeper? Try TomatoSweeper
Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls