native.newTextField text?

local numericField = native.newTextField( _W/2, 150, 220, 36 )

numericField.inputType = “number”

–continuation

–API

local mime = require(“mime”)

local json = require(“json”)

–local userid = numericField

local URL = "http://saite./api.php?id=

… numericField.text

–continuation

The console displays an empty query, ie numericField.text not substitute data from the.

And if you do a direct request, as follows:

local URL = “http://saite./api.php?id=1

All turns out. Tell me how to fix it?

And how to change the style native.newTextField?

I would be grateful if you answer all the questions.

I want to say that even using this code, it is impossible to deduce the text variable:

--dell local t = native.newTextField( 30, 140, 260, 100 ) t.font = native.newFont( "Helvetica-Bold", 16 ) t:setTextColor( 0.8, 0.8, 0.8 ) t.hasBackground = false t.text = "Hello, world!" --end dell  print (t.text)

In the console empty

The native.newTextFields() use a event handling function to handle the various input events like ending the edit session.  Please look at the documentation:  http://docs.coronalabs.com/api/library/native/newTextField.html

and see how the handler function is defined and processed.  You can also look at the sample apps in SampleCode/Interface/NativeDisplayObjects and SampleCode/Interface/NativeKeyboard

Rob

I want to say that even using this code, it is impossible to deduce the text variable:

--dell local t = native.newTextField( 30, 140, 260, 100 ) t.font = native.newFont( "Helvetica-Bold", 16 ) t:setTextColor( 0.8, 0.8, 0.8 ) t.hasBackground = false t.text = "Hello, world!" --end dell  print (t.text)

In the console empty

The native.newTextFields() use a event handling function to handle the various input events like ending the edit session.  Please look at the documentation:  http://docs.coronalabs.com/api/library/native/newTextField.html

and see how the handler function is defined and processed.  You can also look at the sample apps in SampleCode/Interface/NativeDisplayObjects and SampleCode/Interface/NativeKeyboard

Rob