Author Topic: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.  (Read 15389 times)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #15 on: February 06, 2007, 09:39:20 am »
Quote
Is there any way to disable/enable a part of wizard page dynamically (means as soon as an user selects an option)?

Hehe, as a matter of fact it aready is possible ;).

When clicking any button/checkbox/combobox/choice/listbox/radiobox in your XRC page, the script function OnClick_<control_name> is called. In there, you can use Wizard.EnableWindow(_T("control_name"), true/false) to enable/disable any control on the page.

Thanks a lot mandrav. Now I can add some sort of interactivity.

I read about these changes, but didn't track how it is done. Thanks again for the suggestion.  :D
Be a part of the solution, not a part of the problem.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #16 on: February 06, 2007, 09:49:27 am »
You should also know that you can "detect" what wx configurations are installed by using IO.ExecuteAndGetOutput("wx-config --list") and parsing the results ;).
Note though that this will trigger a security dialog so make sure you prepare the user for it.
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #17 on: February 06, 2007, 09:54:04 am »
You should also know that you can "detect" what wx configurations are installed by using IO.ExecuteAndGetOutput("wx-config --list") and parsing the results ;).
Note though that this will trigger a security dialog so make sure you prepare the user for it.

Hmm.. It seems I'm using dated knowledge. I'll refresh my knowhow and try to use newer and better functions in the script.  :)

But how many possible configurations are available in Linux? E.g., gtk2-*, gtk-*, x11-*, and others??
Be a part of the solution, not a part of the problem.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #18 on: February 06, 2007, 10:13:56 am »
Quote
But how many possible configurations are available in Linux? E.g., gtk2-*, gtk-*, x11-*, and others??

You should not care about that at all. If you go the "detection" route, you will just present the found configurations and let the user choose which one to use.
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #19 on: February 06, 2007, 10:19:59 am »
Ok. I'll implement it later this week.

The changes are made. I would test it before I commit. Screenshot is attached below.

« Last Edit: February 06, 2007, 11:17:00 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #20 on: February 06, 2007, 10:52:22 am »
Tested and Committed. In Revision 3574.

The Advanced options shall be unavailable if user selects "Use default wxWidgets settings".

Thanks to momaa, Pecan and Mandrav.  :)
« Last Edit: February 06, 2007, 11:15:31 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2126
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #21 on: February 06, 2007, 02:42:21 pm »
Tested and Committed. In Revision 3574.

The Advanced options shall be unavailable if user selects "Use default wxWidgets settings".

Thanks to momaa, Pecan and Mandrav.  :)

Biplab, thanks for that. And I *do* appreciate all your hard work.

When debugging CB for hours, or figuring out how some code works, it's important to me to just whip up a simple test case fast and easy.

Spending 20 minutes figuring out why a simple test case won't work makes us old guys forget why we were doing it in the first place.

I have a number of wxWidget configurations on my machine, and I don't want to have to remember the particulars of which one I last set each time I create a test program. The simple wx-config --cflags and --libs will set them for me. Then I can get back to debugging or stepping through the code.

thanks again
pecan
« Last Edit: February 06, 2007, 02:47:10 pm by Pecan »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #22 on: February 06, 2007, 02:57:09 pm »
Biplab, thanks for that. And I *do* appreciate all your hard work.

When debugging CB for hours, or figuring out how some code works, it's important to me to just whip up a simple test case fast and easy.

Spending 20 minutes figuring out why a simple test case won't work makes us old guys forget why we were doing it in the first place.

I have a number of wxWidget configurations on my machine, and I don't want to have to remember the particulars of which one I last set each time I create a test program. The simple wx-config --cflags and --libs will set them for me. Then I can get back to debugging or stepping through the code.

thanks again
pecan

Pecan,

I highly regard you and other senior dev's effort to make it one of the most powerful IDE.  :D

Before it was committed in the repository, I requested users to test it and post their valuable feedbacks and suggestions. I've tried to implement most of the suggestions I've received, just like this one.

Hope the newer modification will be helpful. Kindly post any other suggestions that you have.  :)

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #23 on: February 06, 2007, 03:53:41 pm »
@Mandrav, I was trying to use IO.ExecuteAndGetOutput(_T("`wx-config --list`")); But it is returning a NULL string.

I was getting the security warning and I allowed the script to run. But still no result. I have run C::B in SU mode and in normal user mode. But the result is same. What could be the problem??

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #24 on: February 06, 2007, 05:45:20 pm »
@Mandrav, I was trying to use IO.ExecuteAndGetOutput(_T("`wx-config --list`")); But it is returning a NULL string.

I was getting the security warning and I allowed the script to run. But still no result. I have run C::B in SU mode and in normal user mode. But the result is same. What could be the problem??

Regards,

Biplab

IO.ExecuteAndGetOutput() does not return a string but rather a wxArrayString (IIRC)...
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #25 on: February 06, 2007, 05:53:27 pm »
Oh.. Then the Wiki should be changed.

I'll try tomorrow afternoon and will post you result.  :)


Edit 1:
It returns a wxString. But there might be bug in the last line of following code (I'm not absolutely sure).

File: src/sdk/scripting/bindings/sc_io.cpp
Code: [Select]
wxString ExecuteAndGetOutput(const wxString& command)
        {
            .... ......
            wxExecute(command, output, wxEXEC_NODISABLE);
            return GetStringFromArray(output);
        }

GetStringFromArray requires 2 parameters whereas only 1 has been supplied.  :)
« Last Edit: February 06, 2007, 06:10:28 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #26 on: February 06, 2007, 06:56:50 pm »
Quote
It returns a wxString. But there might be bug in the last line of following code (I'm not absolutely sure).

Oh, sorry, seems I didn't remember well.
Anyway, the 2nd param of GetStringFromArray() is the delimiter to use, which defaults to ";" (IIRC).
I 'm going to have a look...
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #27 on: February 11, 2007, 06:30:52 pm »
The function works now. (Found in Rev 3579)

Thanks for the fix.  :D
Be a part of the solution, not a part of the problem.