Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RegisterUserFunc fails when one calls another
#1
Not Solved
I've boiled the issue down to a simple example:
Code:
Public Function Foo(objW)
    Foo = objW.hwnd
End Function

Public Function Bar(objX)
    Bar = objX.Foo()
End Function

RegisterUserFunc "Window", "Foo", "Foo"
RegisterUserFunc "Window", "Bar", "Bar"

msgbox Window("nativeclass:=Shell_TrayWnd").hwnd
msgbox Window("nativeclass:=Shell_TrayWnd").Foo()
msgbox Window("nativeclass:=Shell_TrayWnd").Bar()

UnRegisterUserFunc "Window", "Foo"
UnRegisterUserFunc "Window", "Bar"

The Foo method works the first time, but fails when it's called from inside another RegisterUserFunced method.

Is it my code that's broken, or is it RegisterUserFunc?

Thanks!
Archens
Reply
#2
Not Solved
Hay try to create a class for foo function and then create an object to that class
Reply
#3
Not Solved
Foo is a getter method for the Window class. It doesn't make any sense to try to make it a class unto itself.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,845 02-08-2019, 02:12 AM
Last Post: Ankur
  Drawbacks of using too many function calls? vishwas.shenoy 1 2,506 02-14-2013, 08:14 AM
Last Post: basanth27
  Testing web Application that makes AJAX calls pendri 2 3,916 05-24-2011, 02:36 PM
Last Post: surya_7mar

Forum Jump:


Users browsing this thread: 1 Guest(s)