Object REXX,VisPRO/REXX and Threads 
Author Message
 Object REXX,VisPRO/REXX and Threads

Ciao.

If in the main window  when->open event i put this:
----------------------------------------------------------------------------
/* Forms event open*/
Arg window

call 'class.cmd'

obj = .demo~NEW

Tid1 = VpThread('START', 0, 't1.cmd', window, obj)
Tid2 = VpThread('START', 0, 't1.cmd', window, obj)
----------------------------------------------------------------------------

In the t1.cmd is this:
----------------------------------------------------------------------------
/* */
arg window, myobj

do i=1 to 100
  myobj~INSERT(VpThread('GETTID'), i)
  myobj~QUERY
end
----------------------------------------------------------------------------

In the Class.cmd:
----------------------------------------------------------------------------
/* */

::CLASS demo PUBLIC

  ::METHOD INIT
    expose caller value
    caller = ''
    value = 0

  :: METHOD INSERT
    expose caller value
    use arg whois, valr
    say 'INSERT'
    caller = whois
    value = valr

  ::METHOD QUERY
    expose caller value
    say 'Caller is: 'caller
    say 'Passed value: 'value
----------------------------------------------------------------------------

If i rut this i receive this:
----------------------------------------------------------------------------
     6 *-*   myobj~QUERY
REX0097E: Error 97 running t1.cmd line 6:  Object method not found
REX0476E: Error 97.1:  Object "A DEMO" does not understand message
"QUERY"
     6 *-*   myobj~QUERY
REX0097E: Error 97 running t1.cmd line 6:  Object method not found
REX0476E: Error 97.1:  Object "A DEMO" does not understand message
"QUERY"
----------------------------------------------------------------------------

WHY ? :-)
Is there problem to pass object to a thread ?

(reply also in email thanks)

Bye bye...
TIME Soft.

Remove #NOSPAM# from my e-mail before reply to my mail !
Rimuovete i caratteri  #NOSPAM# dalla mia email prima di rispondere !



Sat, 29 Jan 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. for help about vispro rexx and Object REXX

2. Object Rexx and VisPro Rexx operability

3. Vispro Rexx can't kill a rxftp thread

4. Vispro Rexx vs VX - Rexx

5. VisPro/Rexx vs VX-REXX

6. Starting Multiple Threads in VisPro REXX

7. VisPro Rexx or VX-Rexx ?

8. VX-REXX C/S 2.1b Much Slower Than VISPRO-REXX

9. VisPro/REXX : Threads work fine in project, but not in built run.exe

10. REXX Compiler for VisPro/REXX

11. Questions: Vispro REXX, REXX and OS/2

12. VisPro/REXX 3.01 GOLD and the extensive use of THREADS

 

 
Powered by phpBB® Forum Software