Re: [gtk-list] objc : first exercise
- From: Elliot Lee <sopwith cuc edu>
- To: "gtk-list redhat com" <gtk-list redhat com>
- Subject: Re: [gtk-list] objc : first exercise
- Date: Tue, 21 Apr 1998 10:18:26 -0400 (EDT)
On Tue, 21 Apr 1998 fract@sprintmail.com wrote:
> @implementation Hello
> -initApp:(int *)argcp
>:(char ***)argvp
> {
> [super initApp:argcp :argvp];
> window = [[Gtk_Window
> alloc]
> initWithWindowType:GTK_WINDOW_TOPLEVEL];
> [[window init] show]; // also tried [window show]
This is bad. You're basically initializing the same object twice. ;-)
Just plain [window show] is correct.
> return self;
> }
> @end
>
>
> int main(yada yada) {
> id hello = [[Hello alloc] initApp:&argc :&argv]
> [hello run]
Might want to do
[hello free]
Since you won't really need to access your application object from
anywhere, else, even
[[[[Hello alloc] initApp:&argc :&argv] run] free];
would work, although that's stepping dangerously close to lisp ;-)
> fract6:/home/devel/gtk/obgtk$ hi
> hi: can't resolve symbol '_XlcDefadStMapModifiers'
> hi: can't resolve symbol '_XcmsDICoPrrSpaces'
Hmm, I've never seen that problem before. If you can compile regular Gtk+
apps, and you can compile ObjC apps, there shouldn't be any problem.
'nm' around and let me know where exactly those symbols are being used...
-- Elliot http://www.redhat.com/
Chicken Little was right.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]