Mac OS X Experience

Поиск
Список
Период
Сортировка
Искать

Mac OS X Experience

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
So I've resolved all the issues that I encountered in my previous 
e-mails, and pgAdmin3 now compiles and links on Mac OS X.  I had to 
change two calls to Show() to Show(true) and added the changes detailed 
in my pgSequence.cpp patch.  Also, I changed some compile flags based 
on Apple recommendations for porting programs to Mac OS X.  The changes 
are in the latest autoconf code that Dave has (is going to?) put into 
CVS.  Now, however, when I run the program, the following happens:

1) A while box the same size as the splash screen on linux and Windows 
appears, but is empty.  This is obviously the splash page, but it's 
empty.

2) The tip of the day box appears, filled in with a tip.

That's all the happens.  I *can not* click any of the buttons of the 
checkbox in the tip of the day dialog.  There is no icon in the dock 
bar.  There is no application menu.  I cannot select the window or exit 
the program without using 'kill' from the command-line.

Any ideas?  Perhaps my changes did this, but I would doubt it.

ahp

Re: Mac OS X Experience

От:
Andreas Pflug <Andreas.Pflug@web.de>
Дата:
Adam H.Pendleton wrote:

> So I've resolved all the issues that I encountered in my previous 
> e-mails, and pgAdmin3 now compiles and links on Mac OS X.  I had to 
> change two calls to Show() to Show(true) and added the changes 
> detailed in my pgSequence.cpp patch.

Will be included in my next cvs commit.

> Also, I changed some compile flags based on Apple recommendations for 
> porting programs to Mac OS X.  The changes are in the latest autoconf 
> code that Dave has (is going to?) put into CVS.  Now, however, when I 
> run the program, the following happens: 

>
> 1) A while box the same size as the splash screen on linux and Windows 
> appears, but is empty.  This is obviously the splash page, but it's 
> empty.
>
> 2) The tip of the day box appears, filled in with a tip.
>
> That's all the happens.  I *can not* click any of the buttons of the 
> checkbox in the tip of the day dialog.  There is no icon in the dock 
> bar.  There is no application menu.  I cannot select the window or 
> exit the program without using 'kill' from the command-line.
>
> Any ideas?  Perhaps my changes did this, but I would doubt it. 

Sounds like there's a problem with wxTipProvider.
You could try to comment out the accelerator code in frmMain.cpp in line 
183ff., TipOfTheDay in pgAdmin3.cpp line 136 and winSplash=0 in line 69. 
Then, all decorating windows are bypassed and the main window should 
come up with usable menus. If not, I'm clueless.


Regards,
Andreas

Re: Mac OS X Experience

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
Вложения:
I don't know why the splash screen doesn't display, but I do know what 
the primary problem is with the app on Mac.  It is necessary to link 
with the libwx_macd-2.4.rsrc file during compile.  I will try and 
investigate how best to get pgadmin3 to automatically do this.

ahp

Re: Mac OS X Experience

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
Вложения:
I created a small sample application and the splash screen displays 
fine.

ahp

Re: Mac OS X Experience

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
Вложения:
I lied in my last e-mail.  The splash screen only displays properly 
without the code:

if (winSplash) {
     winSplash->Close();
     delete winSplash;
}

 From what I can tell, the bitmap is not displayed during the wxSleep(2) 
call.  During this call the splash screen is white.  After the call the 
windows gets destroyed before the bitmap can display.  If the above 
code is commented out, the bitmap displays.  Without having looked at 
the wxWindows docs yet, I would assume that the winSplash->Refresh() 
should have taken care of displaying the bitmap, but this doesn't seem 
to work on the Mac.  I will keep investigating.

ahp

Re: Mac OS X Experience

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
Вложения:
Changing the frmSplash->Refresh() to frmSplash->Update() solves the 
splash screen problem.  It looks like Refresh() doesn't do what it says 
it does on Mac.  I will check and make sure that Update() works on the 
other platforms.

ahp

Re: Mac OS X Experience

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
Вложения:
Okay, running Rez against the app, and linking in Carbon.r and 
libwx_macd-2.4.r, so now:

1) The splash screen shows correctly.
2) The tooltip box displays, and now I can close it.
3) The app still appears as a, say... 10px high by 1px window in the 
upper-left corner.  I get a menu and an icon now, but I choose "Add 
Server..." I get this error:

*** malloc[22891]: Deallocation of a pointer not malloced: 0xbffff520; 
This could be a double free(), or free() called with the middle of an 
allocated block; Try setting environment variable MallocHelp to see 
tools to help debug
Segmentation fault

ahp

Re: Mac OS X Experience

От:
Adam H.Pendleton <fmonkey@fmonkey.net>
Дата:
Вложения:
Okay, it looks like frmSplash->Update() is the better call than 
Refresh().  I have tested this successfully on Mac and Linux.  Unless 
anyone has any objections, this change should be made.

ahp

Re: Mac OS X Experience

От:
"Dave Page" <dpage@vale-housing.co.uk>
Дата:


> -----Original Message-----
> From: Adam H.Pendleton [mailto:fmonkey@fmonkey.net] 
> Sent: 20 May 2003 03:12
> To: Andreas Pflug
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Mac OS X Experience
> 
> 
> Okay, running Rez against the app, and linking in Carbon.r and 
> libwx_macd-2.4.r, so now:
> 
> 1) The splash screen shows correctly.
> 2) The tooltip box displays, and now I can close it.
> 3) The app still appears as a, say... 10px high by 1px window in the 
> upper-left corner.  I get a menu and an icon now, but I choose "Add 
> Server..." I get this error:
> 
> *** malloc[22891]: Deallocation of a pointer not malloced: 
> 0xbffff520; 
> This could be a double free(), or free() called with the middle of an 
> allocated block; Try setting environment variable MallocHelp to see 
> tools to help debug
> Segmentation fault

Two thoughts; can you resize the window, and can you tell (from logs or
a backtrace) where the crash occurs?

Regards, Dave.

Re: Mac OS X Experience

От:
"Dave Page" <dpage@vale-housing.co.uk>
Дата:


> -----Original Message-----
> From: Adam H.Pendleton [mailto:fmonkey@fmonkey.net] 
> Sent: 20 May 2003 03:57
> To: Andreas Pflug
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Mac OS X Experience
> 
> 
> Okay, it looks like frmSplash->Update() is the better call than 
> Refresh().  I have tested this successfully on Mac and Linux.  Unless 
> anyone has any objections, this change should be made.

If you send a patch (does frmAbout need it as well?) I can test it on
Windows and apply as appropriate.

Thanks, Dave.
FAQ