OSLion with wxWidgets

106 views
Skip to first unread message

Gpeica

unread,
Sep 2, 2011, 4:26:06 AM9/2/11
to wx-users
Hi all,

I have try to use the wxWidgets on OS Lion. And I found I could not
input any text into those text related control. (E.g. wxTextCtrl and
wxGrid). But I could paste the text into it by context menu.

Anyone has idea about it?

Thanks.

evstevemd

unread,
Sep 4, 2011, 6:43:26 AM9/4/11
to wx-users
which port are you using? Carbon or Cocoa?

Peica

unread,
Sep 4, 2011, 8:08:48 AM9/4/11
to wx-u...@googlegroups.com
Hi,

I am using the wxWidgets-devl @2.9.2

> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to wx-users+u...@googlegroups.com
> or visit http://groups.google.com/group/wx-users

Best wishes,

Peica Chen 陈培嘉
other mail: pe...@qq.com

Dimitri Schoolwerth

unread,
Sep 4, 2011, 11:41:22 AM9/4/11
to wx-u...@googlegroups.com
2011/9/4 Peica <gpe...@gmail.com>:

> Hi,
>
> I am using the wxWidgets-devl @2.9.2

2.9.2 can use Carbon as well as Cocoa. How did you compile the
library? If you use configure and didn't pass --with-cocoa or
--with-osx-cocoa then you are using Carbon.


Regards,
Dimitri

Peica

unread,
Sep 4, 2011, 10:22:10 PM9/4/11
to wx-u...@googlegroups.com
I am not sure what library i am using now. I just use the default setting from macport. is there any method could check it out at runtime?

Or should I realize that the cocoa is not support by wxWidgets?

Peica

unread,
Sep 4, 2011, 10:34:57 PM9/4/11
to wx-u...@googlegroups.com
I think I am using the cocoa. I use the 'wx-config --libs' command, and get below result.

-L/opt/local/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime -lwx_osx_cocoau_xrc-2.9 -lwx_osx_cocoau_html-2.9 -lwx_osx_cocoau_qa-2.9 -lwx_osx_cocoau_adv-2.9 -lwx_osx_cocoau_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9

在 2011-9-4,下午11:41, Dimitri Schoolwerth 写道:

Dimitri Schoolwerth

unread,
Sep 5, 2011, 1:40:58 PM9/5/11
to wx-u...@googlegroups.com
On Fri, Sep 2, 2011 at 12:26 PM, Gpeica <gpe...@gmail.com> wrote:

> I have try to use the wxWidgets on OS Lion. And I found I could not
> input any text into those text related control. (E.g. wxTextCtrl and
> wxGrid). But I could paste the text into it by context menu.

I am not seeing the problem with either 2.9.2 or trunk (2.9.3) using
Cocoa. I am trying the minimal sample with a wxTextCtrl, on OS X
10.7(.0).
In case you have Xcode 3 or later, could you please try the following?

Download wx 2.9.2 from
http://sourceforge.net/projects/wxwindows/files/2.9.2/wxWidgets-2.9.2.tar.bz2/download
.

Extract the archive and open samples/minimal/minimal_cocoa.xcodeproj

Add the following line at the start of MyFrame::MyFrame in minimal.cpp :

"
new wxTextCtrl(new wxPanel(this), wxID_ANY);
"

Press Cmd+R to Build and Run.

The resulting application allows me to input text (I also tried
successfully with Pinyin Simplified and Traditional).


Regards,
Dimitri

Peica

unread,
Sep 5, 2011, 8:46:48 PM9/5/11
to wx-u...@googlegroups.com, wx-u...@googlegroups.com
ok. I will try it later and post the result back. thanks.

Best wishes,

Peica Chen 陈培嘉
mobile: +86-13824491229

Peica

unread,
Sep 5, 2011, 11:40:06 PM9/5/11
to wx-u...@googlegroups.com
Hi,

I meet a compilation error in Xcode 4.1 for this project.

/Users/peica/Desktop/wxWidgets-2.9.2/build/osx/../../src/osx/utils_osx.cpp:72: error: 'CGDisplayBitsPerPixel' was not declared in this scope

file://localhost/Users/peica/Desktop/wxWidgets-2.9.2/src/osx/utils_osx.cpp: error: Semantic Issue: Use of undeclared identifier 'CGDisplayBitsPerPixel'


/Users/peica/Desktop/wxWidgets-2.9.2/build/osx/../../src/osx/window_osx.cpp:1605: error: 'InsetRect' was not declared in this scope

> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to wx-users+u...@googlegroups.com
> or visit http://groups.google.com/group/wx-users

Best wishes,

Peica Chen 陈培嘉
other mail: pe...@qq.com

Dimitri Schoolwerth

unread,
Sep 6, 2011, 1:48:17 AM9/6/11
to wx-u...@googlegroups.com


On Tuesday, September 6, 2011, Peica wrote:
 
I meet a compilation error in Xcode 4.1 for this project.

/Users/peica/Desktop/wxWidgets-2.9.2/build/osx/../../src/osx/utils_osx.cpp:72: error: 'CGDisplayBitsPerPixel' was not declared in this scope

From what I understand you have to (for now) tell Xcode to use the 10.6 SDK instead of 10.7. With Xcode projects you can do this by opening the file:

build/osx/wx.xcconfig

and add the line:

SDKROOT=macosx10.6



Regards,

Dimitri


Peica

unread,
Sep 6, 2011, 2:02:45 AM9/6/11
to wx-u...@googlegroups.com
Now it is input text ok by Xcode 10.6 sdk and minimal sample with textCtrl.

Does it mean the problem on my side is caused by the error configuration of macport?

Peica

unread,
Sep 6, 2011, 12:24:24 PM9/6/11
to wx-u...@googlegroups.com
Hi All,

Sorry. This problem is caused by my mistaken. I have forgot to create a application bundle for my output.
It is mention at here.

Notice that, by default, Eclipse CDT does not create app bundles, so your app will not be able to come into focus. Seehttp://wiki.wxwidgets.org/WxMac_Issues#My_app_can.27t_be_brought_to_the_front.21 for solutions.


在 2011-9-6,下午1:48, Dimitri Schoolwerth 写道:

Peica

unread,
Sep 6, 2011, 12:24:24 PM9/6/11
to wx-u...@googlegroups.com
Hi All,

Sorry. This problem is caused by my mistaken. I have forgot to create a application bundle for my output.
It is mention at here.

Notice that, by default, Eclipse CDT does not create app bundles, so your app will not be able to come into focus. Seehttp://wiki.wxwidgets.org/WxMac_Issues#My_app_can.27t_be_brought_to_the_front.21 for solutions.


在 2011-9-6,下午1:48, Dimitri Schoolwerth 写道:

Reply all
Reply to author
Forward
0 new messages