lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi!

My question is whether there’s a solution to bind a parameter of a given function registration.

I have a map with command id’s and command names. I want to bind the command names for a C function in Lua and the first (or any) parameter should be the command id and after that the other calling parameters.

My current solution is that I generate a string from code side: DoCommand( commandId, … ) , make a DoString and register the return function to the commandName. Of course I register the DoCommand function as well and do there what I really want.

Is there a more simple way to do the same maybe without string manipulation?

Thanks for the answers!

 

Kind regards,

Gergely BOROMISSZA
Developer

T: +36 (1) 872-0000
F: +36 (1) 872-0100
E: Gergely.BOROMISSZA@navngo.com

 
Nav N Go Kft.

Bérc u. 23.

H-1016 Budapest

Hungary

 

Nav N Go stands for innovative software for satellite navigation, mobile applications and content on a variety of platforms, enhanced by updates and online services delivered via www.naviextras.com. Find out more about us at www.navngo.com.

This message, including attachments, is confidential and may be privileged. If you are not an intended recipient, please notify the sender then delete and destroy the original message and all copies. You should not copy, forward and/or disclose this message, in whole or in part, without permission of the sender.