Hi Miljenko

The problem you are hitting is that the .xib specifies that the type of
that outlet is a UIImageView. In Xcode's UI Designer, you can select that
UIImageView and then specify a custom class name to use in the property
editor.

Hope that helps,

Jeff

On Wed, Oct 17, 2012 at 3:11 AM, Miljenko Cvjetko <[email protected]
> wrote:

>  Hi
>
> Our team is porting a WinCE app to MT. This app is quite complex (native,
> SqlServerCE,
> image/jpeg manipulation etc), so our clients are trying to retain as much
> code as they can.
>
> So in first run/spurt we created all WinForms CE Forms as xibs and did
> some proof-of-concept
> bindings to business logic.
>
> In the xib for Image manipulation (MainForm) we have created UIImageView
> and filled it with
> some test jpegs through UIImage.
>
>         [Outlet]
>         UIImageView CustomViewControl { get; set; }
>
> So in order to reuse his code our client has changed .designer.cs file
> into:
>         [Outlet]
>         CustomViewControlType  CustomViewControl { get; set; }
>
> and changed that CustomViewControlType  inherits form UIImageView.
>
> OK. Let us not discuss why .designer.cs is changed though there is comment
> at the beginning.
> It is done and let us work from here.
>
> BTW @Xamarin MT team - good job with Xcode and MT integration. Adding new
> Outlets to
> Xib did not alter change above - new Outlets were added w/o overwritting
> existing code!
>
> This step broke Xcode loading of xibs, so [Register] attribute was added
> to CustomViewControlType
> and everything went fine -  until our client has noticed that
> CustomViewControl is created,
> but the type is UIImageView, not CustomViewControlType !
>
> So questions:
>
>    1. what would be preferred pattern/solution here?!
>    our brainstorming discussion results in order from easier to more
>    difficult:
>     1. make ctors visible -with Register attribute - NOGO
>       [Register] is for class level canot be applied on ctors and methods!
>       2. extension method on SomeMethod(this UIImageView, params);
>       3. replacing inheritance with aggregation+ exposing all methods
>       like implementing multiple inheritance.
>       4. some trick of the trade by Xamarin guys?!?
>
>
> thanks
> regards
>
> mel
>
> --
> Miljenko Cvjetko dipl.ing. ET
>       Direktor/CEO
>       Projektant rješenja/Solution Architect  
>       Razvojni programer/Senior developer
>       Voditelj projekta/Project Manager
>
> IX južna obala 13
> Kajzerica Zagreb
> T: 385 1 7775555
> M: 385 91 557 447 3
> F: 385 1 7779556
> e: [email protected]
> w: http://holisticware.net
>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to