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

wx_cfg custom variable

<< < (4/4)

thomas:
That's a known bug and fixed. Only not committed yet because Yiannis did a build chain rewrite at the same time.

takeshimiya:

--- Quote from: mandrav on December 21, 2005, 10:39:28 pm ---How would you differentiate between normal vars and custom vars, if they all share the same syntax?

--- End quote ---

One solution would be to add in the Project Options->Custom variables tab, split in two listboxs:
-Project variables
-Global variables

I'm not sure a different syntax would be needed (from the user standpoint). You could replace the global ones from $(VAR) to $(#VAR) internally if it makes that more easy to code.

Another plus on using that: It'll be a bit more user-friendly, as you will not have to tell users: "If you want to create a global variable use it somewhere".


--- Quote from: mandrav on December 21, 2005, 10:39:28 pm ---Hmm, nice, type in three edit boxes. Do you know of many common libraries that don't use the /lib and /include convention? I don't understand what the gain would be.
And about $(WX_PREFIX) you mentioned, Thomas already posted that some things will be changed in global vars to make them more adaptable.

--- End quote ---

Mm, now that I think, 3 edit boxes will not be necesary. See:

Example:
User creates $(WX_DIR) Global Variable . With a default value of empty string.
User creates $(WX_INCLUDE) Global Variable. With a default value of "$(WX_DIR)\include".
User creates $(WX_LIB) Global Variable. With a default value of "$(WX_DIR)\lib".

The "default values" would be entered from the "Create new global variables dialog" I suggest above (@Project Options->Custom variables tab).

The main point of what I'm seeing the current ones as a shortcoming, is that appart from being (at first sight) more logical/user-friendly, it's not hardcoded to C++.


Please, don't take this as "the right/wrong thing", all I'm saying is that the global variables weren't discussed in the forum, and as I'm seeing shortcomings with it, better to discuss it now (better to be safe than sorry). :(

thomas:

--- Quote from: Takeshi Miya on December 21, 2005, 11:09:54 pm ---One solution would be to add in the Project Options->Custom variables tab, split in two listboxs:
-Project variables
-Global variables
I'm not sure a different syntax would be needed (from the user standpoint). You could replace the global ones from $(VAR) to $(#VAR) internally if it makes that more easy to code.
--- End quote ---
So i can enter foo in both global and per-project variables. When MacrosManager sees gcc-mingw -I$foo then what is that, global or per project?


--- Quote ---User creates $(WX_DIR) Global Variable . With a default value of empty string.
User creates $(WX_INCLUDE) Global Variable. With a default value of "$(WX_DIR)\include".
User creates $(WX_LIB) Global Variable. With a default value of "$(WX_DIR)\lib".
[...]
The main point of what I'm seeing the current ones as a shortcoming, is that appart from being (at first sight) more logical/user-friendly, it's not hardcoded to C++.
--- End quote ---
You really want to read the documentation. These are not hardcoded at all, but do exactly what you request as new feature.

280Z28:

--- Quote from: thomas on December 21, 2005, 11:08:14 pm ---That's a known bug and fixed. Only not committed yet because Yiannis did a build chain rewrite at the same time.

--- End quote ---

hmm ok. I'll work with a prev. version for a while then. Thanks :)

Edit: Actually I'll just back up my .cbp file and work with hard coded items instead of variables for a while.

Edit 2: ConTEXT + find/replace on the variables in the .cbp got me going in 2 minutes flat.  :P

takeshimiya:

--- Quote from: thomas on December 21, 2005, 11:17:57 pm ---So i can enter foo in both global and per-project variables. When MacrosManager sees gcc-mingw -I$foo then what is that, global or per project?

--- End quote ---
A solution to that would be: Either one of them will have priority. The user generally will not override one with another variable, but he could do so if he wants.


--- Quote ---You really want to read the documentation. These are not hardcoded at all, but do exactly what you request as new feature.

--- End quote ---

Ok, here lies the main problem: I hadn't read the documentation so I though they was hardcoded :lol: :shock: :lol: :shock:
Now everything makes more sense. Forgive me then.

But, this also demostrates they aren't user-friendly.
So, more emphasis should be added in the GUI explaining where to put them and how to use it. You know, the GUI should be the friendly enough to not requiere the user reads the documentation.

Probably it will be good in the "Create new variable" dialog, put a checkbox "Make Global Variable" or something like.

Navigation

[0] Message Index

[*] Previous page

Go to full version