[Cocoapsql-developer] please agree to changes in project settings
Status: Alpha
Brought to you by:
alkirkus
|
From: Olaf v. O. <ol...@ad...> - 2002-05-28 22:19:01
|
Hi Al,
I have to discuss the following (two) items before commiting. The third
item is just to inform you. I will report commited changes again to this
list.
Do you agree on the first two items?
- Working with the project on different systems
- Changed #include <postgresql/libpq-fe.h> to #import <libpq-fe.h>
- Auto set the 'Connect', 'Disconnect' and 'Export' menu items
enabled/disabled:
Working with the project on different systems
As I have postgresql installed in (subdirectiries of) /usr/local/pgsql/
The current targets settings for HEADER Search Path do not work for me.
So I have added the Search Pathe:
to HEADER: /usr/local/pgsql/include/
Hard coding an included library is another problem (for me): build-error:
MasterObjectFile.Combine /Developer/TVOproducts/Cocoa Psql.build/Cocoa
Psql.build/Objects-normal/ProjectBuilderMasterObjectFile.o
...skipped Cocoa Psql.app/Contents/MacOS/Cocoa Psql for lack of
/sw/lib/libpq.a...
Therefore I wonder if files to be included can be added without a path.
Any way I used to get away with adding some folders (/sw/lib/) and an
alias to have the libpq.a being included in the project. Now I had to
make a copy of the file and place it in the folder /sw/lib/
I am sure I have forgotten when I install the next update to
Postgrsql......
Any solution?
Changed #include <postgresql/libpq-fe.h> to #import <libpq-fe.h>
As #import is the default for Cocoa (and better as the libs get loaded
only once now), I changed #include to #import.
As I get an error on compiling PSQLController.m (header file
'postgresql/libpq-fe.h' not found) I changed <postgresql/libpq-fe.h> in
<libpq-fe.h>
So in the following files:
changed #include <postgresql/libpq-fe.h>
into #import <libpq-fe.h>
in the following files:
PSQLConnection.h
PSQLQuery.h
Auto set the 'Connect', 'Disconnect' and 'Export' menu items
enabled/disabled:
I added the actions to the first responder of MainMenu.nib
menuConnect:
menuDisconnect:
raiseConnectionSettingsWindow:
doExportMenuAction: (for consistancy reasons)
and reconnected the Connection-menu items to these actions in the first
responder.
To auto Enable menuItems, I have made PSQLController the delagate of the
mainWindow.
Added to PSQLController.m
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
SEL action = [menuItem action];
if (action==@selector(menuConnect:) && [connection connected]) {
return NO; }
else if (action==@selector(menuDisconnect:) && ![connection
connected]) {
return NO; }
else if (action==@selector(doExportMenuAction:) && ![tableView
numberOfRows] > 0) {
return NO; }
else {
return YES;
}
}
|