hungio / route-me

Automatically exported from code.google.com/p/route-me
0 stars 0 forks source link

RMMapView contents calls deprecated call #100

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
- (RMMapContents *)contents
{
    if (!_contentsIsSet) {
                self.contents = [[RMMapContents alloc] initForView:self];
                _contentsIsSet = YES;
        }
        return contents;
}

RMMapView.contents is not deprecated, but it calls
RMapContents.initForView:self, which is.

Original issue reported on code.google.com by tracy.harton on 3 Apr 2009 at 10:10

GoogleCodeExporter commented 8 years ago
So post 0.5, will the auto-init of contents go away?

If you just manually initialize contents everything is fine:

mapView = [[RMMapView alloc] initWith...];
mapView.contents = [[RMMapContents alloc] initWith...];
.
.
.

Original comment by tracy.harton on 17 Apr 2009 at 4:10

GoogleCodeExporter commented 8 years ago
Maybe the time has come to combine RMMapView and RMMapContents?

As I understand it, the original purpose of the break was to put Cocoa Touch 
dependent stuff in one class (view), 
and device independent stuff in the other class (contents), in preparation for 
supporting other devices (like the 
desktop, so sub NSView for UIView). But the two classes are now quite 
interdependent, and keeping them 
separate is making for some very ugly code, like this initialization quandary, 
and 
view.contents.markerManager.cokeBottle constructs.

Original comment by halmuel...@gmail.com on 17 Apr 2009 at 5:06

GoogleCodeExporter commented 8 years ago
"Maybe the time has come to combine RMMapView and RMMapContents?"

Definitely agree. There is no point in having these classes half-separate like 
this. 

Original comment by kennygrant on 17 Apr 2009 at 10:18