native.newTextField warning bug?

hi.

i’m getting a warning in console from a simple code with newTextField like this:

local myField = native.newTextField( 10, 30, 180, 30 ) myField.font = native.newFont( native.systemFontBold, 18 )

if i change to newTextbox no warning is presented:

local myField = native.newTextBox( 10, 30, 180, 30 ) myField.font = native.newFont( native.systemFontBold, 18 )

maybe this is a bug? tried other fonts same problem.

also the example in

http://docs.coronalabs.com/api/type/TextField/font.html#TOC

is wrong.

should be:

local myField = native.newTextField( 10, 30, 180, 30 ) myField.font = native.newFont( native.systemFontBold, 18 )

in the example it shows:

local myField = native.newTextField( 10, 30, 180, 30 ) local myField.font = native.newFont( native.systemFontBold, 18 )

second line can’t have local.

I’m using build 2607 windows version.

Hi @carloscosta,

Can you tell us the exact warning message that you’re receiving? In the meantime, I’ll correct the documentation example… thank you for noticing that.

Brent

the message i get is:

Warning: could not load font font. Using default font.

the warning happens with all fonts even with native.systemFont and like i said only in “newTextField”. In “newTextBox” the warning don’t show up.

The Corona Simulator on Windows does not support native.newTextField and native.newTextBox.  I think it draws placeholder rectangles but nothing more.  It’s not processing any fonts.  You will need to test these on a Device.

Rob

Rob, i know windows does not support native.newTextField and native.newTextBox. that’s not the problem.

i never had warnings in my code with any kinda of installed fonts and native.newTextField and native.newTextBox in windows simulator.

in fact native.newTextBox still doesn’t give warnings, only native.newTextField does. even the example code in corona docs gives warnings. if its a simulator issue or windows why only give warnings on native.newTextField and not in native.newTextBox?

my code still worsts fine. i just hate warnings :slight_smile:

Hi @carloscosta,

Can you tell us the exact warning message that you’re receiving? In the meantime, I’ll correct the documentation example… thank you for noticing that.

Brent

the message i get is:

Warning: could not load font font. Using default font.

the warning happens with all fonts even with native.systemFont and like i said only in “newTextField”. In “newTextBox” the warning don’t show up.

The Corona Simulator on Windows does not support native.newTextField and native.newTextBox.  I think it draws placeholder rectangles but nothing more.  It’s not processing any fonts.  You will need to test these on a Device.

Rob

Rob, i know windows does not support native.newTextField and native.newTextBox. that’s not the problem.

i never had warnings in my code with any kinda of installed fonts and native.newTextField and native.newTextBox in windows simulator.

in fact native.newTextBox still doesn’t give warnings, only native.newTextField does. even the example code in corona docs gives warnings. if its a simulator issue or windows why only give warnings on native.newTextField and not in native.newTextBox?

my code still worsts fine. i just hate warnings :slight_smile: