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 15 JAN 2024 12:11:34AM Barry Stevens wrote:

We have this legacy code (meaning dont blame us) in OI9 that works differently in OI10

in OI9 - Pic from the send_message is 1

in OI10 it is 1-1

therefore: Pic = Not(Pic-1) + 1 gives a nonnumeric error.

So, is the code in OI9 wrong and they got away with it or is there a bug in Oi10

If code in OI9 is technically wrong, what should it be?

values in debug in Oi9 & OI10 are

Pos=14

List<14> = 1:CMM - Test

Pos  = Get_Property(Users$, "SELPOS")

		List = Get_property(Users$, "LIST")





		Pic = Send_Message(Users$, "UPDATE", Pos, "")

		Pic = Not(Pic-1) + 1



		Send_Message(Users$, "UPDATE", Pos, Pic)

At 15 JAN 2024 12:48PM Carl Pates wrote:

Barry,

The v9 implementation has some inconsistencies that made backwards compatibility "interesting" to implement, and, TBH I thought this had been taken care of, but I'll take a look.

However, before I can, some questions:

Is this a v9 Heirarchical ListBox that's been migrated into v10? Or is it a "normal" one? How is the list set?

Can you supply an RDK that illustrates the problem so I can reproduce here?

Otherwise you might be better off using some conditional compilation if you're sharing the code between v9 and v10

Thanks

Carl Pates


At 15 JAN 2024 03:58PM Barry Stevens wrote:

Barry,

The v9 implementation has some inconsistencies that made backwards compatibility "interesting" to implement, and, TBH I thought this had been taken care of, but I'll take a look.

However, before I can, some questions:

Is this a v9 Heirarchical ListBox that's been migrated into v10? Or is it a "normal" one? How is the list set?

Can you supply an RDK that illustrates the problem so I can reproduce here?

Otherwise you might be better off using some conditional compilation if you're sharing the code between v9 and v10

Thanks

Carl Pates

Yes - it is normal and OI10 shows as LISTBOX

I changed code to this for OI9 & OI10 to work in both:

Pic = Send_Message(Users$, "UPDATE", Pos, "")[1,1]

PS:

I have another issue with an Heirarchical ListBox on a form.

OI10 shows as TreeListBox - should I recreat it in OI10.

Coding manipulation for it is very complex and I have no experience with listboxes, so I dont know what I am looking for.

The code does a 'select all', shows all boxes as ticked, but when saved and re-read they are unticked.

Ticking them individually appears to work.

Any hints - or what I should be looking for in incompatibilty.


At 16 JAN 2024 04:56AM Carl Pates wrote:

You would be better off recreating it - Listbox/Checkbox programming in v9 and earlier was done with image manipulation more than likely using the UPDATE message - I expect you need to look at the image being set if you are sticking with the v9 code.

In v10 checkboxes are supported "natively" so there is a series of actual properties for manipulating them:

CHECKBOXES - Boolean property - turns checkboxes on or off

CHECKED - gets or sets the items checked. The value can be:

1) An @fm delimited list of boolean flags denoting the checked status of each item,

2) A single boolean value withe the item number passed in the index parameter

3) "*" check all the boxes.

CHECKEDX - Same as CHECKED but only for TREELISTBOXES and returns data for the fully expanded list (list LISTX etc)

CHECKEDLIST - Returns an @fm'd array of item numbers that are checked.

CHECKEDLISTTEXT - Returns an @fm'd array of item text for the items that are checked.

Carl Pates


At 16 JAN 2024 03:33PM Barry Stevens wrote:

You would be better off recreating it - Listbox/Checkbox programming in v9 and earlier was done with image manipulation more than likely using the UPDATE message - I expect you need to look at the image being set if you are sticking with the v9 code.

In v10 checkboxes are supported "natively" so there is a series of actual properties for manipulating them:

CHECKBOXES - Boolean property - turns checkboxes on or off

CHECKED - gets or sets the items checked. The value can be:

1) An @fm delimited list of boolean flags denoting the checked status of each item,

2) A single boolean value withe the item number passed in the index parameter

3) "*" check all the boxes.

CHECKEDX - Same as CHECKED but only for TREELISTBOXES and returns data for the fully expanded list (list LISTX etc)

CHECKEDLIST - Returns an @fm'd array of item numbers that are checked.

CHECKEDLISTTEXT - Returns an @fm'd array of item text for the items that are checked.

Carl Pates

Thanks carl.

For those of you that are following this or found in a search - It is all documented here

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/94c4103ceca5014fa17a6f88dbfd1ea4.txt
  • Last modified: 2025/05/29 20:25
  • by 127.0.0.1