Search found 18 matches

by Rakan
Sat May 31, 2008 10:53 am
Forum: C++ Development
Topic: wxODBC and wxdba problems
Replies: 3
Views: 871

Thanks for your reply,

Since i am going to be connecting to a MySQL server i decided to go with wxMySQL.

I found out that the error because of wx-config was not set to use the odbc library. when i did set it to use odbc the app compiled.
But annoyed me with it's DSN on linux.

Thanks again
by Rakan
Fri May 30, 2008 12:36 pm
Forum: C++ Development
Topic: Arabic encoding in char* to wxString
Replies: 8
Views: 1955

Thanks doublemax,

It turned out that using telnet to connect to the server was the problem. I tried netcat and arabic text was received correctly.

Thanks alot
by Rakan
Fri May 30, 2008 12:34 pm
Forum: C++ Development
Topic: wxODBC and wxdba problems
Replies: 3
Views: 871

wxODBC and wxdba problems

Hello, I am trying to write code for connecting to mysql server. Tried wxODBC but when i #include <wx/db.h> i get an error that "sql.h" not found /usr/include/wx-2.8/wx/db.h|82|error: sql.h: No such file or directory| read on wxwidgets wiki the wxODBC is no longer used so i also tried wxdba the wrap...
by Rakan
Tue May 27, 2008 8:49 pm
Forum: C++ Development
Topic: Arabic encoding in char* to wxString
Replies: 8
Views: 1955

Hello doublemax Thank you for your contribution, but your code deals with constant char* while my code is a variable. you converted the constant char* to a wxString but in my case converting variable value to wxString which is my main problem, i was unable to convert char* to wxString while preservi...
by Rakan
Tue May 27, 2008 3:38 pm
Forum: C++ Development
Topic: Arabic encoding in char* to wxString
Replies: 8
Views: 1955

wxString str(buf,wxConvUTF8); client->Write(str.c_str(),str.Length()); Nothing sent back either. I have added this code to see contents of buffer for (int x = 0; x < len; x++){ a.Printf(_("%d\n"), buf[x]); txtMsgs->AppendText(a);} here is the code's output: 37777777731 37777777730 37777777661 37777...
by Rakan
Tue May 27, 2008 2:52 pm
Forum: C++ Development
Topic: Arabic encoding in char* to wxString
Replies: 8
Views: 1955

I tried sending english text, the code shows text received while sending arabic text doesnt unsigned char len = 0; char* buf = new char[1024]; //read size client->Peek(buf,1024); len = client->LastCount(); if(len > 0) { buf[len] = '\0'; //make sure the string ends with \n to process it; wxString str...
by Rakan
Tue May 27, 2008 2:24 pm
Forum: C++ Development
Topic: Arabic encoding in char* to wxString
Replies: 8
Views: 1955

Arabic encoding in char* to wxString

Hello, Developing a server application that will receive english/arabic text. When i receive the buffer i convert it to utf8 using wxString str = wxString::FromUTF8(buff); or wxString str(buff,wxConvUTF8); Both ways produce an empty string object. I am unable to figure out whats wrong as i thought m...
by Rakan
Mon May 26, 2008 7:32 pm
Forum: C++ Development
Topic: wxSocket Receiving bad data
Replies: 2
Views: 836

SOLVED

Hello, Thanks for your reply, actually the client is the linux console telnet client. I am not planning to develop the client in wxWidgets. Your code actually printed the same results. Could they be garbage data from unassigned char* buffer? if so, how does Read initialize it? EDIT: solved, the c st...
by Rakan
Mon May 26, 2008 5:27 pm
Forum: C++ Development
Topic: wxSocket Receiving bad data
Replies: 2
Views: 836

wxSocket Receiving bad data

Hello, Here is my code void ChatServerFrame::OnClientEvent(wxSocketEvent& event) { //make sure we only process input and lost events wxASSERT(event.GetSocketEvent()==wxSOCKET_INPUT || event.GetSocketEvent()==wxSOCKET_LOST); //now check and process according to events txtMsgs->AppendText(_("In Client...
by Rakan
Mon May 26, 2008 4:16 pm
Forum: C++ Development
Topic: wxSocket get size of received packet.
Replies: 1
Views: 652

Solved

it is solved. Here is what i had to do. In documentation it says the LastCount can only be used after using read, peek so i had to call peek to get the size and keep the data in buffer, i set up a large buffer 1024 bytes longs and peek'ed the data to it and then used LastCount to get the number of b...
by Rakan
Mon May 26, 2008 3:23 pm
Forum: C++ Development
Topic: wxSocket get size of received packet.
Replies: 1
Views: 652

wxSocket get size of received packet.

Hello, I am trying to develop a simple client/server application using wxWidgets. I have successfully established connection between both client and server but still not able in server to receive packet sent by client to server. note: client is not developed yet so i use telnet for testing. I follow...
by Rakan
Tue Apr 29, 2008 9:31 pm
Forum: C++ Development
Topic: wxTextCtrl text-highlight
Replies: 3
Views: 1259

wxTextCtrl text-highlight

Hello,

I am working on a simple text-editor that would just highlight certain words for me like programming language keyworks, lets say PHP. Does wxTextCtrl support highlighting text in colors, and how?

Thanks,
Rakan
by Rakan
Tue Apr 29, 2008 2:45 pm
Forum: C++ Development
Topic: Window Resize event
Replies: 1
Views: 1630

Window Resize event

Hello, I am using codeblocks on ubuntu linux to develop wxWidgets applications. I want to start off by creating a simple texteditor... Anyway, my problem is that i have used the wxPanel widget on my form to contain the text area. I do not want to use resizers because they kind of complicate things f...
by Rakan
Sun Apr 20, 2008 5:06 pm
Forum: C++ Development
Topic: What does _ (underscore mean)
Replies: 3
Views: 1500

Hello,
thanks for the answer but i did not really get it, translated to another "programming language" or translated to another "human" language?
by Rakan
Sun Apr 20, 2008 4:45 pm
Forum: C++ Development
Topic: What does _ (underscore mean)
Replies: 3
Views: 1500

What does _ (underscore mean)

Hello all, I have noticed the following code: wxString msg = wxbuildinfo(long_f); wxMessageBox(msg, _("Welcome to...")); and wxMessageBox(_("Hello new"),_("Title here")); My simple question is, what do we have to add an underscore "_" before strings? this seems like calling a string constructor to m...