Aaron,

below is the text from the addItem method of the simpleDialogs object.  I
believe it shows the point Bruce was also trying to make regarding the data
item being clearly said to be an object?

-------

Navigation:
GW Micro App Toolkit
 >
Objects
 >
SimpleDialogs
 >
Methods
 >
AddItem
Previous page
Return to chapter overview
Next page
Adds a list box item.
Syntax
object.AddItem(ItemText, ItemData)
where object is a
SimpleDialogs
 object.
Parameters
Name
Data Type
Required/Optional
Description
ItemText
String
Required
The text of the item that will be displayed in the list box
ItemData
Variant
Required
The data associated with a list box item. This value will be returned when
the dialog
is closed. If an object is passed, and object will be returned, and will
need to
be treated as an object (i.e. with the Set command). Strings will return as
strings,
integers and integers, and so on.
 

-----Original Message-----
From: Aaron Smith [mailto:aa...@gwmicro.com] 
Sent: Friday, December 02, 2011 9:10 AM
To: gw-scripting@gwmicro.com
Subject: Re: SimpleDialogs Update

Howdy,

I was referring to the Data property of a ListBox control.

I believe that David was handling the delete on his own, but wanted the
control to then re-select the next item. That may be beyond what a "simple"
dialog is for, but I'll put it on my request list.

Aaron

On 12/2/2011 9:02 AM, BT wrote:
> Hi Aaron,
>
>      It states it can be an object in the data statement inside the Tool
Kit list of objects and properties explanation.
>
>      Also says use the set command for an object that is placed inside the
data of The list.
>
>      If that is wrong then you will have to change your methods for that
add feature. For this is stated in the add feature.
>
>      Another mention, Dave seems to want a delete item feature along with
a selected item feature to allow that long value to be stored or captured...
>
>          Sincerely
>          Bruce
>
> ----- Original Message -----
> From: "Aaron Smith"<aa...@gwmicro.com> To:<gw-scripting@gwmicro.com>
> Sent: Friday, December 02, 2011 8:40 AM
> Subject: Re: SimpleDialogs Update
>
>
> Chip,
>
> It's a variant, because the value can be either text or a number. But it
> can't be an object.
>
> Aaron
>
> On 11/30/2011 8:12 PM, Chip Orange wrote:
>> Hi Aaron,
>>
>> Please see the below; it's copied from the app developer's ref manual,
and
>> is why I thought "variant" meant it was ok to store additional data which
>> was an object in the listbox item?
>>
>> Do I need to change my examples file, or is this documentation actually
>> correct?
>>
>> Chip
>>
>> ----------
>>
>>
>> Navigation:
>> The Window-Eyes Object Model
>>    >
>> Objects
>>    >
>> Control
>>    >
>> Control Types
>>    >
>> ListBox
>>    >
>> Methods
>>    >
>> Add
>> Previous page
>> Return to chapter overview
>> Next page
>> Returns the index of an item added to a list box. Items are added to the
end
>> of an
>> existing item list.
>> Syntax
>> long_value = object.Add(Text, Data)
>> where object is a
>> ListBox
>>    object.
>> Parameters
>> Name
>> Data Type
>> Required/Optional
>> Description
>> Text
>> String
>> Required
>> String of the item to be added
>> Data
>> Variant
>> Optional
>> Data (or value) of the item to be added
>>
>>
>> -----Original Message-----
>> From: Chip Orange [mailto:lists3...@comcast.net]
>> Sent: Wednesday, November 30, 2011 8:09 PM
>> To: gw-scripting@gwmicro.com
>> Subject: RE: SimpleDialogs Update
>>
>> Thanks for the update Aaron, that was quick.
>>
>> Sorry David; looks like it was my bad about storing additional data with
>> each listbox item (I see  I say this in class#30, so I'll get the
examples
>> file updated).
>>
>> Chip
>>
>>
>> -----Original Message-----
>> From: Aaron Smith [mailto:aa...@gwmicro.com]
>> Sent: Wednesday, November 30, 2011 3:29 PM
>> To: gw-scripting@gwmicro.com
>> Subject: Re: SimpleDialogs Update
>>
>> Bruce,
>>
>> Correct. You can't store objects themselves in the listbox data property.
>> The documentation indicates that a listbox data property is a long value.
So
>> you'd have to store some sort of index instead, and then correlate that
to a
>> file object.
>>
>> Aaron
>>
>> On 11/30/2011 3:16 PM, BT wrote:
>>> Hi Aaron,
>>>
>>>        Yes, that I thought would be a simple fix since the standard
>>> dialog
>> has the FocusedItem property and a simple move over to the simple one
with
>> just using a different name for it, for easy reading could be done.
>>>        Now about the set issue error. You did a simple text assignment,
>>> but
>> in the notes for a simple dialog when an object is being used in an
>> assignment, it states that it requires the assignment to be using the Set
>> Command.
>>>        So, when looking at Daves issue, he is using a file object, so I
>> suggested that he look at that and the error of not set would in fact
come
>> up.
>>>        So, try duplicating the error using file objects as Dave did. I
>>> have
>> not since I had meetings today and just got home. but I think that is
what
>> is going on with Dave's issue.
>>>            Sincerely
>>>            Bruce
>>>
>>> ----- Original Message -----
>>> From: "Aaron Smith"<aa...@gwmicro.com>   To:<gw-scripting@gwmicro.com>
>>> Sent: Wednesday, November 30, 2011 1:28 PM
>>> Subject: SimpleDialogs Update
>>>
>>>
>>> Greetings,
>>>
>>> The latest version of the GW Toolki (8.4.4) has support for the
>>> DefaultSelect property in the SimpleDialogs object:
>>>
>>> Set s =
>>> SharedObjects("com.gwmicro.gwtoolkit.simpledialogs").listboxdialog
>>> s.additem "red", "red"
>>> s.additem "green", "green"
>>> s.additem "blue", "blue"
>>> s.sort = true
>>> s.defaultbutton = "&amp;Select"
>>> s.cancelbutton = "Close"
>>> s.DefaultSelect = 2
>>> print s.ChooseItem("Select a color")
>>>
>>> That would result in a dialog with the green list box item
>>> automatically selected.
>>>
>>> Aaron
>>>
>> --
>> Aaron Smith
>> Web Development * App Development * Product Support Specialist GW Micro,
>> Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
>> 260-489-3671 * gwmicro.com
>>
>> To insure that you receive proper support, please include all past
>> correspondence (where applicable), and any relevant information pertinent
to
>> your situation when submitting a problem report to the GW Micro Technical
>> Support Team.
>>

-- 
Aaron Smith
Web Development * App Development * Product Support Specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Reply via email to