discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tutorials enhancement proposal : First Steps in GNUstep GUI Programming


From: Patrick Cardona
Subject: Tutorials enhancement proposal : First Steps in GNUstep GUI Programming (2) : NSWindow, NSButton
Date: Wed, 10 Jun 2020 11:42:23 +0200
User-agent: GNUMail (Version 1.3.0)

Ref : First Steps in GNUstep GUI Programming (2) : NSWindow,  NSButton
Edition : First Edition: July 2000; Last Updated: January 2008
URL : http://www.gnustep.it/nicola/Tutorials/WindowsAndButtons/index.html

Hi Nicola (Pero),
Hi All,

I wish first to thank You, Nicola, for the great tutorials You made.
They helped Me to understand and begin my learning pretty well.

Trying to play and understand the final code in the Tutorial 'First Steps in GNUstep GUI Programming (2) : NSWindow, NSButton', I was facing to some warnings and bugs. I think You should modify the final code listing at page 9, in the '@implementation' section like this :

(1) In the method 'dealloc' :

- (void) dealloc
{
  RELEASE (myWindow);
  /* According to a warning while making the app */
  [super dealloc];
}

(2) In the method 'createWindow' :

- (void) createWindow
{
...
myWindow = [NSWindow alloc];

  /* Don't make a assignment of 'myWindow' again...
  myWindow = */
  /* So I kept only the message... */
  [myWindow initWithContentRect: rect
                       styleMask: styleMask
                       backing: NSBackingStoreBuffered
                       defer: NO];

 /* Here, the contentView was obviously missing : I added it... */
[myWindow setContentView: myButton];
...
}

I Hope this could be helpful for other Beginners like Me. ;-)

Regards,


--
Bien cordialement,
Patrick CARDONA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]