[Mysql-cocoa-users] Re: SMySQL
Brought to you by:
sergecohen
|
From: Serge C. <ser...@us...> - 2004-03-04 21:44:32
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi;=0D
=0D
I have couple of program using SMySQL, but all have been started with =0D=
PB, so none of those are native Xcode project... hence my errors in the =
=0D
mail you are speaking of...=0D
=0D
'Hopefully' you are not the first person to raise this question (the =0D=
previous was also off-list... that's why I'd better have this one on =0D=
list).=0D
=0D
Make a copy phase in the build, then drag the framework on the copy =0D
phase icon (on the file/target... pane on the left of the project =0D
window). Open info of the copy phase, select Frameworks in the top =0D
pulldown menu, set path to / and unselect the copy only on install. =0D
This should do the trick.=0D
=0D
I just got your email n3 now...=0D
I have some miss spelling in the web doc... I've corrected it now, but =0D=
still have to update the web page, here come the 'corrected' version of =
=0D
the example code:=0D
=0D
{=0D
MCPConnection *theConnec =3D [MCPConnection alloc];=0D
MCPResult *theRes;=0D
NSDictionary *theDict;=0D
NSArray *theColNames;=0D
int i, j;=0D
=0D
theConnec =3D [theConnec initToHost:@"albert.com" =
withLogin:@"toto" =0D
password:@"albert" usingPort:0];=0D
[theConnec selectDB:@"db1"];=0D
theRes =3D [theConnec queryString:@"select * from table1"];=0D
theColNames =3D [theRes fetchFiedlsName];=0D
i =3D 0;=0D
while (theDict =3D [theRes fetchRowAsDictionary]){=0D
NSLog(@"Row : %d\n", i);=0D
for (j=3D0; j<[theColNames count]; j++) {=0D
NSLog(@" Field : %@, contain : %@\n", [theColNames =0D
objectAtIndex:j], [theDict objectForKey:[theColNames =0D
objectAtIndex:j]]);=0D
}=0D
i++;=0D
}=0D
}=0D
=0D
=0D
Serge.=0D
=0D
PS: note it is not old documentation with API change, but miss type in =0D=
the doc (even worth...)!=0D
=0D
Le 4 mars 04, =E0 21:19, in...@gr... a =E9crit :=0D
=0D
> hi!=0D
>=0D
> Sorry, now I have found the developers mailinglist archive!=0D
>=0D
> I have reat this:=0D
>=0D
> http://sourceforge.net/mailarchive/forum.php? =0D
> thread_id=3D3929987&forum_id=3D2800=0D
>=0D
> And Your answer. But there is one point that does not work:=0D
>=0D
> In this build phase you should make the destination 'Frameworks', and=0D=
> drag/drop the framework icon (from the left pane in Xcode file list) =
to=0D
> the path text-field. This will make Xcode copy the framework in the=0D
> frameworks folder of your application bundle.=0D
>=0D
> THIS IS NOT POSSIBLE IN Xcode!=0D
> You can try it with the project which I have uploaded on my site.=0D
> In Xcode you can't drag&drop the framework from the list at the left =0D=
> site into the new COPY FILE PHASE.=0D
>=0D
> Is this a problem with my Xcode installation or what?=0D
>=0D
> Thank you!=0D
>=0D
> iChat: gr...@ma...=0D
> e-mail: ga...@gr...=0D
> website: http://www.gritsch-soft.com=0D
> <gritsch-soft.png>=0D
- ----------------------------------------------------=0D
Serge Cohen=0D
=0D
GPG Key ID: 9CBB58FB=0D
- ----------------------------------------------------=0D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAR5/S5EPeG5y7WPsRAuC/AJ0b8tU8WssM5EdMZQv8mH2RmcvMOACgv4QA
ymNBDcJGJb9KBHJmKfrIxaI=3D
=3DduKZ
-----END PGP SIGNATURE-----
|