>> so instead of this:
>> ---
>>   oDA    := QWidget():new( QT_PTROF( oWnd ) )
>>   oWnd:setCentralWidget( QT_PTROF( oDA ) )
>> 
>>   oSBar  := QStatusBar():new( QT_PTROF( oWnd ) )
>>   oWnd:setStatusBar( QT_PTROF( oSBar ) )
>>   oSBar:showMessage( "Harbour-QT Statusbar Ready!" )
>> ---
>> 
>> one could write this:
>> ---
>>   oDA    := QWidget():new( oWnd )
>>   oWnd:setCentralWidget( oDA )
>> 
>>   oSBar  := QStatusBar():new( oWnd )
>>   oWnd:setStatusBar( oSBar )
>>   oSBar:showMessage( "Harbour-QT Statusbar Ready!" )
>> ---
>> 
> 
> This is the natural way if I could have achieved it this way.
> Actually I started it like this, also Marcos extended this idea, 
> but because of the classes generated auto, this was not possible.
> 
> Let me explain it why:
> 
> We create a new object and it is a Harbour object.
> Qt's wrappers accept only pointers.
> Qt's wrapper functions are combination of pointer as well as other types of
> parameters.
> At the level of auto generation of code, it is not analyzed which is a
> pointer, and which 
>   is a non pointer.
> If it is analyzed at the time of generation, then class methods have to be
> adjusted 
>  to entertain this phenomena. Class method will have to analyse every
> parameters
>  if it is a pointer or otherwise.
> 
> Actually I could not find a way to achieve it, though I tried a lot.
> Anyhow, at present I have an idea how to achieve it, I will give it another
> thought.

Maybe I'm missing something, but each method which 
accepts :pPtr parameter could use a hb_par_*() function 
variation which would check for object type, maybe 
class name, and simply extract :pPtr from object in 
C code.

Brgds,
Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to