Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [BUG] underscore not visible on OSX

Author
Message
tmu
7
Years of Service
User Offline
Joined: 2nd Feb 2017
Location:
Posted: 2nd Aug 2017 09:00
Well, I complained about this before and nothing changed but why not complain some more

Problem: Write code in the AppGameKit IDE on OSX and put underscores anywhere. The underscores show up as space even if the underscore is there. This is a problem in variable names, constants, strings (file names etc).

I just spent some time debugging a weird error due to this. So not just the looks but this easily creates extra bugs. On Windows version of AppGameKit this is not a problem as the IDE shows the underscores there just fine (or so I recall..).

My example from today:



This gives an error of "main.agc: 24: error: Unexpected token "1"

24 is the line "state as integer"

So if you look at this in the AppGameKit IDE on OSX the #constant definitions look like this:

#constant STATE MAINMENU 1
#constant STATE PLAYING 2

whereas they are really stored as

#constant STATE MAINMENU 1
#constant STATE_PLAYING 2

which is also how it should be displayed.

but on OSX you cannot tell if it was that or

#constant STATE_MAINMENU 1
#constant STATE_PLAYING 2

Also a related aspect to this bug is that #constant docs only give examples of having a single name and value:

https://www.appgamekit.com/documentation/language/1_constant.htm

as in #constant NAME VALUE

So no idea what does the above version of even does:

#constant STATE MAINMENU 1

Because it is of the form #constant NAME1 NAME2 VALUE

So you might even expect the compiler to complain about the actual error cause here (broken #constant declaration which is not visible on OSX). But who knows.

Anyway, the point of this overly long story being, please make the underscore visible on AppGameKit OSX IDE.
Dybing
13
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 2nd Aug 2017 12:55 Edited at: 2nd Aug 2017 14:00
Using UTF-8 encoding I assume? Default fonts for the IDE? What about language and keyboard mapping settings?

I'm no Mac user, but I find it odd if OSX should do anything out of the ordinary with plain text-files, which AppGameKit source files are essentially.

Also, defining constants isn't any different from variables. No spaces allowed in variable/constant name.

YES:

#constant myConst 1
myVar as integer

NO:

#constant my const 1
my var as integer

Also, only one declaration per line in AppGameKit - unlike a few other languages I could mention. So,

YES:

#constant firstConst 1
#constant secondConst 1
firstVar as integer
secondVar as integer

NO:

#constant firstConst secondConst 1
firstVar secondVar as integer
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Aug 2017 13:26
True on Mac underscore is always "white" so you cant see it using the default color scheme. Try changing colors and your able to see the underscores

But yes it should be fixed in the default color sheme.

See screenshot:
best regards Preben Eriksen,

Attachments

Login to view attachments
tmu
7
Years of Service
User Offline
Joined: 2nd Feb 2017
Location:
Posted: 3rd Aug 2017 12:34
@dybing it is just default setting for AppGameKit as it comes installed. OSX does nothing special for the files, the characters just are not shown properly with the default settings.

@preben thanks for the hint! I had not noticed those options. Tried them all now, and the underscore was still just very faint and not noticeable. But then I changed the font and now the underscore shows also on the default scheme just fine!
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 4th Aug 2017 09:42
tmu: Thats great, what font works the best for you ?
best regards Preben Eriksen,
tmu
7
Years of Service
User Offline
Joined: 2nd Feb 2017
Location:
Posted: 4th Aug 2017 16:10
I generally use Jetbrains IDE's, and actually always have also PyCharm configured to do version control, search, manage media assets, run some prototyping, etc. for my AppGameKit project. So I just looked what font they use and copied that. The font is "menlo". Regular 12pts.

But now I seem to have another issue. Ever since changing this, after a while my macbook starts fuming hot and shows Steam at 100% CPU constantly. If I close AppGameKit this disappears. Is there some problem with using custom fonts or something?

Login to post a reply

Server time is: 2024-09-30 05:27:45
Your offset time is: 2024-09-30 05:27:45