Re: [WIN] What's my issue?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Vince,
I've enhanced this function in v0.56. It now looks like this ....

--------------------------
global function getLVItemText( integer id, integer item, integer subitem)
    sequence text

    --NEW! v0.56-- Added parameter validation.
    text = ""
    if    item > 0 and item <= length(lvitem_data)
      and subitem >= 0 and subitem <= length(lvitem_data[item][2])
      and id = lvitem_owner[ item ]
    then
        -- NEW! v.056-- Subitem of 0 returns all strings.
        if subitem = 0 then
            for i = 1 to length(lvitem_data[item][2]) do
                text = append(peek_string(lvitem_data[item][2][i][1]),
                       text)
            end for
        else
            text = peek_string(lvitem_data[item][2][subitem][1])
        end if
    end if

    return text
end function

------
Derek Parnell
Melbourne, Australia
"To finish a job quickly, go slower."

----- Original Message -----
From: <Vincegg at AOL.COM>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, March 03, 2001 5:09 AM
Subject: Re: [WIN] What's my issue?


> Hello,
>
> Looking at the getLVItemText function I wonder why the id variable is
> required since it's not used within the function.  Perhaps that is what is
> wrong?  How does the function know which ListView's data it's supposed to
> look at?  It got me wondering.
>
> Vince

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu