-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some questions and suggestions about data model #145
Comments
Appreciate the feedback! I'll try to answer as best I can.
I'm very interested to see how you end up integrating data bindings into the Lua plugin. Perhaps you'd like to contribute upstream when you have something working well? :) |
Thanks. The data binding I wrote is for my own lua plugin, it has a little different structure from the offical version . The main motivation of making another version of lua plugin is that the offical version is too complex in C++ code. I would like a very thin and flex wrapper in C++ side, and put most things into lua side (something like livespan management, adding methmethod, etc). But I wrote a simplified version for offical lua plugin today. (see #146) Much remains to be done, but I wish it can give you some inspiration. |
I'm trying to write a lua binding for data model these days, and I have some questions.
DataModel::BindFunc
can only bind a functionFunction<void(Variant&)>
, it's very limit for dynamic language because the function in lua (or other script language) is data rather than a function code address. I thinkFunction<void(Variant&,void *)>
would be more useful .I need use
DataModel::BindVariable
to bind the variable in lua . I can't useDataModelConstructor::Bind
, it can only bind a memory address but the variable in lua is not. I suggest to addBindVariable
into the classDataModelConstructor
, and I can write aVariableDefinition
for lua variables.About the
DataModel::Update
. Why not update all the data models automatically inContext::Update
? Or adding aContext::UpdateDataModels
would be useful. it can reduce the complexity of management in lua bindings. For example, if I create a new data model in<script>
, the framework doesn't need to know which data model should be update beforeContext::Update
.The text was updated successfully, but these errors were encountered: