GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV (versões anteriores)
→
WD18: Wrong constructor call when initializing an object
WD18: Wrong constructor call when initializing an object
Iniciado por Nicolas Chari, jan., 12 2015 3:48 PM - Sem resposta
Conecte-se…
Nicolas Chari
#1
Publicado em janeiro, 12 2015 - 3:48 PM
Hey everybody,
I got an issue compiling this code:
Class = Shift
Procedure
ProduceAppointments
(
)
lAppointmentsArray is an
array of
dynamic
Appointment
FOR EACH lShiftRequirement OF _shiftRequirements
FOR i
=
1
TO lShiftRequirement.numberOfEmployees
lAppointment is an
Appointment
(
object
,
lShiftRequirement.skills
)
ArrayAdd
(
lAppointmentsArray
,
lAppointment
)
END
END
RESULT
lAppointmentsArray
At line
lAppointment is an
Appointment
(
object
,
lShiftRequirement.skills
)
program crashes and the error code says that I call the Shift constructor, needing 4 parameters and that I give none.
I don't really know why it calls the Shift constructor; "Object" is a Shift, but we don't need a constructor since it already exists, right?
Also, if you wondered, there is no call to the Shift constructor in the Appointment constructor:
Procedure Constructor
(
pShift is a Shift
,
pSkillsNeeded is an
array of
dynamic Skill
)
PRIVATE
:
_associatedShift
=
pShift
:
_skillsNeeded
=
pSkillsNeeded
Here is the Shift Constructor if you want it:
Procedure Constructeur
(
pLabel is a
string
,
pStartingTime is a DateTime
,
pEndingTime is a DateTime
,
pShiftRequirements is an
array of
dynamic ShiftRequirements
)
...
If someone has an idea how to solve this, it would help me a lot, I'm stuck
Thanks in advance.
Denunciar
0
0
→ Voltar para WINDEV (versões anteriores)
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto