Closing a xxforms:dialog which contains a xbl datatable generates an unknown error - orbeon

Using 4.0.0 Beta 3.
We have a dialog using xxforms:dialog which is opened using xxforms:show and closed using xxforms:hide (either from an action button or the X (close) button). There is a common thread that if the dialog contains a xbl datatable an unknown error is generated (See below).
Sometimes the dialog hides completely with no client side error, other times the dialog does not re-render the page because a client side error occurs ( Message: 'undefined' is not an object (evaluating 'tooltips[control.id].cfg.getProperty') )
Any thoughts?
+----------------------------------------------------------------------------------------------------------------------+
|An Error has Occurred |
|----------------------------------------------------------------------------------------------------------------------|
|[No error message provided.] |
|----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack |
|----------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: java.lang.IllegalStateException |
|----------------------------------------------------------------------------------------------------------------------|
|org.orbeon.oxf.xforms.BindingContext$$anonfun$ances|apply |BindingContext.scala | 71|
|org.orbeon.oxf.xforms.BindingContext$$anonfun$ances|apply |BindingContext.scala | 71|
|scala.Option |getOrElse |Option.scala | 108|
|org.orbeon.oxf.xforms.BindingContext |ancestorOrSelfInScope$1 |BindingContext.scala | 71|
|org.orbeon.oxf.xforms.BindingContext |pushVariable |BindingContext.scala | 74|
|org.orbeon.oxf.xforms.XFormsContextStack |scopeVariable |XFormsContextStack.java | 224|
|org.orbeon.oxf.xforms.action.actions.XFormsActionAc|apply |XFormsActionAction.scala | 48|
|org.orbeon.oxf.xforms.action.actions.XFormsActionAc|apply |XFormsActionAction.scala | 41|
|scala.collection.Iterator$class |foreach |Iterator.scala | 772|
|scala.collection.JavaConversions$JIteratorWrapper |foreach |JavaConversions.scala | 573|
|scala.collection.IterableLike$class |foreach |IterableLike.scala | 73|
|scala.collection.JavaConversions$JListWrapper |foreach |JavaConversions.scala | 615|
|org.orbeon.oxf.xforms.action.actions.XFormsActionAc|execute |XFormsActionAction.scala | 41|
|org.orbeon.oxf.xforms.action.XFormsActionInterprete|runSingleIteration |XFormsActionInterpreter.java | 204|
|org.orbeon.oxf.xforms.action.XFormsActionInterprete|runAction |XFormsActionInterpreter.java | 150|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: org.orbeon.oxf.common.ValidationException |
|----------------------------------------------------------------------------------------------------------------------|
|org.orbeon.oxf.common.ValidationException |wrapException |ValidationException.java | 126|
|org.orbeon.oxf.xforms.action.XFormsActionInterprete|runAction |XFormsActionInterpreter.java | 157|
|org.orbeon.oxf.xforms.event.EventHandlerImpl$$anonf|apply$mcV$sp |EventHandlerImpl.scala | 249|
|org.orbeon.oxf.xforms.event.EventHandlerImpl$$anonf|apply |EventHandlerImpl.scala | 249|
|org.orbeon.oxf.xforms.event.EventHandlerImpl$$anonf|apply |EventHandlerImpl.scala | 249|
|org.orbeon.oxf.util.DynamicVariable |withValue |DynamicVariable.scala | 40|
|org.orbeon.oxf.xforms.action.XFormsAPI$ |withScalaAction |XFormsAPI.scala | 39|
|org.orbeon.oxf.xforms.event.EventHandlerImpl |handleEvent |EventHandlerImpl.scala | 248|
|org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispa|apply$mcV$sp |Dispatch.scala | 79|
|org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispa|apply |Dispatch.scala | 78|
|org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispa|apply |Dispatch.scala | 78|
|org.orbeon.oxf.util.Logging$class |withDebug |Logging.scala | 43|
|org.orbeon.oxf.xforms.event.Dispatch$ |withDebug |Dispatch.scala | 22|
|org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispa|apply |Dispatch.scala | 78|
|org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispa|apply |Dispatch.scala | 72|
|scala.collection.TraversableLike$WithFilter$$anonfu|apply |TraversableLike.scala | 697|
|scala.collection.LinearSeqOptimized$class |foreach |LinearSeqOptimized.scala | 59|
|scala.collection.immutable.List |foreach |List.scala | 76|
|scala.collection.TraversableLike$WithFilter |map |TraversableLike.scala | 696|
|org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispa|apply |Dispatch.scala | 72|
|---8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<---|
|org.orbeon.oxf.util.ScalaUtils$ |withRootException |ScalaUtils.scala | 116|
|org.orbeon.oxf.servlet.OrbeonServlet |service |OrbeonServlet.scala | 67|
|javax.servlet.http.HttpServlet |service |HttpServlet.java | 722|
|org.apache.catalina.core.ApplicationFilterChain |internalDoFilter |ApplicationFilterChain.java | 305|
|org.apache.catalina.core.ApplicationFilterChain |doFilter |ApplicationFilterChain.java | 210|
|org.apache.catalina.core.StandardWrapperValve |invoke |StandardWrapperValve.java | 225|
|org.apache.catalina.core.StandardContextValve |invoke |StandardContextValve.java | 169|
|org.apache.catalina.authenticator.AuthenticatorBase|invoke |AuthenticatorBase.java | 472|
|org.apache.catalina.core.StandardHostValve |invoke |StandardHostValve.java | 168|
|org.apache.catalina.valves.ErrorReportValve |invoke |ErrorReportValve.java | 98|
|org.apache.catalina.valves.AccessLogValve |invoke |AccessLogValve.java | 927|
|org.apache.catalina.valves.RemoteIpValve |invoke |RemoteIpValve.java | 680|
|org.apache.catalina.core.StandardEngineValve |invoke |StandardEngineValve.java | 118|
|org.apache.catalina.connector.CoyoteAdapter |service |CoyoteAdapter.java | 407|
|org.apache.coyote.http11.AbstractHttp11Processor |process |AbstractHttp11Processor.java | 999|
|org.apache.coyote.AbstractProtocol$AbstractConnecti|process |AbstractProtocol.java | 565|
|org.apache.tomcat.util.net.JIoEndpoint$SocketProces|run |JIoEndpoint.java | 309|
|java.util.concurrent.ThreadPoolExecutor |runWorker |ThreadPoolExecutor.java |1110|
|java.util.concurrent.ThreadPoolExecutor$Worker |run |ThreadPoolExecutor.java | 603|
|java.lang.Thread |run |Thread.java | 722|
+----------------------------------------------------------------------------------------------------------------------+"}

This indeed looks like a bug. I created an issue for this on GitHub, and you can watch that thread if you'd like to get updates on this.

Related

Auto layout errors when adding "line" to view on iOS 7

I have seven elements side by side for which auto layout should calculate its width and the parent view should determine it's height. On this parent view I want to add a line to separate the areas more clearly. When adding this line (a UIView with a background color) I get some black bars at the right side of the parent view (container for the seven elements) and also one of the other views.
If I don't add this line it does work fine on iOS 7. On iOS 8 it does work even when the line is present. These are my auto layout constraints for the line:
V:[line(==0.5)]| and H:|-0-[line]-0-|
The seven labels have the following constraints:
H:|-0-[first][second(==first)][third(==first)][fourth(==first)][fifth(==first)][sixt(==first)][seventh(==first)]-0-|
and
V:|[first]|
and so on.
Why does adding the line not work for iOS 7 auto layout system? How can I add my line correctly?
Edit:
My seven labels are in a container view - the header. The header is placed together with a collection view (added as child view controller) on a normal view controller. This "main" view controller (or container if you want) has the following constraints:
H:|-0-[header]-0-| - header holding the seven labels
H:|-0-[monthView]-0-| - collection view
H:|-0-[toolbar]-0-| - toolbar
V:|-0-[header(==15)][monthView][toolbar(==44)]-0-| - vertical position all three elements
I got it managed to get an auto layout trace once all views where loaded:
*<UIWindow:0x7897f370> - AMBIGUOUS LAYOUT
| *<UILayoutContainerView:0x78eb09f0>
| | *<UINavigationTransitionView:0x78db1b50>
| | | *<UIViewControllerWrapperView:0x78dbb400>
| | | | *<UIView:0x7897c780>
| | | | | *<MonthView_MonthViewHeader:0x78ddd600>
| | | | | | *<UILabel:0x78ddede0>
| | | | | | *<UILabel:0x78de29e0>
| | | | | | *<UILabel:0x78de2a90>
| | | | | | *<UILabel:0x78de2bc0>
| | | | | | *<UILabel:0x78de2de0>
| | | | | | *<UILabel:0x78de3140>
| | | | | | *<UILabel:0x78de3360>
| | | | | | *<UIView:0x78de3580>
| | | | | *<UICollectionViewControllerWrapperView:0x78ebdd00>
| | | | | | *<UICollectionView:0x795c1a00>
| | | | | | | *<MonthView_MonthViewCell:0x78ed1270>
| | | | | | | | <UIView:0x78d2cab0>
| | | | | | | | *<UIView:0x78d2d660>
| | | | | | | | | *<UIView:0x78d2c8b0>
| | | | | | | | | *<UILabel:0x78d2c6a0>
| | | | | | | *<MonthView_MonthViewCell:0x78d29450>
| | | | | | | | <UIView:0x78d290d0>
| | | | | | | | *<UIView:0x78d293f0>
| | | | | | | | | *<UIView:0x78d29020>
| | | | | | | | | *<UILabel:0x78d28f10>
| | | | | | | *<MonthView_MonthViewCell:0x78d27ec0>
| | | | | | | | <UIView:0x78d27c30>
| | | | | | | | *<UIView:0x78d27e60>
| | | | | | | | | *<UIView:0x78d27b80>
| | | | | | | | | *<UILabel:0x78d27a70>
| | | | | | | *<MonthView_MonthViewCell:0x78d26a20>
| | | | | | | | <UIView:0x78d26790>
| | | | | | | | *<UIView:0x78d269c0>
| | | | | | | | | *<UIView:0x78d266e0>
| | | | | | | | | *<UILabel:0x78d265d0>
| | | | | | | *<MonthView_MonthViewCell:0x78d253e0>
| | | | | | | | <UIView:0x78d25170>
| | | | | | | | *<UIView:0x78d25380>
| | | | | | | | | *<UIView:0x78d250c0>
| | | | | | | | | *<UILabel:0x78d24fb0>
| | | | | | | *<MonthView_MonthViewCell:0x78d23f60>
| | | | | | | | <UIView:0x78d23cd0>
| | | | | | | | *<UIView:0x78d23f00>
| | | | | | | | | *<UIView:0x78d23c20>
| | | | | | | | | *<UILabel:0x78d23b10>
| | | | | | | *<MonthView_MonthViewCell:0x78d1ed90>
| | | | | | | | <UIView:0x78d1eb00>
| | | | | | | | *<UIView:0x78d1ed30>
| | | | | | | | | *<UIView:0x78d1ea50>
| | | | | | | | | *<UILabel:0x78d1e940>
| | | | | | | *<MonthView_MonthViewCell:0x78d1d860>
| | | | | | | | <UIView:0x78d1d610>
| | | | | | | | *<UIView:0x78d1d800>
| | | | | | | | | *<UIView:0x78d1d560>
| | | | | | | | | *<UILabel:0x78d1d450>
| | | | | | | *<MonthView_MonthViewCell:0x78d1c3f0>
| | | | | | | | <UIView:0x78d1c160>
| | | | | | | | *<UIView:0x78d1c390>
| | | | | | | | | *<UIView:0x78d1c0b0>
| | | | | | | | | *<UILabel:0x78d1bfa0>
| | | | | | | *<MonthView_MonthViewCell:0x78d1af40>
| | | | | | | | <UIView:0x78d1acb0>
| | | | | | | | *<UIView:0x78d1aee0>
| | | | | | | | | *<UIView:0x78d1ac00>
| | | | | | | | | *<UILabel:0x78d1aaf0>
| | | | | | | *<MonthView_MonthViewCell:0x78d19a90>
| | | | | | | | <UIView:0x78d19800>
| | | | | | | | *<UIView:0x78d19a30>
| | | | | | | | | *<UIView:0x78d19750>
| | | | | | | | | *<UILabel:0x78d19640>
| | | | | | | *<MonthView_MonthViewCell:0x78d185e0>
| | | | | | | | <UIView:0x78d18350>
| | | | | | | | *<UIView:0x78d18580>
| | | | | | | | | *<UIView:0x78d182a0>
| | | | | | | | | *<UILabel:0x78d18190>
| | | | | | | *<MonthView_MonthViewCell:0x78d170c0>
| | | | | | | | <UIView:0x78d16e60>
| | | | | | | | *<UIView:0x78d17060>
| | | | | | | | | *<UIView:0x78d16db0>
| | | | | | | | | *<UILabel:0x78d16ca0>
| | | | | | | *<MonthView_MonthViewCell:0x78d15c40>
| | | | | | | | <UIView:0x78d159b0>
| | | | | | | | *<UIView:0x78d15be0>
| | | | | | | | | *<UIView:0x78d15900>
| | | | | | | | | *<UILabel:0x78d157f0>
| | | | | | | *<MonthView_MonthViewCell:0x78d14790>
| | | | | | | | <UIView:0x78d14500>
| | | | | | | | *<UIView:0x78d14730>
| | | | | | | | | *<UIView:0x78d14450>
| | | | | | | | | *<UILabel:0x78d14340>
| | | | | | | *<MonthView_MonthViewCell:0x78d132e0>
| | | | | | | | <UIView:0x78d13050>
| | | | | | | | *<UIView:0x78d13280>
| | | | | | | | | *<UIView:0x78d12fa0>
| | | | | | | | | *<UILabel:0x78d12e90>
| | | | | | | *<MonthView_MonthViewCell:0x78d11e30>
| | | | | | | | <UIView:0x78d11ba0>
| | | | | | | | *<UIView:0x78d11dd0>
| | | | | | | | | *<UIView:0x78d11af0>
| | | | | | | | | *<UILabel:0x78d119e0>
| | | | | | | *<MonthView_MonthViewCell:0x78d10980>
| | | | | | | | <UIView:0x78d106f0>
| | | | | | | | *<UIView:0x78d10920>
| | | | | | | | | *<UIView:0x78d10640>
| | | | | | | | | *<UILabel:0x78d10530>
| | | | | | | *<MonthView_MonthViewCell:0x78d0f4d0>
| | | | | | | | <UIView:0x78d0f240>
| | | | | | | | *<UIView:0x78d0f470>
| | | | | | | | | *<UIView:0x78d0f190>
| | | | | | | | | *<UILabel:0x78d0f080>
| | | | | | | *<MonthView_MonthViewCell:0x78d0e020>
| | | | | | | | <UIView:0x78d0dd90>
| | | | | | | | *<UIView:0x78d0dfc0>
| | | | | | | | | *<UIView:0x78d0dce0>
| | | | | | | | | *<UILabel:0x78d0dbd0>
| | | | | | | *<MonthView_MonthViewCell:0x78d0c960>
| | | | | | | | <UIView:0x78d0c740>
| | | | | | | | *<UIView:0x78d17190>
| | | | | | | | | *<UIView:0x78d0c690>
| | | | | | | | | *<UILabel:0x78d0c580>
| | | | | | | *<MonthView_MonthViewCell:0x78d0b520>
| | | | | | | | <UIView:0x78d0b290>
| | | | | | | | *<UIView:0x78d0b4c0>
| | | | | | | | | *<UIView:0x78d0b1e0>
| | | | | | | | | *<UILabel:0x78d0b0d0>
| | | | | | | *<MonthView_MonthViewCell:0x78d0a070>
| | | | | | | | <UIView:0x78d09de0>
| | | | | | | | *<UIView:0x78d0a010>
| | | | | | | | | *<UIView:0x78d09d30>
| | | | | | | | | *<UILabel:0x78d09c20>
| | | | | | | *<MonthView_MonthViewCell:0x78d08bc0>
| | | | | | | | <UIView:0x78d08930>
| | | | | | | | *<UIView:0x78d08b60>
| | | | | | | | | *<UIView:0x78d08880>
| | | | | | | | | *<UILabel:0x78d08770>
| | | | | | | *<MonthView_MonthViewCell:0x78d07710>
| | | | | | | | <UIView:0x78d07480>
| | | | | | | | *<UIView:0x78d076b0>
| | | | | | | | | *<UIView:0x78d073d0>
| | | | | | | | | *<UILabel:0x78d072c0>
| | | | | | | *<MonthView_MonthViewCell:0x78d06150>
| | | | | | | | <UIView:0x78d05ec0>
| | | | | | | | *<UIView:0x78d060f0>
| | | | | | | | | *<UIView:0x78d05e10>
| | | | | | | | | *<UILabel:0x78d05d00>
| | | | | | | *<MonthView_MonthViewCell:0x78d04ca0>
| | | | | | | | <UIView:0x78d04a10>
| | | | | | | | *<UIView:0x78d04c40>
| | | | | | | | | *<UIView:0x78d04960>
| | | | | | | | | *<Circle:0x78d3c6b0>
| | | | | | | | | *<UILabel:0x78d04850>
| | | | | | | *<MonthView_MonthViewCell:0x78d037f0>
| | | | | | | | <UIView:0x78d03560>
| | | | | | | | *<UIView:0x78d03790>
| | | | | | | | | *<UIView:0x78d034b0>
| | | | | | | | | *<UILabel:0x78d033a0>
| | | | | | | *<MonthView_MonthViewCell:0x78d02270>
| | | | | | | | <UIView:0x78d01fe0>
| | | | | | | | *<UIView:0x78d02210>
| | | | | | | | | *<UIView:0x78d01f30>
| | | | | | | | | *<UILabel:0x78d01e20>
| | | | | | | *<MonthView_MonthViewCell:0x78d00dc0>
| | | | | | | | <UIView:0x78d00b30>
| | | | | | | | *<UIView:0x78d00d60>
| | | | | | | | | *<UIView:0x78e64000>
| | | | | | | | | *<UILabel:0x78ed2dd0>
| | | | | | | *<MonthView_MonthViewCell:0x78ed3e60>
| | | | | | | | <UIView:0x78ed4130>
| | | | | | | | *<UIView:0x78ed3f00>
| | | | | | | | | *<UIView:0x78ed41e0>
| | | | | | | | | *<UILabel:0x78ed42a0>
| | | | | | | *<MonthView_MonthViewCell:0x78ed5310>
| | | | | | | | <UIView:0x78ed55e0>
| | | | | | | | *<UIView:0x78ed53b0>
| | | | | | | | | *<UIView:0x78ed5690>
| | | | | | | | | *<UILabel:0x78ed5750>
| | | | | | | *<MonthView_MonthViewCell:0x78ed67c0>
| | | | | | | | <UIView:0x78ed6a90>
| | | | | | | | *<UIView:0x78ed6860>
| | | | | | | | | *<UIView:0x78ed6b40>
| | | | | | | | | *<UILabel:0x78ed6c00>
| | | | | | | *<MonthView_MonthViewCell:0x78ed7eb0>
| | | | | | | | <UIView:0x78ed8180>
| | | | | | | | *<UIView:0x78ed7f50>
| | | | | | | | | *<UIView:0x78ed8230>
| | | | | | | | | *<UILabel:0x78ed82f0>
| | | | | | | *<MonthView_MonthViewCell:0x78ed9360>
| | | | | | | | <UIView:0x78ed9630>
| | | | | | | | *<UIView:0x78ed9400>
| | | | | | | | | *<UIView:0x78ed96e0>
| | | | | | | | | *<UILabel:0x78ed97a0>
| | | | | | | *<MonthView_SectionHeader:0x78edb330>
| | | | | | | | *<UIView:0x78eda940>
| | | | | | | | *<UIView:0x78edc740>
| | | | | | | | *<UIView:0x78edc7a0>
| | | | | | | | *<UIView:0x78edca50>
| | | | | | | | *<UIView:0x78edcae0>
| | | | | | | | *<UIView:0x78edcb70>
| | | | | | | | *<UIView:0x78edcc00>
| | | | | | | | *<UILabel:0x78edcc90>
| | | | | | | <UIImageView:0x78df2690>
| | | | | | | <UIImageView:0x78df1c40>
| | | | | | *<MonthView_SectionOverlay:0x78dc8fd0>
| | | | | | | *<GradientView:0x78dcc780>
| | | | | | | *<UILabel:0x78dd3ea0>
| | | | | | *<_UILayoutGuide:0x78dc8a20> - AMBIGUOUS LAYOUT
| | | | | *<MonthView_Toolbar:0x78de7540>
| | | | | | <_UIToolbarBackground:0x78de7c40>
| | | | | | | <_UIBackdropView:0x78d3e940>
| | | | | | | | <_UIBackdropEffectView:0x78d3e730>
| | | | | | | | <UIView:0x78d3e650>
| | | | | | <UIImageView:0x78de8c70>
| | | | | | <UIToolbarTextButton:0x78dfa240>
| | | | | | | <_UIToolbarNavigationButton:0x78df9aa0>
| | | | | | | | <UIButtonLabel:0x78ef69f0>
| | | | | | <UIToolbarTextButton:0x78dfaa50>
| | | | | | | <_UIToolbarNavigationButton:0x78d3eb00>
| | | | | | | | <UIButtonLabel:0x78ef5740>
| | <UINavigationBar:0x78eb1ad0>
| | | <_UINavigationBarBackground:0x78eb2170>
| | | | <_UIBackdropView:0x78db8270>
| | | | | <_UIBackdropEffectView:0x78dba8d0>
| | | | | <UIView:0x78dbb3a0>
| | | | <UIImageView:0x78eb24e0>
| | | <_UINavigationBarBackIndicatorView:0x78eb4f30>
Here you can find the recursive description after the view was loaded.
I think I'll never find out what is wrong with the auto layout system on iOS 7. But I now use a workaround: Instead of adding the line to the same view like the seven labels I add it to another container. Pseudo-Code:
weekdayHeader = [label1]-[label7]
monthViewHeader = [weekdayHeader][line(==0.5)]
And the monthViewHeader is added together with my other views (UICollectionView, UIToolbar) to my main view controller/container.

Zooming Out in a UIScrollView

I want help with my UIScrollView:
I have implemented my UIScrollView in my project and everything works fine but I have problems when Im trying to implement zoom, but this is not as the zoom when we are looking a picture. I am trying to zoom out. My app begins as this graphic when it launches. Lets suppose that I have a UIView in the screen which is bigger than my screen.
--------------------------------------------
| | | |
| | | |
| -----|----------------------|---------|
| | | | |<---------UIView
| | | |<------------------ iPhone Screen frame
| | | | |
| -----|----------------------|---------|
| | | |
| | | |<-------- ScrollView Content size
| | | |
| | | |
| | |<----------------- ScrollView Frame Size
| | | |
| | | |
| | | |
| | | |
| | | |
| ------------------------ |
| |
| |
| |
--------------------------------------------
And I want my screen look like this when I zoom out.
------------------------
| |
| ------------------|
UIView-------->| |
| | |
| ------------------|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
------------------------
How can I do it?
Set scrollView.minimumZoomScale = 0 then you can zoom out as much as you want. If you don't want to zoom out too much, give it a reasonable value.

How to stack UICollectionView sections

I originally tried doing this with two UICollectionViews stacked on top of each other. However getting it to scale right was nightmare with Auto-layout (I'm a novice iOS developer so that is more a critique of my skill than Auto-layout). I'd like to stack two sections of UICollectionView cells on top of each other like this:
+----------------------+
|+-Section 0---------->|
| +-------+ +-------+ |
| | | | | |
| | | | | |
| |Cell 0 | |Cell 1 |+->
| | | | | |
| | | | | |
| +-------+ +-------+ |
+--Section 1---------->|
| +-------+ +-------+ |
| | | | | |
| | | | | |
| | | | | |
| |Cell 0 | |Cell 1 |+->
| | | | | |
| | | | | |
| +-------+ +-------+ |
| |
+----------------------+
I'm using a custom Flow Layout, but I'm not even sure where to begin breaking my current 2 sections to stack like this. Currently my sections are stacked like this:
+--------(Offscreen)
|
+
+--------xxxx--------+v
| Section 1 | Section 2
| +-----+ +-----+ | +-----+ +-------+
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| +-----+ +-----+ | +-----+ +-------+
| |
| |
| +-----+ +-----+ | +-----+ +-------+
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| +-----+ +-----+ | +-----+ +-------+
| |
| |
| xxxx |
+--------xxxx--------+
UICollectionView can scroll either vertical or horizontal not both. If you have only two sections like in the diagram you can use two collection view. But it better to think of a design like a table view contains collection views in each cells. So that the design will be flexible(Horizontal and vertical scrolling with any number of sections). Anyway the design is little bit complex, you should customize the table view cell to put collection view in it. Now the UITableView will give you vertical scrolling with the ability to scroll each rows horizontaly(UICOllectionView)

Why do I see NSAutoresizingMaskLayoutConstraint when all UI Elements are set to setTranslatesAutoresizingMaskIntoConstraints = NO

I am trying to debug a UI Layout and all the elements I have added in the code are labelled with [self.element setTranslatesAutoresizingMaskIntoConstraints:NO]; The only thing that is set in XIB file is the background color of the view (one of many views in a tabbed viewController.
When I look at the NSLog I am seeing the following:
*<UIWindow:0xc352370> - AMBIGUOUS LAYOUT
| *<UILayoutContainerView:0xc3651b0>
| | *<UINavigationTransitionView:0xc355b40>
| | | *<UIViewControllerWrapperView:0xbd3e250>
| | | | *<UILayoutContainerView:0xbd3da60>
| | | | | *<UITransitionView:0xbd46ed0>
| | | | | | *<UIViewControllerWrapperView:0xc09a450>
| | | | | | | *<UIView:0xbd51f40>
| | | | | | | | *<_UILayoutGuide:0xbd51fa0> - AMBIGUOUS LAYOUT
| | | | | | | | *<_UILayoutGuide:0xbd50a10> - AMBIGUOUS LAYOUT
| | | | | | | | *<UIButton:0xc064170> - AMBIGUOUS LAYOUT
| | | | | | | | | *<UIButtonLabel:0xc09d640>
| | | | | | | | *<UILabel:0xc073990> - AMBIGUOUS LAYOUT
| | | | | | | | *<UIButton:0xc0576a0> - AMBIGUOUS LAYOUT
| | | | | | | | | *<UIButtonLabel:0xc095290>
| | | | | | | | *<UIButton:0xc096640> - AMBIGUOUS LAYOUT
| | | | | | | | | <UIButtonLabel:0xc096820>
| | | | | | | | *<UIButton:0xc098b70> - AMBIGUOUS LAYOUT
| | | | | | | | | <UIButtonLabel:0xc098cb0>
| | | | | | | | *<UIButton:0xc09a4c0> - AMBIGUOUS LAYOUT
| | | | | | | | | <UIButtonLabel:0xc09a6d0>
| | | | | | | | *<UILabel:0xc09c9d0> - AMBIGUOUS LAYOUT
| | | | | | | | *<UILabel:0xc09cc60> - AMBIGUOUS LAYOUT
| | | | | | | | *<UIButton:0xc09ce00> - AMBIGUOUS LAYOUT
| | | | | | | | | <UIButtonLabel:0xc09d010>
| | | | | | | | *<UILabel:0xc0a25f0> - AMBIGUOUS LAYOUT
| | | | | | | | *<UIButton:0xc0a2800> - AMBIGUOUS LAYOUT
| | | | | | | | | <UIButtonLabel:0xc0a2a10>
| | | | | | | | *<UILabel:0xc0a5720> - AMBIGUOUS LAYOUT
| | | | | <UITabBar:0xc356c00>
| | | | | | <_UITabBarBackgroundView:0xbe28cc0>
| | | | | | | <_UIBackdropView:0xbe29100>
| | | | | | | | <_UIBackdropEffectView:0xbe296e0>
| | | | | | | | <UIView:0xbe29780>
| | | | | | <UITabBarButton:0xbd42000>
| | | | | | | <UITabBarSwappableImageView:0xbd41050>
| | | | | | | <UITabBarButtonLabel:0xbd43320>
| | | | | | <UITabBarButton:0xbd462e0>
| | | | | | | <UITabBarSwappableImageView:0xbd45d60>
| | | | | | | <UITabBarButtonLabel:0xbd45c70>
| | | | | | <UITabBarButton:0xbd47770>
| | | | | | | <UITabBarSwappableImageView:0xbd48a90>
| | | | | | | <UITabBarButtonLabel:0xbd486c0>
| | | | | | <UITabBarButton:0xbd4c0c0>
| | | | | | | <UITabBarSwappableImageView:0xbd4c220>
| | | | | | | <UITabBarButtonLabel:0xbd4aea0>
| | | | | | <UIImageView:0xbe29ed0>
| | <UINavigationBar:0xc06c4a0>
| | | <_UINavigationBarBackground:0xc05e720>
| | | | <_UIBackdropView:0xc357d70>
| | | | | <_UIBackdropEffectView:0xc3639a0>
| | | | | <UIView:0xc355470>
| | | | <UIImageView:0xc071980>
| | | <UINavigationItemView:0xc074c80>
| | | | <UILabel:0xc083730>
| | | <_UINavigationBarBackIndicatorView:0xc36edb0>
po [
(lldb) po [0xbd51fa0 constraintsAffectingLayoutForAxis:0]
<__NSArrayM 0xbd39190>(
)
(lldb) po [0xbd50a10 constraintsAffectingLayoutForAxis:0]
<__NSArrayM 0x1121f8f0>(
)
(lldb) po [0xc064170 constraintsAffectingLayoutForAxis:0]
<__NSArrayM 0xc0a14e0>(
<NSLayoutConstraint:0xc093aa0 H:|-(NSSpace(20))-[UIButton:0xc064170] (Names: '|':UIView:0xbd51f40 )>,
<NSLayoutConstraint:0xc093b30 UIButton:0xc064170.width == UIButton:0xc0576a0.width>,
<NSLayoutConstraint:0xc093be0 H:[UIButton:0xc064170]-(20)-[UILabel:0xc073990]>,
<NSLayoutConstraint:0xc093c10 UILabel:0xc073990.width == UIButton:0xc0576a0.width>,
<NSLayoutConstraint:0xc096530 H:[UILabel:0xc073990]-(20)-[UIButton:0xc0576a0]>,
<NSLayoutConstraint:0xc096590 H:[UIButton:0xc0576a0]-(NSSpace(20))-| (Names: '|':UIView:0xbd51f40 )>,
<NSAutoresizingMaskLayoutConstraint:0xc0af130 h=--& v=--& H:[UIView:0xbd51f40(768)]>
)
(lldb) po [0xc09a4c0 constraintsAffectingLayoutForAxis:0]
<__NSArrayM 0xc36a0a0>(
<NSLayoutConstraint:0xc09c9a0 H:|-(<=0)-[UIButton:0xc09a4c0] (Names: '|':UIView:0xbd51f40 )>,
<NSContentSizeLayoutConstraint:0xc0ad530 H:[UIButton:0xc09a4c0(110)] Hug:250 CompressionResistance:750>
As you can see from po commands, I am getting NSAutoresizingMasktLayoutContraints. I thought this shouldn't happen?
How can I ensure that I don't get this?
Ok.. I have figured out that the constraints did not appropriately address the relationship between each other. I have updated the code and now I can get clean constraints for all aspects, except for the main UIWindow, which I am sure is just because of the problem with the UILayoutGuide being ambiguous -
*<UIWindow:0xcc6d7f0> - AMBIGUOUS LAYOUT
| *<UILayoutContainerView:0xbd34720>
| | *<UINavigationTransitionView:0xbd4b140>
| | | *<UIViewControllerWrapperView:0xcc48400>
| | | | *<UILayoutContainerView:0xbd5ad40>
| | | | | *<UITransitionView:0xbd635c0>
| | | | | | *<UIViewControllerWrapperView:0xcca68b0>
| | | | | | | *<UIView:0xcc9ddd0>
| | | | | | | | *<_UILayoutGuide:0xcc9de30> - AMBIGUOUS LAYOUT
| | | | | | | | *<_UILayoutGuide:0xcc9e090> - AMBIGUOUS LAYOUT
| | | | | | | | *<UIButton:0xcc9d910>
| | | | | | | | | <UIImageView:0xcc9dd20>
| | | | | | | | *<UILabel:0xcc9e860>
| | | | | | | | *<UIButton:0xcc9ebb0>
| | | | | | | | | <UIImageView:0xcc9eda0>
| | | | | | | | *<UIButton:0xcc9f020>
| | | | | | | | | <UIButtonLabel:0xcc9f470>
| | | | | | | | *<UIButton:0xcca0620>
| | | | | | | | | <UIButtonLabel:0xcca0830>
| | | | | | | | *<UIButton:0xcca15d0>
| | | | | | | | | *<UIButtonLabel:0xcca17e0>
| | | | | | | | *<UILabel:0xcca2580>
| | | | | | | | *<UILabel:0xcca2710>
| | | | | | | | *<UIButton:0xcca28d0>
| | | | | | | | | *<UIButtonLabel:0xcca2ae0>
| | | | | | | | *<UILabel:0xcca3880>
| | | | | | | | *<UILabel:0xcca3bd0>
| | | | | | | | *<UIButton:0xcca3e30>
| | | | | | | | | *<UIButtonLabel:0xcca4040>
| | | | | | | | *<UILabel:0xcca4de0>
| | | | | | | | *<UILabel:0xcca5000>
| | | | | <UITabBar:0xcc69e40>
| | | | | | <_UITabBarBackgroundView:0xcccad10>
| | | | | | | <_UIBackdropView:0xcccb150>
| | | | | | | | <_UIBackdropEffectView:0xcccb730>
| | | | | | | | <UIView:0xcccb7d0>
| | | | | | <UITabBarButton:0xcc96bf0>
| | | | | | | <UITabBarSwappableImageView:0xcc8d330>
| | | | | | | <UITabBarButtonLabel:0xcc8d270>
| | | | | | <UITabBarButton:0xcc98830>
| | | | | | | <UITabBarSwappableImageView:0xcc81840>
| | | | | | | <UITabBarButtonLabel:0xcc983a0>
| | | | | | <UITabBarButton:0xcc9a050>
| | | | | | | <UITabBarSwappableImageView:0xcc8e3e0>
| | | | | | | <UITabBarButtonLabel:0xcc9a130>
| | | | | | <UITabBarButton:0xcc9a560>
| | | | | | | <UITabBarSwappableImageView:0xcc9b140>
| | | | | | | <UITabBarButtonLabel:0xcc9aa20>
| | | | | | <UIImageView:0xcccbf20>
| | <UINavigationBar:0xbd27340>
| | | <_UINavigationBarBackground:0xbd2fc60>
| | | | <_UIBackdropView:0xbd43740>
| | | | | <_UIBackdropEffectView:0xbd2c200>
| | | | | <UIView:0xbd46100>
| | | | <UIImageView:0xbd2ffd0>
| | | <UINavigationItemView:0xbd1e270>
| | | | <UILabel:0xbd283c0>
| | | <_UINavigationBarBackIndicatorView:0xbd566e0>
The UILayoutGuide is not set anywhere in my code, so I am not quite sure what do with it.

Invalid Variant Operation using MS Word OLE Automation only on one specific machine

I am doing some search replace work using OLE Automation. The involved code is somehow the same I posted in This question.
On only one machine I have an "Invalid Variant Operation" error. This error appeared just after upgrading from MSOffice 2003 to 2010. But this occurs only on one pc, i tested on several pcs with office 2010 and the code works great.
I am really stuck, I tried to build with Eureka log And I will paste the call stack at the end of this question.
I hope somebody already stumbled into this problem so you can suggest.
The problem occured at a customer end, there are 100 machines connected to same DB and only on one it doesn't work.
Call Stack Information:
--------------------------------------------------------------------------------------------------
|Address |Module |Unit |Class |Procedure/Method |Line |
--------------------------------------------------------------------------------------------------
|*Exception Thread: ID=776; Priority=0; Class=; [Main] |
|------------------------------------------------------------------------------------------------|
|0043554F|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|00435520|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|00435CAA|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|770F48F0|oleaut32.dll | | |VariantClear | |
|00435B43|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|0043590C|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|00435B48|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|00435BE4|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|00407316|Project1.exe|System.pas | |_HandleFinally |14330[39]|
|00407460|Project1.exe|System.pas | |_RaiseExcept |14712[1] |
|00635EED|Project1.exe|ComObj.pas | |DispCallError |2024[13] |
|004070DA|Project1.exe|System.pas | |_HandleAnyException |13728[81]|
|77E256A3|RPCRT4.dll | | |NdrClientCall2 | |
|7C80A174|kernel32.dll | | |WideCharToMultiByte | |
|0040C4DB|Project1.exe|System.pas | |LocaleCharsFromUnicode |29632[1] |
|0040C4C0|Project1.exe|System.pas | |LocaleCharsFromUnicode |29631[0] |
|00407EFC|Project1.exe|System.pas | |CharFromWChar |17375[3] |
|00407EDC|Project1.exe|System.pas | |CharFromWChar |17372[0] |
|00407F17|Project1.exe|System.pas | |CharFromWChar |17381[1] |
|00407F08|Project1.exe|System.pas | |CharFromWChar |17380[0] |
|004090CE|Project1.exe|System.pas | |_UStrToString |22054[8] |
|00404DA4|Project1.exe|System.pas | |Move |4808[1] |
|004090ED|Project1.exe|System.pas | |_UStrToString |22061[15]|
|7C920380|ntdll.dll | | |RtlImageNtHeader | |
|00407460|Project1.exe|System.pas | |_RaiseExcept |14712[1] |
|00635EED|Project1.exe|ComObj.pas | |DispCallError |2024[13] |
|004070DA|Project1.exe|System.pas | |_HandleAnyException |13728[81]|
|00407460|Project1.exe|System.pas | |_RaiseExcept |14712[1] |
|00635EED|Project1.exe|ComObj.pas | |DispCallError |2024[13] |
|7C913247|ntdll.dll | | |RtlConvertUlongToLargeInteger| |
|00404A95|Project1.exe|System.pas | |_ReallocMem |3871[22] |
|00404A88|Project1.exe|System.pas | |_ReallocMem |3850[1] |
|00409130|Project1.exe|System.pas | |_UStrSetLength |22152[27]|
|00408198|Project1.exe|System.pas | |_UStrAsg |17715[1] |
|0040C3EF|Project1.exe|System.pas | |UTF8ToUnicodeString |28576[11]|
|00407DB8|Project1.exe|System.pas | |_UStrClr |16954[1] |
|0040C404|Project1.exe|System.pas | |UTF8ToUnicodeString |28577[12]|
|7C91E485|ntdll.dll | | |KiUserApcDispatcher | |
|7C912B04|ntdll.dll | | |RtlInterlockedPushListSList | |
|77E943DB|SHLWAPI.dll | | |SHRegGetValueW | |
|77E943E8|SHLWAPI.dll | | |SHRegGetValueW | |
|00407460|Project1.exe|System.pas | |_RaiseExcept |14712[1] |
|00635EED|Project1.exe|ComObj.pas | |DispCallError |2024[13] |
|00635E48|Project1.exe|ComObj.pas | |DispCallError |2011[0] |
|00635F20|Project1.exe|ComObj.pas | |DispatchInvokeError |2031[1] |
|00635F1C|Project1.exe|ComObj.pas | |DispatchInvokeError |2031[1] |
|00635BF9|Project1.exe|ComObj.pas | |DispatchInvoke |1895[108]|
|00635940|Project1.exe|ComObj.pas | |DispatchInvoke |1787[0] |
|00635E3B|Project1.exe|ComObj.pas | |VarDispInvoke |2002[10] |
|774CF17D|ole32.dll | | |CoCreateInstanceEx | |
|77E25AE5|RPCRT4.dll | | |IUnknown_Release_Proxy | |
|00435C7A|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|00435BE4|Project1.exe|SysUtils.pas| |DoneExceptions |17031[25]|
|004627DF|Project1.exe|Classes.pas |TThread |Create |11471[28]|
|004627D0|Project1.exe|Classes.pas |TThread |Create |11471[28]|
|00501FE5|Project1.exe|ActnList.pas|TContainedAction|Execute |448[8] |
|00501FB4|Project1.exe|ActnList.pas|TContainedAction|Execute |440[0] |
|00502DA0|Project1.exe|ActnList.pas|TCustomAction |Execute |1094[7] |
|00406498|Project1.exe|System.pas | |_CallDynaInst |11592[1] |
|004626A3|Project1.exe|Classes.pas |TThread |Create |11471[28]|
|00532DA4|Project1.exe|Menus.pas |TMenuItem |Click |2525[17] |

Resources