New task doesn't start
Posted
#1
(In Topic #613)
Regular

Here is what I have so far:
FMain.class
Code (gambas)
MyTask_FTS.class
Code (gambas)
Hmm, as I said already above the function Main() in class MyTask_FTS does not start. Does anyone know why?
Posted
Guru

then after
If $hTask = Null Then $hTask = New MyTask_FTS As "MyTask_FTS"
you can use $hTask.CommandName()
also you can use
Public Sub _new()
' Startup code here
End
any code within _new() is run when you create the object.
Posted
Guru

You might find this thread interesting, we maxed out all 8 cores of a CPU using Task.
Posted
Regular

BruceSteers said
then after
If $hTask = Null Then $hTask = New MyTask_FTS As "MyTask_FTS"
you can use $hTask.CommandName()
Cheers, it works and it speeds up the program in case of a complex DB operation. I have now an idea how tasks could work. BUT - what I don't understand yet - when I changed the name of the function from Main() to commandname() as proposed a runtime error occurred (Unable to find method Main in class MyTask_FTS.class). So I renamed it back to Main() and changed the $hTask.CommandName() into $hTask.Main().
The following sub TaskRun() is part of the FMain.class which might be the reason to name function Main() - ?
Posted
Guru

01McAc said
BruceSteers said
then after
If $hTask = Null Then $hTask = New MyTask_FTS As "MyTask_FTS"
you can use $hTask.CommandName()
Cheers, it works and it speeds up the program in case of a complex DB operation. I have now an idea how tasks could work. BUT - what I don't understand yet - when I changed the name of the function from Main() to commandname() as proposed a runtime error occurred (Unable to find method Main in class MyTask_FTS.class). So I renamed it back to Main() and changed the $hTask.CommandName() into $hTask.Main().
The following sub TaskRun() is part of the FMain.class which might be the reason to name function Main() - ?
aah , I have little experience using Tasks so it's possible i am mistaken as tasks actually work like startup classes?
Cogier has much more experience using tasks.
His InFile app might be a much better place to get help on this than me.
Ps. sometimes when using classes you have to hit the "Compile All" button in the ide to re-compile the classes to use.
glad you got it working
Posted
Regular

Posted
Regular

1 guest and 0 members have just viewed this.


