← Back to team overview

kicad-developers team mailing list archive

Re: Data encapsulation in class_track

 

I found what happens, it's no real problem with the patch, but with the
dependency identification from swig .i files to class_track.h ,
dependencies are set manually now because cmake cannot determine that the
.i file depends on class_track.h and that pcbnew_wrap.cxx and
scripting/pcbnewPYTHON_wrap.cxx don't get rebuilt, so they stay trying to
access attributes that have became protected.

just remove pcbnew_wrap.cxx and scripting/pcbnewPYTHON_wrap.cxx and run
make again, they will be regenerated, and it must be fine.

I have this error now, but it seems unrelated to the swig party:

/Users/ajo/Documents/work/kicad/kicad/pcbnew/move_or_drag_track.cpp:631:13:
error: no matching function for call to 'Collect_TrackSegmentsToDrag'
            Collect_TrackSegmentsToDrag( GetBoard(), aTrack->GetStart(),
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ajo/Documents/work/kicad/kicad/pcbnew/./drag.h:179:6: note:
candidate function not viable: 2nd argument ('const wxPoint') would lose
const qualifier
void Collect_TrackSegmentsToDrag( BOARD* aPcb, wxPoint& aRefPos, int
aLayerMask,
     ^
1 error generated.
make[2]: *** [pcbnew/CMakeFiles/_pcbnew.dir/move_or_drag_track.cpp.o] Error
1
make[2]: *** Waiting for unfinished jobs....



2013/1/11 Miguel Angel Ajo Pelayo <miguelangel@xxxxxxx>

> As Dick said, for some reason swig tries to create Python
> accessors for those protected attributes by himself.
>
> Yesterday night only had time to start testing it & finding the reasons, I
> hope this night will finally get the diff updated.
>
>
>
>
>
> 2013/1/10 Miguel Angel Ajo Pelayo <miguelangel@xxxxxxx>
>
>> Hi Heikki, Dick & Wayne.
>>
>> I will be very happy to try it this night and fix the swig/scripting
>> things. I will resubmit an updated diff for head.
>>
>> In the case I forget for some reason, please send me a remainder email, I
>> have many things to do at home tonight,  but I think this is a very good
>> change to commit.
>>
>> Sincerely,
>> Mike
>>
>>
>> 2013/1/10 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
>>
>>> On 1/10/2013 10:30 AM, Dick Hollenbeck wrote:
>>> > Heikki Pulkkinen,
>>> >
>>> > Thanks very much.
>>> >
>>> > I would like to commit this one attached, which is rebased to current
>>> testing.
>>> > I had to hand add some rejects.
>>> >
>>> >
>>> > But it will not allow building with SCRIPTING enabled.
>>> >
>>> >
>>> > So more work is needed.
>>> >
>>> > Please get some SWIG help if you need it and resubmit the patch.
>>> >
>>> > Your help is appreciated.  Certainly Wayne and I share your goals of
>>> proper accessor usage.
>>>
>>> Absolutely.  The importance of good coding practices cannot be
>>> overstated.  Thank you Heikki.
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>>
>> --
>>
>> Miguel Angel Ajo Pelayo
>> http://www.nbee.es
>> +34 636 52 25 69
>> skype: ajoajoajo
>>
>
>
>
> --
>
> Miguel Angel Ajo Pelayo
> http://www.nbee.es
> +34 636 52 25 69
> skype: ajoajoajo
>



-- 

Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo

Follow ups

References