Sign in to follow this  
Followers 0
aommaster

Calling functions with GUICTRLSetOnEvent

5 posts in this topic

Hey guys!

I'm trying to call a function which has an array as a parameter. Is there a way of calling it, and supplying the parameter by using GUICTRLSetOnEvent?

My program looks something like this:

Event1: filelistarray= call function f1

function f1: Get a file list, and add to array. then, return a value array1

Event2: call function f2 and supply filelistarray

Is there a way of doing it?

Thanks guys!

Share this post


Link to post
Share on other sites



I think what you want is...

GUICtrlSetOnEvent ($control, "func1")

Func func1 ()
    $fillist = _FileListToArray ("file")
    func2 ($fillist)
EndFunc

Func ($list)
    For $I = 1 to UBound $list
        ConsoleWrite (@CRLF & $list[$I])
    Next
EndFunc

Share this post


Link to post
Share on other sites

Hi Bert!

Thank you very much for your reply. However, the function that needs to have the array is not executed right after the array has been made (nor automatically). So, the array will need to 'wait' in memory until all the other parameters are set (these will affect how the final function will behave through global variables, and what-not).

Any ideas?

Share this post


Link to post
Share on other sites

Oh... I was afraid you'd point to that thread :)

I thought there would be an easier way of doing it.

Thanks Bert!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0