datagrids in revLets on Win (Vista / 7)

Trevor DeVore lists at mangomultimedia.com
Thu Dec 17 21:26:15 EST 2009


On Dec 17, 2009, at 8:42 PM, Malte Pfaff-Brill wrote:

> was happiely coding away on a web project. Build the revlet, works  
> fine on the mac. On Win Vista and 7 it fails with the following  
> error (on setting the dgText of the datagrid to empty.:
>
> 682,119,17
> 465,119,1
> 587,117,1
> 253,113,1
> 241,113,1,_Initialize
> 353,0,0,button id 1005 of bkgnd id 1004 of stack  
> "revDataGridLibrary" of stack "webmon"
> 573,4512,18
> 253,4512,1
> 241,4512,1,dgData
> 353,0,0,button id 1005 of bkgnd id 1004 of stack  
> "revDataGridLibrary" of stack "webmon"
> 90,3205,36
> 449,3205,5
> 535,3205,1
> 241,3205,1,_table.SetText

Line 119 of the Data Grid button script is (edit script of btn "Data  
Grid" of stack "revDataGridLibrary":

put queryregistry("HKEY_CURRENT_USER\Control Panel\Colors 
\HilightText") into sSystemA["hilited text color"]

My guess is the revLet doesn't like to have the registry queried.

You can probably update the switch statement in the _Initialize  
handler with following. I'm just wrapping the queryRegistry calls with  
a check to see if the code is running in the browser:

  switch the platform
             case "Win32"
                 if the environment is not "browser" then
                     put queryregistry("HKEY_CURRENT_USER\Control Panel 
\Colors\HilightText") into sSystemA["hilited text color"]
                     if sSystemA["hilited text color"] is not empty then
                         replace space with comma in sSystemA["hilited  
text color"]
                     end if
                     put queryregistry("HKEY_CURRENT_USER\Control Panel 
\Desktop\WindowMetrics\ScollWidth") into theValue
                     if theValue is an integer then
                         put abs(theValue/15) into  
sSystemA["scrollbarWidth"]
                     end if
                 end if

                 break
         end switch


-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com



More information about the use-livecode mailing list