Re: How to Change a button state when textFields become not empty

"H. Nikolaus Schaller" via Discussion list for the GNUstep programming environment <[email protected]> Sat, 28 Feb 2026 07:34:13 +0100
Newsgroups gmane.comp.lib.gnustep.general
Message-ID <[email protected]>
Hi,

> Am 27.02.2026 um 22:07 schrieb Josh Freeman <[email protected]>:
> 
> - (void)textDidChange:(NSNotification *)notification
> {
> ...
>  if([nameLink length] && [urlLink hasPrefix: @"http"])
>  {
>    NSLog(@"Button save enabled");
>    [savebutton setEnabled:YES];
>  }
>  else
>  {
>    [savebutton setEnabled:NO];
>  }
> }

I think you can even reduce this to a single line

	[savebutton setEnabled:([nameLink length] && [urlLink hasPrefix: @"http"])]

BR,
Nikolaus