Reply To: get componentVisibleName

Home Forums General Programming get componentVisibleName Reply To: get componentVisibleName

  • Topics: 7
  • Replies: 23
  • Total: 30

Thanks Dnal and Pos, That’s probably why I never find the good sintax to get the visible name. When the get was passing I got the string error so never know the get was working fine.

I was thinking that the variable would be directly a string with a getPropertyString instead of a simple getProperty. So what is the format of the variable because I read in the Lua doc. the variables format don’t have to be declare and also the console (without string) can directly display text or numbers.

That’s the kind of situation where it become hard to develop things went you don’t know the little details

I agree with human fly bot necessary the write a hole book. It would certainly take more time it took to develop ctrlr itself. But what I was suggesting is having a common forum section to put all these little infos who get out with time so we wont have to scan the thousands of page. An archive of tricks and infos.

before finising that message I took a look at Lua site so I think I found the answer.

There are eight basic types in Lua: nil, boolean, number, string, userdata, function, thread, and table. The type function gives the type name of a given value:

print(type(“Hello world”)) –> string
print(type(10.4*3)) –> number
print(type(print)) –> function
print(type(type)) –> function
print(type(true)) –> boolean
print(type(nil)) –> nil
print(type(type(X))) –> string

so I done console(type(Tone_Name))

and I get LUA>> userdata

It’s a userdata that’s why console can’t display it. userdata is the raw memory content without specifying the format string or number.

So the command getPropertyString should convert the information to string instead just keeping the raw data.

The console(type()) will be very usefull in the futur when we get the At line [-1]: [C] error to clarify some situation with variables.

Stay tuned. Quimquim

Do NOT follow this link or you will be banned from the site!