Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 01 FEB 2020 01:23:27PM Dave Sigafoos wrote:

in the old application i am refurbishing .. we used Col = SendMessage(HandleId, DTM_GETNOTIFYCOL$, 0, 0) to determine the column that was clicked on a table. Same for Row .. example


If Col = Null$ Then Col = SendMessage(HandleId, DTM_GETNOTIFYCOL$, 0, 0) + 1

If Row = Null$ Then Row = SendMessage(HandleId, DTM_GETNOTIFYROW$, 0, 0) + 1

in this example IF you clicked on the Label row Row would return -1 which then get set to 0

it appears that now row and col start at 0.

Has this changed? we use this in a lot of places ..


At 01 FEB 2020 02:24PM Carl Pates wrote:

Hi Dave,

The EditTable was rewritten from scratch for v10, so there no guarantee that using undocumented low-level message will still work - it's a lot of extra work to add them all when the idea is to try and move away from using the raw Windows API. We've supported those that we know about that people use, and the current list is:

[list]

DTM_EDITCURRCELL

DTM_GETCELLLEFTBOTTOM

DTM_GETCOLCOUNT

DTM_GETCURCOL

DTM_GETCURROW

DTM_GETDTMETRICS

DTM_READCELL

DTM_UPDATECELL

DTM_RESETDATA

DTM_GETROWCOUNT

DTM_SELROW

DTM_SELALLROWS

DTM_SETACCESSPOS

[/list]

Anyway, back to your problem - what you're doing there is emulating the NOTIFYPOS property - is there any reason why you're using the DTM messages rather than this property?

Adding support for DTM_GETNOTIFYCOL and DTM_GETNOTIFYROW is fairly trivial, but at this late stage probably won't make the imminent 10.0.8 release - your best bet would be to use NOTIFYPOS, or move to one of the new "Cell" events that pass you the affected cell coordinates in the event arguments as described here:

 https://revdevx.com/2018/04/24/edittables-the-new-cell-events/

Regards

Carl Pates


At 01 FEB 2020 10:31PM Dave Sigafoos wrote:

Thanks Carl. This is 20 year old code and i really don't remember 'why' we did it that way .. but there you go. I will look at the info and page you mentioned. Thanks again


At 13 FEB 2020 10:48PM Dave Sigafoos wrote:

so the purpose of the code is to SORT the table by the column that was dclicked. The Notifypos property does well in telling me that the dclick was done on the 'label' row (0) but then the rest of the code does not sort the table any longer.

With the new table how would one SORT the data by column 1. How would you notify that the shift key was used to sort the table in reverse order.

This is what I am trying to recreate in OI10


At 13 FEB 2020 10:53PM Dave Sigafoos wrote:

i found a doc on sort edittable in building oi 10 … should take care of my questions


At 14 FEB 2020 08:32PM Carl Pates wrote:

Dave

" but then the rest of the code does not sort the table any longer."

Can you post/email this code? I don't want to break sorting in existing code so I'd like to know what is no longer working.

Thanks

Carl Pates

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/73301cc9a9f1ad40b5fce800117843fd.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1