Author Topic: problem with wxSmith and Mac-OSX  (Read 20979 times)

usenechal

  • Guest
problem with wxSmith and Mac-OSX
« on: May 23, 2007, 10:04:52 am »
Hi all,

I tried the svn-version 3964 for Mac-OSX (10.4.9, intel) and found a problem with the wxSmith-plugin: everytime I open a wxFrame-Resource, it is shown only for a short time (one second or so). Afterwards the layout-window is constantly grey. When changing some properties like "default pos" in the properties window it's the same behavior. Does anyone noticed the same behavior?

best regards
ulf

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: problem with wxSmith and Mac-OSX
« Reply #1 on: May 23, 2007, 09:50:32 pm »
Yes, unfortunately it's a known problem.

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: problem with wxSmith and Mac-OSX
« Reply #2 on: May 23, 2007, 11:31:04 pm »
Unfortunately I don't have any access to Mac now, so I can't even easily figure out what's wrong with it :/.
I must confess that I forgot about Mac issue for some time (I just had some busy times, as usual ;)). Maybe it's good time to reactivate it.

The main discussion was here but since this topic does not talk only about wxSmith problems, maybe we should continue here.

From what I've seen there, we're not far away from getting it working.

In attachment is patch which tries to draw some extra text on editor showing what's internally going on. If someone could apply it locally on Mac and give the results I would appreciate this. Afb said here that there's no text shown. But that's really strange because text is drawn just after drawing drag boxes. Maybe there's something wrong with drawing the text :?.

I've also attached some pictures how this patch affect the XP version (don't know how to put attachments right into post, anybody can say how to do it ?).

The one with "Fast Refresh" shows right after showing editor content, the "Timer Refresh" shows periodically each 5 seconds, the "OnPaint Refresh" shows when generic repaing is needed (just like when minimizing and then maximizing C::B back).

Regards
  BYO

[attachment deleted by admin]

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: problem with wxSmith and Mac-OSX
« Reply #3 on: May 24, 2007, 04:05:43 am »
I have tried the patch and don't see any text

the whole thing is gray, i have got some components to appear though they tend to appear and disappear randomly

tomorrow i'll probably have time to play with the source code so i can probably give more feedback.

[attachment deleted by admin]

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: problem with wxSmith and Mac-OSX
« Reply #4 on: May 24, 2007, 08:45:21 pm »
That's really weird  :?  I'll have to think about some other patch because the only reason for no extra text I find now is that there's some problem with DC.DrawText or text position. Maybe some big coloured rectangles will be better ;)

Regards
BYO

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: problem with wxSmith and Mac-OSX
« Reply #5 on: May 24, 2007, 09:31:07 pm »
That's really weird  :?  I'll have to think about some other patch because the only reason for no extra text I find now is that there's some problem with DC.DrawText or text position. Maybe some big coloured rectangles will be better ;)

Regards
BYO

I actually would try std::cout ;) there's no way it doesn't work

Unfortunately I won't be able to try it out soon, as i installed a static wxWidgets 2.8.4 for another app and now the C::B build is all messed up ( compilling wx and C::B on my computer takes hours...  :? )

I'll need to check if there is a way to tell C::B which wx version to use when there are many, i never remember
« Last Edit: May 24, 2007, 09:32:45 pm by Auria »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: problem with wxSmith and Mac-OSX
« Reply #6 on: May 29, 2007, 11:07:53 pm »
I actually would try std::cout ;) there's no way it doesn't work

Unfortunately I won't be able to try it out soon, as i installed a static wxWidgets 2.8.4 for another app and now the C::B build is all messed up ( compilling wx and C::B on my computer takes hours...  :? )

I'll need to check if there is a way to tell C::B which wx version to use when there are many, i never remember

std::cout won't help here because I want to see what can be shown inside editor area. I've seen on some screens that there are drag boxes and this prooves that something can actually be drawn over edited items. Now we only need to find out what function sucseeded to draw and what actually clears the screen right after.

I've created new patch - instead of drawing text, it draws reactangle filled with red/greed/blue. Can anybody test this patch and send me the result ? I've attached the result of this patch on windows.

BYO



[attachment deleted by admin]

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: problem with wxSmith and Mac-OSX
« Reply #7 on: May 30, 2007, 01:48:58 am »
Perhaps i did something wrong?

Code
patching file wxsdrawingwindow.cpp
Hunk #1 FAILED at 82.
Hunk #2 succeeded at 110 (offset -1 lines).
Hunk #3 FAILED at 158.
Hunk #4 succeeded at 250 (offset -1 lines).
patch: **** malformed patch at line 78: Index: wxsdrawingwindow.h

i applied it to the file as it is in svn, rev 4011

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: problem with wxSmith and Mac-OSX
« Reply #8 on: May 30, 2007, 10:27:11 am »
I probably messed up the patch. Try this one :)

BYO

[attachment deleted by admin]

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: problem with wxSmith and Mac-OSX
« Reply #9 on: June 01, 2007, 02:48:40 am »
I probably messed up the patch. Try this one :)

BYO

this one applies fine, thanks

i haven't been able to test it yet, i once again messed up my C::B build (errors are expensive when building the app takes over 2 hours :( )
« Last Edit: June 01, 2007, 02:52:01 am by Auria »

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: problem with wxSmith and Mac-OSX
« Reply #10 on: June 02, 2007, 04:43:03 pm »
I probably messed up the patch. Try this one :)

BYO

this one applies fine, thanks

i haven't been able to test it yet, i once again messed up my C::B build (errors are expensive when building the app takes over 2 hours :( )

*sigh*

it seems like the --with-wx-config= flag to configure doesn't work, I made clean/dist-clean/etc., then made it point to a wxWidgets 2.8.4 config, and at startup it complains "dyld: Library not loaded: /usr/local/lib/libwx_macu_aui-2.8.0.dylib" so unofrtunately it seems like the end of my efforts, i don't see why it still keeps references to 2.8.0 even after a clean build where i pointed it to 2.8.4

sorry byo unless someone can help with this i can't test the patch :/ I might be repeating myself, but I hate these build systems :P

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: problem with wxSmith and Mac-OSX
« Reply #11 on: June 02, 2007, 05:08:18 pm »
it seems like the --with-wx-config= flag to configure doesn't work, I made clean/dist-clean/etc., then made it point to a wxWidgets 2.8.4 config, and at startup it complains "dyld: Library not loaded: /usr/local/lib/libwx_macu_aui-2.8.0.dylib" so unofrtunately it seems like the end of my efforts, i don't see why it still keeps references to 2.8.0 even after a clean build where i pointed it to 2.8.4

sorry byo unless someone can help with this i can't test the patch :/ I might be repeating myself, but I hate these build systems :P

Have you tried to delete all c::b stuff where it's installed in system ? And probably it would be better to delete all sources and check out new copy since makefiles can really leave some rubbish (I hate those build systems too :( ).

Regards
   BYO

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: problem with wxSmith and Mac-OSX
« Reply #12 on: June 02, 2007, 05:57:02 pm »
it seems like the --with-wx-config= flag to configure doesn't work, I made clean/dist-clean/etc., then made it point to a wxWidgets 2.8.4 config, and at startup it complains "dyld: Library not loaded: /usr/local/lib/libwx_macu_aui-2.8.0.dylib" so unofrtunately it seems like the end of my efforts, i don't see why it still keeps references to 2.8.0 even after a clean build where i pointed it to 2.8.4

sorry byo unless someone can help with this i can't test the patch :/ I might be repeating myself, but I hate these build systems :P

Have you tried to delete all c::b stuff where it's installed in system ? And probably it would be better to delete all sources and check out new copy since makefiles can really leave some rubbish (I hate those build systems too :( ).

Regards
   BYO

haha it's really lame, you need to delete everything and checkout new sources everytime you update wxWidgets...  :?

I will try again later, thanks for the tip (and in for another few hours of building ;) )

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: problem with wxSmith and Mac-OSX
« Reply #13 on: June 02, 2007, 06:28:02 pm »
Quote from: Auria
(..) it's really lame, you need to delete everything and checkout new sources everytime you update wxWidgets (..)

After svn update codeblocks and make clean, have you tried ./configure --prefix=<CB install destination> --with-wx-prefix=<wxW location> for building different releases for C::B when have installed different wxWidgets libraries on your system? Can also use --with-wxdir=<wxW location> when have different uninstalled builds for wxWidgets.
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: problem with wxSmith and Mac-OSX
« Reply #14 on: June 02, 2007, 07:47:03 pm »
I will try again later, thanks for the tip (and in for another few hours of building ;) )

Ok, waiting for reports :)

I was also working with the problematic code last few hours (it tended to case seg faults on some slower machine running linux) and some parts of the code has been rewritten. So it actually MAY work on MAC after this change. But as usual, only the real machine may show the result :) And the change require only 2 or 3 files to be recompiled so it will take only minues ;). I'll only make few more tests and will commit new code into svn.

Anyway waiting for results of current patch, that may be really usefull for me. And I really hope that updated sources will work, at least partially :)

Regards
  BYO

EDIT: Applied updates to svn, crash-on-linux still exists, but now I got no idea where it comes from, but I still hope that it will fix MAC issues :)
« Last Edit: June 02, 2007, 08:39:52 pm by byo »