Search found 630 matches

by TrV
Tue Aug 24, 2010 7:15 pm
Forum: C++ Development
Topic: Is there an IP address input control?
Replies: 3
Views: 3596

Re: Is there an IP address input control?

[...]how can I validate that the user input valid IP address? For this kind of things, regex does it! // check of IP address // regular expression for IP address (4 [0-255] decimal numbers separated by periods) // [0-9]{1} : exactly 1 decimal digit ([0-9]) // |[0-9]{2} : ...or exactly 2 decimal dig...
by TrV
Sun Jun 27, 2010 10:10 pm
Forum: C++ Development
Topic: Application Process Is Still Alive...
Replies: 2
Views: 1760

To really close a wxwidgets app, i generally make use of wxFrame::Destroy(), otherwise the app keeps on running in the background.
by TrV
Thu Jun 17, 2010 3:40 pm
Forum: C++ Development
Topic: OK to use Delete and TestDestroy with a Joinable thread?
Replies: 7
Views: 2939

I've also never used joinable threads... however i think Wait() is used for joinable threads in the same manner as Delete() is for detached ones.
by TrV
Mon Jun 14, 2010 3:12 pm
Forum: C++ Development
Topic: Plugin oriented App
Replies: 62
Views: 26512

What is the main purpose of your future application?
by TrV
Mon Jun 14, 2010 6:57 am
Forum: C++ Development
Topic: Plugin oriented App
Replies: 62
Views: 26512

I have absolutely no experience in developing such kind of "pluginable" applications... but i do have some experience in developing a plugin for an application (i've developed several add-ons for TB), so i can give you some hints about the "developer-user": I would simply say tha...
by TrV
Mon Jun 14, 2010 6:39 am
Forum: C++ Development
Topic: Const-correctness help.
Replies: 14
Views: 20978

It's not a big deal anyway scriptdaemon! ;)
by TrV
Mon Jun 14, 2010 12:02 am
Forum: C++ Development
Topic: Const-correctness help.
Replies: 14
Views: 20978

Is that a general rule then to Ooly put const in the beginning of a function declaration if it returns a pointer? (Are there no performance gains the way I have it now, even if slightly?) Returning a pointer is a special case that has nothing to do with gaining performance. Doing that, memory leak ...
by TrV
Sun Jun 13, 2010 11:57 pm
Forum: C++ Development
Topic: Const-correctness help.
Replies: 14
Views: 20978

I do agree with Auria. As a "protocol", here's what i follow when coding: - If a copy is made (neither "&" nor "*") "const" is out of the point because everything is local, so one guesses that developer knows what he wants and what he needs - If no copy is...
by TrV
Fri Jun 11, 2010 12:52 am
Forum: C++ Development
Topic: Polymorphism
Replies: 12
Views: 4921

Knowing than #include is nothing more than a copy/paste of code by the preprocessor, if you include A.h in B.h and vice-versa, then you get into an infinite loop: A.h is read, and tells to read B.h, B.h is read and tells to read A.h, A.h is read and tells to read B.h, etc. So .h have to be included ...
by TrV
Thu Jun 10, 2010 11:11 pm
Forum: C++ Development
Topic: Polymorphism
Replies: 12
Views: 4921

Here is the principle to prevent cross-inclusion issues: A.h class B; class A { private: B* myB; }; A.cpp #include "A.h" #include "B.h" ... B.h class A; class B { private: A* myA; }; B.cpp #include "B.h" #include "A.h" ...
by TrV
Mon Jun 07, 2010 10:40 pm
Forum: C++ Development
Topic: Just one function can run in the thread
Replies: 6
Views: 1941

Hi. I know this is not about your question but i cant resist:
Instead of

Code: Select all

for (;;) 
{
    ...

    if ( TestDestroy() ) 
    { 
        break; 
    } 
}
why not write:

Code: Select all

while ( !TestDestroy() )
{
    ...
}
by TrV
Fri May 28, 2010 9:56 am
Forum: C++ Development
Topic: Simple thread runs forever until it's killed
Replies: 2
Views: 1380

Re: Simple thread runs forever until it's killed

1) If you look at the Entry function for my BeeperThread, you'll see that the thread just runs in an eternal loop and it never checks TestDestroy. Is it OK to write a thread like this in wxWidgets? [...] 2) If you look at the code for when the user clicks "Turn Off Beeper", you'll see tha...
by TrV
Wed May 26, 2010 10:15 pm
Forum: C++ Development
Topic: Can't Add Widgets to wxDialog
Replies: 4
Views: 2406

For this kind of stuff, it's easier to always create objects on the heap! wxDialog object can be created on the heap as well as on the stack (but i do prefer on the heap). wxTextCtrl and such kind of graphic objects are generally created on the heap as the parent (the dialog) will take care of destr...
by TrV
Thu May 20, 2010 1:57 pm
Forum: C++ Development
Topic: wxToolBar in each panel of a wxNotebook glitches
Replies: 5
Views: 2705

I'm sorry, i really dont' know...
by TrV
Thu May 20, 2010 1:15 pm
Forum: C++ Development
Topic: wxToolBar in each panel of a wxNotebook glitches
Replies: 5
Views: 2705

Unless you have a specific need which is only provided by 2.9.0, which is still in development and not marked as stable, i strongly suggest to get "back" to 2.8.11 if it works.