I'm trying to use SCOOP for the first time, and am having trouble making sense of the compiler messages.
I have a class I wish to run concurrently:
class
RACE
feature {NONE} -- Initialization
starttime: STRING
course: STRING
going: STRING
distance: REAL
make (passed_startTime: STRING; passed_course: STRING; passed_going: STRING; passed_distance: REAL)
do
create startTime.make_from_string (passed_startTime)
create course.make_from_string (passed_course)
create going.make_from_string (passed_going)
create distance.make_from_reference (passed_distance)
end
---
Trying to create/call the class from another:
get_races
-- get races from db
do
das_dah_db_1_get_races.execute (agent (returned_row: SQLITE_RESULT_ROW): BOOLEAN
local
returned_startTime: STRING
returned_course: STRING
returned_going: STRING
returned_distance: REAL
race_details: separate RACE
do
returned_starttime := returned_row.string_value (1)
returned_course := returned_row.string_value (2)
returned_going := returned_row.string_value (3)
returned_distance := returned_row.real_value (4)
create race_details.make (returned_starttime, returned_course, returned_going, returned_distance)
start_race_process_thread (race_details)
end )
end -- get_races
start_race_process_thread (race_details: separate RACE)
-- create a new thread to process race details
do
race_details.process_race
end -- start_race_process_thread
---
The compiler tells me that returned_starttime, returned_course and returned_going in the "create race_details.make" should be separate types.
If I make them separate, the compiler complains that they are not separate in the RACE class - but I don't want them separate in that class, as they are only used once to start the next part of the process.
I notice it doesn't complain about the numerical type, just the STRING type.
What am I missing?
(sorry in advance if the formatting is all over the place)