[Top][All Lists]

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

Re: LPT_Interface.app - implementing button action

From: Csanyi Pal
Subject: Re: LPT_Interface.app - implementing button action
Date: Sun, 12 Sep 2010 01:23:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Nicola Pero <address@hidden> writes:

>> Because the button is toggle type I must to write the code so so when 
>> the button has title="1" then the action code must to write logical
>> 1 to the Data Port bit, but when the button title="0" then it must to
>> write logical 0 to the bit.
> Your button has an action, and a target.  For example,
>  <button action="togglePort:" target="#NSOwner" />
> this means that when the button is clicked, the 'togglePort:' method
> of your #NSOwner object will be invoked.
> So, all you need to do is implement it:
> /* (inside the @implementation of the class from which you instantiate
> the #NSOwner) */

I implemented it as you can see in attachment of this mail.

Attachment: LPT_InterfaceAblaka.gsmarkup
Description: LPT_InterfaceAblaka.gsmarkup

My first question is: why doesn't show the text in case if title
isEqualToString: @"0" ?

else if ([title isEqualToString: @"0"])
     // "write logical 0 to the data port"
    [StatLine setStringValue: @"write logical 0 to the data port"];

My second question is: why doesn't show up the application icon with the
specified LPT_Interface_48.tiff image but with the GNUstep.tiff image?
I'm using Window Maker as window manager.

My third question is: the code in main.m file:
 outb((unsigned char)1, base);

must be run with root permissions. How can I achieve this goal in my

If one want to, may download the application from:

Any advices will be appreciated!

Regards, Paul Chany

reply via email to

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