Page 1 of 1

'queryregistry(regKey)' causes "Handler: can't find han

Posted: Fri Mar 14, 2008 2:48 am
by verlsnake
I have created the following button handler code:

Code: Select all

on mouseUp pMouseBtnNo
    put "HKEY_LOCAL_MACHINE\SOFTWARE\KaiSoft" into regKey 
    queryregistry(regKey)
    put queryregistry(regKey) into regValue
    answer regValue
end mouseUp
Running it, causes the following error message:
Type Handler: can't find handler
Object Button
Line queryregistry(regKey)
Hint queryregistry
I have used the smallest example 'queryregistry(regKey)' first because it is along the lines of the dictionary examples; since I have not yet totally foxed myself into RR, I thought 'queryregistry' is really not found/available; and have therefore done considerable research; without success ... By chance I have then added the line with the return value of 'queryregistry' actually put into a variable; and outcommented the "naked" 'queryregistry' invocation. And yes: Now it runs like a charm :-) !

In this case the question seems to be viable: Is this a feature or a bug ? If it is a feature, the error message should be more explanative. If it is a bug, I ask myself if it occurs for other functions/commands/handlers, too ?

P.S.: Where should supposed buggy behaviour be posted to in the RR community ?

Posted: Fri Mar 14, 2008 9:41 am
by Klaus
Tach verlsnake :-)

"queryregistry" is a function, so you have to "get" or "put" the returned value into something!
You used it like a handler and that's why the engine complained!

This should work as exspected:

Code: Select all

on mouseUp pMouseBtnNo 
    put "HKEY_LOCAL_MACHINE\SOFTWARE\KaiSoft" into regKey 
    put queryregistry(regKey) into regValue 
    answer regValue 
end mouseUp
Hope this helps.


Regards und liebe Grüße

Klaus


P.S.
Here is the place to report bugs, you need to sign in however...
http://quality.runrev.com/qacenter/query.cgi

Posted: Fri Mar 14, 2008 8:33 pm
by verlsnake
Ebenfalls Tach auch, Klaus(i) :-) !

In this case let me say in German:

Danke und bis zum nächsten Thread 8)

Kai