1. Derek - Win32Lib V0.58.6

Derek,

Just tried V0.58.6 and I have a couple of questions/comments:

1. I noticed you changed the insertLVColumn routine (the last column is 
now an object - pColumn instead of atom - iSubItem).  Could you explain 
what the change is for?  I got my program to work but had to change the 
last parm to a 1.
2. In this version of win32lib onXXX support defaults to False.  I 
haven't really used anything between V57.9 and this version so is this a 
new change or something I missed in a prior version?  I have some old 
programs that I still use that used the onXXX convention.
3. tk_maths.e uses clib.e which has routines to handle 2 byte read/write 
(poke2, peek2u, peek2s).  I've been using words.e by Bernie Ryan for 
some time now and ran into namespace issues with clib.e.  In order for 
me to not have to change a whole bunch of places where I used words.e I 
changed the name of the routines in clib.e.  
4. I've got several custom routines to my copy of win32lib and I wonder 
if you would be interested in including them:
- setLVChecked
- getTVChecked
- setTVChecked
- deleteTVChildren
- getTVChildren
- DrawText - a similar routine to your drawText but returns the text 
height, text actually printed, left, top, right and bottom rectangle 
boundaries
I can send you these privately, if you wish.

Thanks again for the great work!

Jonas

new topic     » topic index » view message » categorize

2. Re: Derek - Win32Lib V0.58.6

----- Original Message -----
From: "Jonas Temple" <jtemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Subject: Derek - Win32Lib V0.58.6


>
> Derek,
>
> Just tried V0.58.6 and I have a couple of questions/comments:
>
> 1. I noticed you changed the insertLVColumn routine (the last column is
> now an object - pColumn instead of atom - iSubItem).  Could you explain
> what the change is for?  I got my program to work but .

The change to an object (from integer) allows us to now specify an image for
the column as well. See the docs for details.

When you say "had to change the last parm to a 1", did it used to be zero? I
think this is now consistent with a one-based counting system. The first
column is #1.

> 2. In this version of win32lib onXXX support defaults to False.  I
> haven't really used anything between V57.9 and this version so is this a
> new change or something I missed in a prior version?  I have some old
> programs that I still use that used the onXXX convention.

No, the default is still True. However, you might be mixing the two methods.
onXXX is set to False every time you call setHandler(). This is a
performance issue as it assumes that if you are using setHandler() you will
not also be using the onXXX interface.


> 3. tk_maths.e uses clib.e which has routines to handle 2 byte read/write
> (poke2, peek2u, peek2s).  I've been using words.e by Bernie Ryan for
> some time now and ran into namespace issues with clib.e.  In order for
> me to not have to change a whole bunch of places where I used words.e I
> changed the name of the routines in clib.e.

I know...I know.. I know. Its a right royal PIA. I'm seriously thinking of
dropping clib altogether. It doesn't offer me anything.

> 4. I've got several custom routines to my copy of win32lib and I wonder
> if you would be interested in including them:
> - setLVChecked
> - getTVChecked
> - setTVChecked
> - deleteTVChildren
> - getTVChildren
> - DrawText - a similar routine to your drawText but returns the text
> height, text actually printed, left, top, right and bottom rectangle
> boundaries
> I can send you these privately, if you wish.

Of course. All submissions are welcome. Some might even make it into the
library blink

----------------
cheers,
Derek Parnell

new topic     » goto parent     » topic index » view message » categorize

3. Re: Derek - Win32Lib V0.58.6

----- Original Message -----
From: "Jonas Temple" <jtemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Derek - Win32Lib V0.58.6


>
> Derek,
>
> So we're talking about the same thing, I downloaded V0.58.8.  Great
> work, by the way.

Thanks.

> I did check the docs for insertLVColumn but it still had iSubItem as the
> last parm.  Here's the routine from Win32Lib.ew:

Yes, that's correct.

> --/topic ListView Control
> --/proc insertLVColumn(id,index,mask,fmt,cx,text,iSubItem )
> --/desc Inserts a new column into a listview control.
> global procedure insertLVColumn( atom id, integer index,
>                 atom mask, atom fmt, atom cx, object text, object
> pColumn )
>
>     atom LV_COLUMN
>
>     LV_COLUMN = struct_LVCOLUMN( LVCF_SUBITEM, fmt, cx, text, pColumn )
>

Ooops! These three lines should be inserted here...

    if sequence(pColumn) then
        pColumn = pColumn[1]
    end if

>     VOID = sendMessage( id, LVM_INSERTCOLUMN, pColumn - 1, LV_COLUMN)
>
>     release_mem( LV_COLUMN )
>
> end procedure
>
> The question I have is you're subtracting 1 from pColumn, which is an
> object.  You're saying I can pass a sequence to this routine to have an
> image for the column header?  Won't this bomb the program?

Yes, you are right.

> I thought the routine should be:
>
> --/topic ListView Control
> --/proc insertLVColumn(id,index,mask,fmt,cx,text,iSubItem )
> --/desc Inserts a new column into a listview control.
> global procedure insertLVColumn( atom id, integer index,
>                 atom mask, atom fmt, atom cx, object text, object
> pColumn )
>
>     atom LV_COLUMN
>
>     LV_COLUMN = struct_LVCOLUMN( LVCF_SUBITEM, fmt, cx, text, pColumn )
>
>     VOID = sendMessage( id, LVM_INSERTCOLUMN, index - 1, LV_COLUMN)
>
>     release_mem( LV_COLUMN )
>
> end procedure
>
> Note the only change is "index - 1" instead of "pColumn - 1".
>
> Am I missing something?

Not really. The 'index' parameter is not used anymore. In reality I should
delete it but that might break some existing code.


What do people think? Can I remove this parameter?

--------
Derek.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu