Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualFDsagizi

Posted 08 April 2013 - 09:31 PM

yes you are absolutely right!
CreateUninitializedScriptObject work from c++ - and this good, but def counstructor we can use from script - it's not good!
I want to even when the flag is set, it shows an error - not defined a default constructor( only from script ).
 
ex:
 

 

// asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT, false
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // No default constructor for object of type 'SomeClass'.
}

//-----------------------------------------------------------------------------

//next 
// asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT, true ( current time )
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // work
}

//-----------------------------------------------------------------------------

// a want to, we set asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT true, and we have - 
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // No default constructor for object of type 'SomeClass'.
}
// add constructor
class SomeClass{
     SomeClass(){  /* def constructor */ }      
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // work
}

 


#2FDsagizi

Posted 08 April 2013 - 09:30 PM

yes you are absolutely right!
CreateUninitializedScriptObject work from c++ - and this good, but def counstructor we can use from script - it's not good!
I want to even when the flag is set, it shows an error - not defined a default constructor( only from script ).
 
ex:
 

 

// asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT, false
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // No default constructor for object of type 'SomeClass'.
}

//-----------------------------------------------------------------------------

//next 
// asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT, true ( current time )
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // work
}

//-----------------------------------------------------------------------------

// a want to, we set asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT true, and we have - 
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // No default constructor for object of type 'SomeClass'.
}
class SomeClass{
     SomeClass(){  /* def constructor */ }      
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // work
}

 


#1FDsagizi

Posted 08 April 2013 - 09:22 PM

yes you are absolutely right!
CreateUninitializedScriptObject work from c++ - and this good, but def counstructor we can use from script - it's not good!
I want to even when the flag is set, it shows an error - not defined a default constructor( only from script ).
 
ex:
 

 

// asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT, false
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // ERROR!
}

//next 
// asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT, true ( current time )
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // work
}


// a want to, we set asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT true, and we have - 
class SomeClass{
     SomeClass( int init_param ){}
}
void f(){
     SomeClass s; // ERROR!
}
 

 


PARTNERS