working on code generation

This commit is contained in:
paul
2024-09-26 11:59:24 +05:30
parent 37e7bea0fa
commit e34751c20c
13 changed files with 252 additions and 108 deletions

View File

@@ -0,0 +1,33 @@
import MainWindow from "../widgets/mainWindow"
import { message } from "antd"
async function generateTkinterCode(projectName, widgetList=[], widgetRefs=[]){
console.log("widgetList and refs", projectName, widgetList, widgetRefs)
let mainWindowCount = 0
for (let widget of widgetList){
if (widget.widgetType === MainWindow){
mainWindowCount += 1
}
if (mainWindowCount > 1){
message.error("Multiple instances of Main window found, delete one and try again.")
return
}
}
if (mainWindowCount === 0){
message.error("Aborting. No instances of Main window found. Add one and try again")
}
}
export default generateTkinterCode