UIFont.LineHeight removed in MonoTouch 4.0. Alternatives? - xamarin.ios

The property for UIFont.LineHeight was removed in MonoTouch 4.0. What was the motivation behind this and are there any alternatives or do I have to write my own binding to get that value?

This was an oversight, my apologies for that. It will be reintroduced in 4.0.1. In the meantime you can do:
Messaging.float_objc_msgSend (font.Handle, Selector.GetHandle ("lineHeight"));

Related

Hybris platform upgrade to version 2005 (NotificationService, NotificationEvent)

In Hybris version 2005, com.hybris.backoffice.widgets.notificationarea.NotificationService seems to be deprecated
https://help.sap.com/doc/a6c03b79dbfa4fc485848de0711cc149/2005/en-US/backofficeframework/com/hybris/backoffice/widgets/notificationarea/DefaultNotificationService.html
They are suggesting using com.hybris.cockpitng.util.notifications.NotificationService instead
https://help.sap.com/doc/a6c03b79dbfa4fc485848de0711cc149/2005/en-US/backofficeframework/com/hybris/cockpitng/util/notifications/NotificationService.html
But from what I can see from the OOTB code com.hybris.cockpitng.util.notifications.NotificationService is just extending from the old one com.hybris.backoffice.widgets.notificationarea.NotificationService which is deprecated and there are no new methods introduced,
so even when using this new NotificationService, when I call notificationService#notifyUser i still get a warning saying that the method notifyUser is deprecated.
Is this normal, or am I missing something?
If it is what SAP is recommending, it should be fine. SAP will probably update it in the future. There is no problem using deprecated methods, as long as they are still available. However, you might want to update in the future, in case there are major improvements in the new replacements, versus the old one.

DTCoreText with Monotouch

Is it possible to use DTCoreText in MonoTouch or is there a native library that does what DTCoreText does? Thanks.
This looks promising: https://github.com/Cocoanetics/DTCoreText (but I haven't used it myself).
Then you just have to create a MonoTouch binding to be able to use it from MonoTouch.

Simple mvvmcross monotouch with xib support (and monomac)

I tried the simpledroid with INotifyPropertyChanged and ICommand successfully.
I want to do the same with monotouch and xib designer,but without TouchDialog. Is there a way to implement without inheriting from mvx class as in monodroid?
Is it possible to do the same with MonoMac without Dialog as Portable Library in MonoMac or XaMac in supported now?
I understand what is your goal.
I think you want to start learning MvvmCross for Monotouch with a basic application example as you probably did with SimpleDroid. I tried to do the same without success.
Why ? Because SimpleDialogTouch is an "Advanced" example in my opinion. When you learn Monotouch, you use xib to design your view. But the sample tells you to learn a new tool "Monotouch Dialog" which is a way to display controls programmatically.
You get those errors because the sample implements the ViewModel only for Dialog and not for xib or classic binding.
Finally, you will have to dig into MvvmCross to build your own SimpleTouch implementation. The problem is that you don't have a lot of documentation, but Stuart is the best supporter for a beginner or you can switch to advanced Mvx features if you don't need to understand the underground of MvvmCross. There are a lot of samples, tutorials and posts to tweak Mvx.
Hope that helps.
Is there a way to implement without inheriting from mvx class as in monodroid?
I don't believe this is supported in the current source.
There is an effort underway to separate out the databinding code in MvvmCross so it can be used more easily with other frameworks - e.g. we might try porting MvvmLight across too. This is where my effort is currently focused.
If you need this now, then I think you could fairly easily create this simple binding yourself if you wanted to - but you'd have to take a look at what the SimpleDialog version does - it's not too big a code to copy across to the XIB version - https://github.com/slodge/MvvmCross/blob/vnext/Cirrious/Cirrious.MvvmCross.Dialog.Touch/Simple/MvxSimpleTouchDialogViewController.cs
But... why not just implement a proper portable MvxViewModel instead?
Is it possible to do the same with MonoMac without Dialog as Portable Library in MonoMac or XaMac in supported now?
Portable libraries are not supported in any release from Xamarin yet - there is an unofficial installer that Jeff very kindly provided - but it's not a release...
For MvvmCross MonoMac/XaMac support, there is one non-PCL version from #deapsquatter around, but I don't believe this has data-binding yet.
I will be working on a PCL and data-binding release for MonoMac or XaMac - but it's on a spare time basis - no-one's come forward with a customer project to fund that work yet. If you or anyone wants to assist with this port, then you are very welcome... but it will be quite technical work - there are changes I intend to make 'under the covers' - so the easiest place for others to help will probably be in later work - adding more views, more bindings, doing QA, making samples, etc.
Note: "Simple" bindings are not the future for MvvmCross and may get dropped from a future release. However, this will only happen after I've separated out the Binding code so that it can be used with other libraries - the first of which will probably be a simple binding example.
I personally don't see much difference or advantage in using these so-called Simple bindings... but maybe I'm missing something...

Automapper: How to ignore a member in VB.NET

I'm using Automapper in a VB.NET project, and am trying to make it ignore a member. I can see how to do this in C#, but not in VB.NET. Does anyone have a quick example of using the ForMember method.
Thanks,
Paul
Here's how you do it :)
Mapper.CreateMap(Of incomingModel, outgoingModel)().ForMember(Function(x) x.FieldToIgnore, Sub(y) y.Ignore())
The thing that is important, and likely what messed up you is the Sub instead of the function for the second part.
this also only works in vs2010. older versions you can't do it.
There is now (AutoMapper 2.0) an IgnoreMap attribute.

use subsonic 2.x and 3.x in the same project

Is it possible to mix them? I'm asking because I have a big project that uses Subsonic 2.x generated classes (in a compiled dll) but would like to start using 3.x for new stuff.
I tried it last night with a project where I had references to both subsonic.dll and subsonic.core.dll but that didn't work with ambiguous references, etc. So removed 2.x and then got an issue with my older compiled subsonic generated classes in that they needed Subsonic 2.1 to run.
Hmm... I think there's a small chance that you might be able to do this, but you'd need to use the full qualifying class names (namespace.class) for a lot of code because there might be naming conflicts. It wouldn't be easy to do and definitely not recommended. (It might not can even be done.)
You can't move from 2.x to 3.x without doing a lot of recoding. I have a bunch of big projects in 2.2 and after trying to update to 3.0, I ran into some issues so I've decided to keep them in 2.2. I'd love to upgrade to 3.0 and use the new stuff, too, but I don't have the time (right now) to recode the stuff that changed between 2.x and 3.0.
I do recommend updating to 2.2. There shouldn't be any backwards compatibility issues between 2.1 and 2.2. I was able to update to 2.2 by just changing out my reference.
Just curious, are you using ActiveRecord or Repo implementation?
You only have 2 options:
stay in 2.1/2.2
update your code to 3.0
Thought I'd follow up here and let people know that I was able to get this to work. What i chose to do was to edit the Subsonic 2 source code and put it into a Subsonic2 namespace (everything), recompile to subsonic2.dll, etc. Had to modify the web.config slightly, then went and modified my old code to reference subsonic2, etc.
Am now able to mix both Subsonic 2 and 3 in the same project.
Gerry
Jim--I'm using ActiveRecord. The 2.x is in one namespace and 3.x would be in another. However, I guess the question is whether the 2.x can be compiled to run with the 3.x runtime.
Thanks,
Gerry

Resources