Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

New UserVarManager implementation

<< < (2/4) > >>

AndrewCot:
Is it expected that the patch includes the previous changes as per the following thread for the tabGlobVars dialog as I cannot see it in the patch? Add UI to store default values and descriptions of global variables in project

This is a query, how do I get to the UI in point 8 ()?
8. Introduces an UI interface so we can use different UIs for batch builds (console) and UI builds

I will need to spend a bit of time trying to use the code once all of the changes are sorted out.

AndrewCot:
Second problem:
This could be caused by me missing something in the code merge, but I cannot add a new user variable (one of the existing 7 user definable on the right) . I cannot see where the m_Name or m_Value is updated with the values entered before the UsrGlblMgrEditDialog::SaveSet is called when you click on the saveSet button.

I added the following line in the UserVariableManager::Save() function after the write to save me debugging the structures as it was too slow for me:

Manager::Get()->GetLogManager()->DebugLog(wxString::Format("UserVariableManager::Save - manager->Write(%s, %s);", basePath + member, value));


UPDATE:Adding a call to "Save();" as the first line of UsrGlblMgrEditDialog::SaveSet looked like it fixed the save of the new user variable. I only did one test as I am calling it for today.

AndrewCot:
I have one enhancement request as follows:
a) Add an extra user variable, so it takes the total to 8. A side effect is that the GUI has a better layout IMHO.
b) In src\src\uservardlgs.cpp change the references to the max user variables from 7 to MAX_USER_DEFINED (or another another variable )
    and add a "#define MAX_USER_DEFINED 8" at the top of the file after the #include's. This will make it easier if in the future the number needs increasing.
c) In the src\src\resources\global_uservars.xrc add the n7 and v7 for the new user variables

cacb:
I use C::B global variables extensively, so I will be reading this thread with interest. Thanks for the good work.

BlueHazzard:
Thank you for testing all!

--- Quote ---8. Introduces an UI interface so we can use different UIs for batch builds (console) and UI builds
--- End quote ---
This is only meant as interface class in code (virtual class UserVarManagerUI that has two implementations: UserVarManagerGUI for GUI and UserVarManagerNoGuiUI for non GUI things, this at the moment does nothing, but output some in the log and does not block  ::) )


--- Quote ---The patch file does not include the <Unit filename="src/resources/ask_global_uservar.xrc"> new that's in the project files and in the Github branch, but not in the patch.
--- End quote ---
I will add this in a follow up patch. At the moment i wait a bit for Morten MacFly to give a green light for this patch, then i will follow up with the next.


--- Quote ---I added the following line in the UserVariableManager::Save() function after the write to save me debugging the structures as it was too slow for me:

Manager::Get()->GetLogManager()->DebugLog(wxString::Format("UserVariableManager::Save - manager->Write(%s, %s);", basePath + member, value));


UPDATE:Adding a call to "Save();" as the first line of UsrGlblMgrEditDialog::SaveSet looked like it fixed the save of the new user variable. I only did one test as I am calling it for today.
--- End quote ---
Yes this is a error i will look into. This probably happened because i had to split up my git history and create a svn patch, this is all a bit dangerous...


--- Quote ---I have one enhancement request as follows:
a) Add an extra user variable, so it takes the total to 8. A side effect is that the GUI has a better layout IMHO.
b) In src\src\uservardlgs.cpp change the references to the max user variables from 7 to MAX_USER_DEFINED (or another another variable )
    and add a "#define MAX_USER_DEFINED 8" at the top of the file after the #include's. This will make it easier if in the future the number needs increasing.
c) In the src\src\resources\global_uservars.xrc add the n7 and v7 for the new user variables
--- End quote ---
Thank you for finding this. My ultimate target is to get rid of any fixed number of member variables and rework this UI to use a wxDataViewCtrl  so a user can enter unlimited number of members
But same as above before i put more work into this i would like some kind of green light from Morten


Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version