discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Renaissance - Adding a target to a button


From: Nicola Pero
Subject: Re: Renaissance - Adding a target to a button
Date: Sun, 15 Aug 2010 15:35:11 +0100


On 14 Aug 2010, at 13:31, address@hidden wrote:

Hi,

I'm developing a GNUstep app: LPT_Interface.app which purpose is to
Control the LPT parallel port of a PC Box.

This is a Renaissance application.

In LPT_Interface.gsmarup I specify a button (type toggle) which should
set/reset a bit on Data Port of LPT port. I don't have an Idea which
target should add to this button? The line is:

<button type="toggle" title="1" alternateTitle="0" id="DPb0s"
nextKeyView="#DPb0?" action="lptDPb0:" target="???????" />

So when one click on this button, then the application should write 1 or
0 to the bit 0 of the LPT Data Port.

The simplest/most likely target you can use is

 <button ... target="#NSOwner" />

which would call the -lptDPb0: method of the owner of the gsmarkup file, which can be any
object in your application that you specify when you load the gsmarkup.

There are a number of other targets you can use, for example #NSApp, #NSApp.delegate, or #NSOwner.buttonDelegate. Please check the Renaissance documentation, for example

http://www.gnustep.it/Renaissance/Manual/node17.html#SECTION003331200000000000000

for more information on what you can use there. The Renaissance examples are also a good place to find information; there are a number of complete applications in there. :-)

Thanks



reply via email to

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