Author Topic: wx_cfg custom variable  (Read 20508 times)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wx_cfg custom variable
« Reply #15 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

takeshimiya

  • Guest
Re: wx_cfg custom variable
« Reply #16 on: December 21, 2005, 11:09:54 pm »
How would you differentiate between normal vars and custom vars, if they all share the same syntax?

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".

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.

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). :(

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wx_cfg custom variable
« Reply #17 on: December 21, 2005, 11:17:57 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.
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++.
You really want to read the documentation. These are not hardcoded at all, but do exactly what you request as new feature.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: wx_cfg custom variable
« Reply #18 on: December 21, 2005, 11:28:55 pm »
That's a known bug and fixed. Only not committed yet because Yiannis did a build chain rewrite at the same time.

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
« Last Edit: December 21, 2005, 11:32:24 pm by 280Z28 »
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

takeshimiya

  • Guest
Re: wx_cfg custom variable
« Reply #19 on: December 21, 2005, 11:42:46 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?
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.

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.