Artem Crum Posted June 27, 2011 Report Posted June 27, 2011 Hello Pete, All your previous updates made by my request are now used in LINDA with intense. I know, I'm getting greedy, but.. I have another one "question". :grin: At the moment event.param + LuaValue accept only the numeric values. FSUIPC GUI allows to enter strings in the parameter field but, doesn't save them and doesn't send. Can this be changed to allow sending a string value to the Lua script? With regards
Pete Dowson Posted June 27, 2011 Report Posted June 27, 2011 At the moment event.param + LuaValue accept only the numeric values. FSUIPC GUI allows to enter strings in the parameter field but, doesn't save them and doesn't send. Can this be changed to allow sending a string value to the Lua script? No way. Sorry. It would be almost a complete rewrite. Pete
Artem Crum Posted June 28, 2011 Author Report Posted June 28, 2011 Sad. But ok. Will find another way. p. s. May be passing string to the offset is possible instead?
Pete Dowson Posted June 28, 2011 Report Posted June 28, 2011 May be passing string to the offset is possible instead? You can certainly write strings to offsets, via the Lua ipc library or via the normal FSUIPC application interface. Regards Pete
Artem Crum Posted June 28, 2011 Author Report Posted June 28, 2011 I've meant setting the string to send to the specified offset through the Buttons&Switches panel in FSUIPC GUI. The same place as "LuaValue ... " + Parameter. In the list of available controls there only "numeric" offsets present. What about the "string" offsets?
Pete Dowson Posted June 28, 2011 Report Posted June 28, 2011 I've meant setting the string to send to the specified offset through the Buttons&Switches panel in FSUIPC GUI. The same place as "LuaValue ... " + Parameter. But the parameter there is the parameter there, it is the same for offset controls and all others. There aren't different tables internally, everything is the same, following the "WPARAM, LPARAM" Windows message method used for all FS controls and added FSUIPC controls. The FSUIPC offset controls encode the control and the offset into the 32-bit control number (WPARAM) and the parameter is still 32-bits (LPARAM). Changing to strings would mean allocating memory, passing a pointer in the messages, and subsequently freeing memory, all in such a way that there are no leaks and no access violations, between multiple threads all operating asynchronously. It would be an upheaval and a lot of work, and could add so many difficult-to-find bugs that I'd not be able to release it for months. Sorry, but as I said, there is no way I can undertake such changes at this end stage of FSUIPC development. Regards Pete
Artem Crum Posted June 28, 2011 Author Report Posted June 28, 2011 Didn't know that FSUIPC is using Windows messages here. Now I see what is the problem with that. Thanks.
Pete Dowson Posted June 28, 2011 Report Posted June 28, 2011 Didn't know that FSUIPC is using Windows messages here. Same as FS does -- all FS controls have always been sent as Windows messages (WM_COMMANDs). And with multi-threaded programs it makes it a lot easier to have them all running asynchronously. Regards Pete
Artem Crum Posted June 28, 2011 Author Report Posted June 28, 2011 Very interesting to know how it all is done from it's internals :-)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now