Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Multi Send_Message

Hola all,

Years ago, I read something about a technique to pass multiple Send_Message updates at once, similar to how we send a Set_Property call to set multiple properties. Has anyone done anything with this before?

I have a client who is trying to colorize an edit table, and is executing a Send_Message for nearly every cell in the table. It is Very slow. Looking for an alternative.

Thanks!

Michael

Comments

  • I can't say that I am aware of that technique. Have you tried setting the REDRAW property to 0 before the Send_Message calls to see if that reduces the performance lag?
  • I tried it.. I think it helped a bit, but it's still pretty slow for what we're trying to do.

    I remember being able to simulate Send_Message calls with Send_Property, thus allowing multiple Messages to be sent with one call. Will keep digging.

    Thanks!
  • You could "lazily" colour the rows. So catch the scroll event ,and fill in, say, 15 (or how ever many rows are visible) at a time.

    Example code for the SRP grid, but you could do the same thing for the OI grid

    lazy_load_images: // If the 2 are the same, then the user has stopped scrolling, so we load the images. old_start_row = get_Property(grd_orders$, "OLE.ScrollPos")<2> yield() new_start_row = get_Property(grd_orders$, "OLE.ScrollPos")<2> if old_start_row = new_start_row then nrows = get_Property(grd_orders$, "OLE.Dimension")<2> end_row = min(new_start_row + lazy_load_row_count$,nrows) for i = new_start_row to end_row skn = get_Property(grd_orders$, "OLE.CellText[":sku_col$:"; ":i:"]")[1,6] if get_Property(grd_orders$, "OLE.CellImage[":image_col$:"; ":i:"]") = "0" then Set_Property(grd_orders$, "OLE.CellImage[":image_col$:"; ":i:"]", Itv_Get_Product_Images(skn,"a4")<1>) end Next i end return
Sign In or Register to comment.