ListBox in VA 4.02 question 
Author Message
 ListBox in VA 4.02 question

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

    Is it possible to use a method name instead of a variable name for
the 'attributeName' setting?
The method name returns a string.

    Also, as my ISP looses 40% or so of news, please respond via e-mail
as well as posting to the
news group.

    Thanks.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.5.5 for non-commercial use < http://www.*-*-*.com/ >

iQA/AwUBNWrKOz+iVd8M15gSEQKbGQCg82GOtmvEDUN/XuMo2TlJdb+gkj8AnREg
lq2ojj2qnMF5gspBpwxfqheB
=Bf1g
-----END PGP SIGNATURE-----



Wed, 18 Jun 1902 08:00:00 GMT  
 ListBox in VA 4.02 question

Quote:

>     Is it possible to use a method name instead of a variable name for
> the 'attributeName' setting?
> The method name returns a string.

>     Also, as my ISP looses 40% or so of news, please respond via e-mail
> as well as posting to the
> news group.

>     Thanks.

Timothy:
You should always use a method name.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mike Silverstein, Lead Architect        voice: (919) 363-3946
SilverMark, Inc.                          fax: (919) 362-0772

Raleigh, NC                         http://www.silvermark.com



Wed, 18 Jun 1902 08:00:00 GMT  
 ListBox in VA 4.02 question

Timothy -

The 'attributeName' setting for a listbox part in VA calls for just that -
the name of the attribute from the objects' public interface that you want
to show in your list.

This attribute name *may* coincide with an existing method name (it's
implementation), or even an ivar, (more implementation) but that's
irrelevant.  To restate:  The only valid values that can be given for the
"attributeName" setting are governed by the object's public interface.

Regards,
Bob Manjoney
McHugh Software International

Timothy Reaves wrote

Quote:

>    Is it possible to use a method name instead of a variable name for
>the 'attributeName' setting?
>The method name returns a string.

>    Also, as my ISP looses 40% or so of news, please respond via e-mail
>as well as posting to the
>news group.

>    Thanks.



Wed, 18 Jun 1902 08:00:00 GMT  
 ListBox in VA 4.02 question

Quote:

> Is it possible to use a method name instead of a variable name for
> the 'attributeName' setting?
> The method name returns a string.

You have several choices.  First of all you can override the printOn:
aStream method for your object
to permanently change the way your object is displayed.

Second, you can create an attribute that points to your getMethod.  This
getMethod can return anything you want, it does not have to be an
instance variable's contents.  The advantage of this is that you can
also give your attribute an event name and as long as you signal the
event from within your object whenever the attribute value changes (
which could be in set methods not associated with your attribute ) then
the view will refresh itself.  For example, your could have attributes
of firstName and lastName that are run of the mill get and set with
ivars.  Then you could have an attribute called listName that had a get
method that did.

        listName

                ^self lastName, ' ', self firstName

If you make the attribute listName have an event listName you can
override set firstName and lastName to signal this event, e.g.

        firstName: aString

                firstName := aString.
                self signalEvent: #firstName with: aString.
                self signalEvent: #listName.

A third way to do this is to create a converter that stores the method
selector.  If you read the chapter in the guide to building parts for
fun and profit you should be able to figure this out.

The final way is to reach into the actual widget inside the AbtListView
part and add a callback to the valueRequested event.  Then you can put
whatever you like in the list box.

Best regards,

Joe Winchester



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Animated Gifs in VA 4.02

2. Help: VA 4.02 - building ICs that work

3. VA 4.02 Multiple-Document Interface

4. vmtrap.img & vmtrap.log in VA 4.02

5. Centering Window on Desktop (VA 4.02)

6. VA 4.02 - Installing Error

7. VA 4.02, handling events from an OleAutomationObject

8. VOSS 3.0 now available for VA 4.02

9. VA 4.02 Windows within windows functionality

10. VW 3.0 versus VA 4.02

11. Integrated html browser/ editor for VA 4.02 ?

12. VA 4.02 Packaging problem - attempt to modify running image

 

 
Powered by phpBB® Forum Software