Set enabled of table view of scroll view to false?

Although it inherits from control, which has an enabled property, I can’t seem to set the enabled property of table view “x” of scoll view “y” with this:

set enabled of table view "some_table" of scroll view "some_scroll" of window "some_window" to false

I want to temporarily disallow selecting items in the table view, ideally getting that nice grayed-out look text fields get when they are not enabled, for example. Any ideas? Much obliged, as always.

Some problem here… anyone an idea yet?

Hi,

you can dynamically allow the selection of tab view items with the should select row event handler.
From the AppleScript Studio documentation


on should select row theObject row theRow
    set allowSelection to false
    --Check variable, perform test, or call handler to see if OK  to select
    -- If so, set allowSelection to true
    return allowSelection
end should select row

Hi,

I don’t want my users to be able to use a checkbox in my table at some point.

But I found a weird solution.
When I build my app for 10.4 it doesn’t work. But when I build it for 10.5 it does work.

Also when it’s compiled for 10.4 it doesn’t give an error for the code. It just simply doesn’t do it.
For 10.5 it does work…

I’m curious if this is just me or do other people have the same problem as well?