Search found 35 matches

by sitsuj
Wed Jan 03, 2007 9:52 pm
Forum: C++ Development
Topic: Memory barriers on multiprocessor systems
Replies: 6
Views: 1160

Mutexes will handle it for you, don't worry :) They are written to work not only on a single processor machine. The conditions, that you're putting variables on will do the job, don't worry about number of CPUs. I mean it :) If you still don't believe, read some articles about threads and multithrea...
by sitsuj
Wed Jan 03, 2007 10:26 am
Forum: C++ Development
Topic: Memory barriers on multiprocessor systems
Replies: 6
Views: 1160

Hi! :) Some data from wxWidgets latest docs: 1. wxMutex: http://wxwidgets.org/manuals/stable/wx_wxmutex.html#wxmutex 2. wxCondition, which you may also find interesting: http://wxwidgets.org/manuals/stable/wx_wxcondition.html#wxcondition 3. wxCriticalSection may also be helpful: http://wxwidgets.org...
by sitsuj
Tue Jan 02, 2007 10:42 pm
Forum: C++ Development
Topic: Memory barriers on multiprocessor systems
Replies: 6
Views: 1160

Hi! If I will use wxMutex, is any guarantee that code will perform Ok on every supported platform? It's written to work properly on every supported platform, so there's a small chance of failure :) On the other hand, if you don't trust wx Mutex you can always try pthread_mutex_t from pthread.h libra...
by sitsuj
Tue Jan 02, 2007 8:31 pm
Forum: C++ Development
Topic: problems with memory?
Replies: 3
Views: 813

Hi, Wasyl :) Check this out: 1. First of all: to avoid mistakes connected with casting try something like this: const char* c_style_string = (const char*)wxString_style_string.ToAscii(); //most secure 2. Try replacing rep=mysql_store_result(mysql1); with rep = mysql_use_result(mysql1); As you can se...
by sitsuj
Tue Jan 02, 2007 7:58 pm
Forum: C++ Development
Topic: wxListCtrl and EVT_LIST_COL_CLICK Confusion
Replies: 3
Views: 1103

I'm glad I could help :) Best regards -

Sitsuj.
by sitsuj
Mon Jan 01, 2007 6:39 pm
Forum: C++ Development
Topic: wxListCtrl and EVT_LIST_COL_CLICK Confusion
Replies: 3
Views: 1103

Hi! Just add EVT_LIST_COL_CLICK to already existing event table (for example frame's event table or some dialog's event table). The code should be something like that: //in the event table: EVT_LIST_COL_CLICK(ID of your listctrl, Class_from_which_the_called_method_is_derived :: called_method) //with...
by sitsuj
Fri Dec 29, 2006 10:01 am
Forum: C++ Development
Topic: Menus and Dialog based Applications
Replies: 7
Views: 1437

Hi!

I'm not sure if I undestood your question correctly. So, you're trying to set the menu also in dialog boxes and there's a problem? :) Regards -

Sitsuj
by sitsuj
Thu Dec 28, 2006 11:23 pm
Forum: C++ Development
Topic: sizeof wxStringArray
Replies: 3
Views: 804

You can use this:

Code: Select all

int temp_counter = 0;

while(SArray[temp_counter]){
   temp_counter++;
};

temp_counter--; //here's the size of your table of wxStrings
Regards -

Sitsuj
by sitsuj
Thu Dec 28, 2006 8:56 am
Forum: C++ Development
Topic: static text updation
Replies: 9
Views: 1224

Hi, Franc! I have no idea, what's wrong with your code. I can't give you such explanation that sometimes it doesn't work properly and sometimes it does, so my last advice is: start with simpler example, create only one grid sizer, put labels in it and notice the changes. It's all I can advice. This ...
by sitsuj
Thu Dec 28, 2006 8:38 am
Forum: C++ Development
Topic: How can I handle the left button down event of a button?
Replies: 5
Views: 1121

Allright :) Your answer is wxMouseEvent class. Check out macros for the event table and modify my code above as you wish :) EVT_LEFT_DOWN(func) Process a wxEVT_LEFT_DOWN event. The handler of this event should normally call event.Skip() to allow the default processing to take place as otherwise the ...
by sitsuj
Wed Dec 27, 2006 11:35 pm
Forum: C++ Development
Topic: How can I handle the left button down event of a button?
Replies: 5
Views: 1121

Create the event table: BEGIN_EVENT_TABLE(MainFrame, wxFrame) EVT_BUTTON(ID_Of_Action_Object, MainFrame :: CalledMethod) END_EVENT_TABLE(); And then simply write that method down: void MainFrame :: CalledMethod(wxCommandEvent& event){ do something after clicking on the button; }; And that's it. Coul...
by sitsuj
Wed Dec 27, 2006 9:50 pm
Forum: C++ Development
Topic: static text updation
Replies: 9
Views: 1224

Hi! I had a similar problem in my app. A bit different error log, but problem with refreshing sizer content was the same as yours. I tried hiding objects, but it doesn't always work. I'm pasting a piece of my code, which is used for "refreshing" the frame content. main_sizer = new wxBoxSizer(wxHORIZ...
by sitsuj
Tue Dec 26, 2006 10:35 am
Forum: C++ Development
Topic: static text updation
Replies: 9
Views: 1224

Hi! Sorry, excuse my english. I meant, that as a child of grizsizer and topsizer classLabel should be "refreshed" so you should move it away from those sizers (destroy or assign to temporary pointer and then destroy), set againt with specified value and "connect" with sizers again. I hope it's clear...
by sitsuj
Tue Dec 26, 2006 9:50 am
Forum: C++ Development
Topic: static text updation
Replies: 9
Views: 1224

Hi, Franc! The reason of your problem lays probably in the way you set the label. Try to destroy classLabel children, change the label and set the children again (or if you don't want to, just create temporary pointers, store classLabel children in those pointers and then destroy the children and ad...
by sitsuj
Sat Dec 16, 2006 8:37 pm
Forum: C++ Development
Topic: Linux GDK Critical error running
Replies: 6
Views: 1453

GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer deskjet920c could not be loaded. I would try checking driver for your HP (try to open that ppd with your favourite editor, then check it for errors), check carefully Cups (in my home network there's always something wrong with it ;) ) ...