Overlay not working in showcaseTemplate - tvos

I am simply modifying the showcaseTemplate that comes with the TVMLCatalog example by modifying the images src and adding an overlay to the lookup:
<carousel>
<section>
<lockup>
<img src="${this.BASEURL}resources/images/templates/gft.jpg" width="500" height="600" />
<overlay>
<title>Hello, this is title</title>
</overlay>
</lockup>
</section>
</carousel>
But the overlay is not showing
this is what the XCODE log shows:
2015-12-07 11:25:47.851 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template element: <IKViewElement: 0x7fcee0781f20>
2015-12-07 11:25:47.858 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template controller: <_TVLoadingViewController: 0x7fcee04ba960>
2015-12-07 11:25:47.864 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template element: <IKViewElement: 0x7fcee2176a50>
2015-12-07 11:25:47.865 TVMLCatalog[3953:3684153] #T:[Main] #Notice #SYSTEM : Template controller: <_TVShowcaseTemplateController: 0x7fcee0799c90>
Dec 7 11:25:47 TVMLCatalog[3953] <Error>: ImageIO: CreateMetadataFromXMPBufferInternal Threw error #203 (Duplicate property or field node)
Dec 7 11:25:47 TVMLCatalog[3953] <Error>: ImageIO: CreateMetadataFromXMPBufferInternal Threw error #203 (Duplicate property or field node)
2015-12-07 11:25:48.996 TVMLCatalog[3953:3684153] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x7fcee0564910 h=--& v=--& V:[_TVStackingPosterView:0x7fcee051a1e0(46)]>",
"<NSLayoutConstraint:0x7fcee0554000 V:[TVLabel:0x7fcee0561020'Image1'(62)]>",
"<NSLayoutConstraint:0x7fcee0564250 V:|-(0)-[TVLabel:0x7fcee0561020'Image1'] (Names: '|':_TVStackingPosterView:0x7fcee051a1e0 )>",
"<NSLayoutConstraint:0x7fcee0564720 TVLabel:0x7fcee0561020'Image1'.bottom == _TVStackingPosterView:0x7fcee051a1e0.bottom>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fcee0564720 TVLabel:0x7fcee0561020'Image1'.bottom == _TVStackingPosterView:0x7fcee051a1e0.bottom>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
Note that I have never worked with Swift or Objective-C before. So I am totally lost here.
Any help will be very much appreciated

After some research, I found out it is a known issue:
More Information in Apple developer forums:
Overlay not working in showcaseTemplate
Device Log Spam
Getting autolayout errors with showcaseTemplate in TVML
Current document DOM manipulation issue in beta 2
Several bug reports have been filed to Apple.

Related

XPage Widget with extension.xml

I am just developing an XPage Widget with a manifest extension.xml.
<?xml version="1.0" encoding="UTF-8"?>
<webcontextConfiguration version="1.1">
<palleteItem title="XWidget" viewImageUrl="" url="notes://venus/xxx/Dev/Source/CC/CC_40_DEDE_SRC.NSF/streamCC.xsp?
OpenXPage&1536921419?OpenXPage=null" singletonSidebar="false"
providerId="com.ibm.notes.toolbox.provider.XPagesPalleteProvider" imageUrl="" id="1385849393" hideThumbnail="false"
contributeToSideshelfOnStartup="true" contributeTabOnStartup="false">
<preferences/>
<data/>
</palleteItem>
</webcontextConfiguration>
I have already researched the meaning of the different parts. Only the parameters of the URL "notes://venus/xxx/Dev/Source/CC/CC_40_DEDE_SRC.NSF/streamCC.xsp?OpenXPage&1536921419?OpenXPage=null" are not clear to me.
It seems to be a bug during URL generation, but the bug has no consequences.
The URL parameters are splitted into two elements:
OpenXPage
1536921419?OpenXPage=null
While the meaning of the first parameter should be clear, the second one is to prevent caching (but is useless when "hardcoded" like in bookmarks)
1536921419 is a unix timestamp to prevent caching.
GMT: Friday, 14. September 2018 10:36:59
?OpenXPage=null
Looks like a simple coding error. "Add ?OpenXPage=[value] if URL parameter OpenXPage is null or empty".

recursive/circular template calls

I have a setup with Angular 2 where the home.html has a
<widgetcontainer></widgetcontainer> call, which in turn calls certain widget templates.
Those widget templates however would need to call widgetcontainer again so their sub-widgets can be displayed as well.
It looks somewhat like this:
home.html:
<div> home site specific content </div>
<ul>
<widgetcontainer *ng-for="#widget of widgetList" [containerwidget]="widget"></widgetcontainer>
</ul>
widgetcontainer.html:
<li>
<div [ng-switch]="containerwidget.type">
<p *ng-switch-when="1"><widget1 [widget]="containerwidget"></widget1></p>
<p *ng-switch-when="2"><widget2 [widget]="containerwidget"></widget2></p>
<p *ng-switch-default>Error in widget-data</p>
</div>
</li>
now widget1 and widget2 are pretty much identical except for the first bit of content:
<div> widget 1 or 2 specific content </div>
<div *ng-if="widget.widgetSubList">
<div class="widget-sub-listing" *ng-for="#widget of widgetlocal.widgetSubList">
<widgetcontainer *ng-for="#widget of widgetlocal.widgetSubList" [containerwidget]="widget"></widgetcontainer>
</div>
</div>
The reason why I need to do it this way is that widget1 can contain a series of widget2 (and others) which in turn can contain widget1 again.
The .ts counterparts of each widget contain the required #Input part, so if I leave out the call to widgetcontainer, it does work just fine, though of course therefor can't display the subwidgets anymore. Reading out the subwidgets works as well, tested that with console.logs.
I found similiar problems like this one: How do I inject a parent component into a child component?
where, from what I gathered, the problem is solved by importing Input and forwardRef and using
constructor( #Inject(forwardRef(() => widgetcontainer)) private _parent: widgetcontainer) { }
in the children, in my case widget 1 and 2. I tried that as well, but I still get an error. Importing widgetcontainer to the widget.ts files works without trouble, adding it to the directives or adding the <widgetcontainer></widgetcontainer> call into the html of widget1 or 2 breaks the program and throws me the error message:
EXCEPTION: TypeError: Die Eigenschaft "length" eines undefinierten oder Nullverweises kann nicht abgerufen werden. in [null]
As a little translation-attempt: it basicly says
the property "length" of an undefined or null-reference can not be called. in [null]
And I can't locate where exactly the error is. Considering it works without adding widgetcontainer to the directives in widget1 or 2, I would guess that is where the whole thing breaks though.
Previously I had a similiar error, though instead of length it stated to have failed calling forEach though now I am unable to replicate the error.
From what I have been reading up on the problem is the circular reference/call of the <widgetcontainer></widgetcontainer> template. It should be possible to have it work, though it needs a stopping-condition to not turn into an infinite loop. Therefor I already have the *ng-if condition in my widget1 and 2 which is tested already with simple listings of the subwidget IDs and worked just fine as a condition.
The question is now where am I going wrong here? Or how can I get the circular call to work?

Issue in windows phone 8 : Error 2 SlideView is not supported in a Silverlight project

I have got few issues while trying to implement a sliding menu ('Facebook' like) in my windows phone 8 application.
When I added the following code in app.xaml, it shows following issues
<Application.RootVisual>
<library:SlideApplicationFrame Header="ManageIT"
Background="White">
<!--<library:SlideApplicationFrame.LeftContent>
<pages:LeftView />
</library:SlideApplicationFrame.LeftContent>-->
<!--<library:SlideApplicationFrame.RightContent>
<pages:RightView />
</library:SlideApplicationFrame.RightContent>-->
</library:SlideApplicationFrame>
</Application.RootVisual>
The exception is given below.
Error 1 Nested properties are not supported: Application.RootVisual.
Error 2 The attachable property 'RootVisual' was not found in type 'Application'.
Error 3 Unexpected PROPERTYELEMENT in parse rule PropertyElement ::= . PROPERTYELEMENT Content? ENDTAG..
Can anyone help me to solve this?
Is it because the reference to System.Windows.UIElement is not done?
Update 1
I have undone the above change and add the following in mainpage.xaml after installing slideview using package manager console
Install-Package SlideView
Here is the code...
<controls:SlideView>
<Grid Background="Teal"
Width="400" />
<Grid Background="Tomato" />
<Grid Background="LightYellow" />
<Grid Background="YellowGreen"
Width="400"/>
</controls:SlideView>
But I have another set of build errors as follows...
Error 1 The namespace prefix "controls" is not defined.
Error 2 SlideView is not supported in a Silverlight project.
Error 3 The namespace prefix "controls" is not defined.
Error 4 The
type 'controls:SlideView' was not found. Verify that you are not
missing an assembly reference and that all referenced assemblies have
been built.
Update 2
Got the above issue fixed, but I have some run time exceptions as following...
System.InvalidOperationException was unhandled by user code
HResult=-2146233079
Message=Operation is not valid due to the current state of the object.
Source=Microsoft.Phone
StackTrace:
at Microsoft.Phone.Controls.PhoneApplicationFrame..ctor()
at slidingmenu.App.InitializePhoneApplication()
at slidingmenu.App..ctor()
InnerException:
Regards
Sebastian
Try to nest your controls in parent control such as StackPanel. Most likely you have messed up the namespaces. What i would do? It will be to compare my code with a working one. CodePlex provides an example source for SlideView. Download it and see what are you missing.
Is the xml namespace defined?
xmlns:controls="clr-namespace:SlideView.Library;assembly=SlideView.Library"
xmlns:slideview3="clr-namespace:slideview3"
If LeftView is one of your controls.
<library:SlideApplicationFrame.LeftContent>
<slideview3:LeftView />
</library:SlideApplicationFrame.LeftContent>
I had the same issue in my (MvvmCross-) app.
I was able to resolve this by creating the RootFrame by code in App.xaml.cs instead of adding it in the Xaml:
private void InitializePhoneApplication()
{
var slideApplicationFrame = new SlideApplicationFrame
{
LeftContent = new LeftView(),
RightContent = new RightView()
};
this.RootFrame = slideApplicationFrame;
this.RootVisual = this.RootFrame;
this.RootFrame.Navigated += this.CompleteInitializePhoneApplication;
// Handle navigation failures
this.RootFrame.NavigationFailed += this.RootFrameNavigationFailed;
}
...and removed the whole <Application.RootVisual>...</Application.RootVisual> in App.xaml.

How do I use the new `console.log()` output of Chrome?

Chrome 24 has a new way of outputting objects in console.log().
For example, console.log($("p")); on this jsFiddle example outputs this insanity:
▼[<p>, <p>, <p>, prevObject: jQuery.fn.jQuery.init[1], context: #document, selector: "p"]
► 0: <p>
► 1: <p>
► 2: <p>
► context: #document
length: 3
► prevObject: jQuery.fn.jQuery.init[1]
selector: "p"
► __proto__: Object[0]
I can see that it puts the collection of DOM elements at the beginning. But if you try to expand even a simple <p> tag that is mostly empty, it throws up all over you:
▼ 0: <p>
accessKey: ""
align: ""
► attributes: NamedNodeMap
...
[stopping here for sanity's sake]
So how do I use all this information? My first instinct is to tame it down to how it used to look, but on second thought, there really is a lot of info in there that I might want to have access to. But I'm having a hard time understanding what I'm looking at. Much of it looks like jQuery values. Is this a list of every jQuery value that the object has (or doesn't have)?
Then there's the whole issue of the ► context: thing and the ► __proto__: thing. Once you start drilling down in __proto__ you will never stop. I think it goes infinitely down!
How can I begin to learn how to use this new output?
EDIT:
I actually just realized that I'm still using Chrome 23, this isn't something that was introduced in 24. Someone in this thread said it was a Chrome 24 issue, but maybe it's new in 23? At any rate, I only just recently started noticing this on jQuery objects.
EDIT 2: If you're just looking for how to log the old way, try this: (hat tip)
console.log.apply(console, $("div"));
In your demo fiddle, you are logging NodeLists or HTMLCollections. Each of the elements within a NodeList is represented as a numeric index 0, 1, 2, etc. 0 being the first in the NodeList if any elements exist in it.
When you expand the Elements you see all available properties of an HTML Element as defined in DOM Core 3 specification. Refer here for more information about this http://domenlightenment.com/#3.2 and for a list of all properties and their purposes go here: https://developer.mozilla.org/en-US/docs/DOM/element. None of this is new in Chrome.
What is new in the latest Chrome version is the top level logged object, so if you just opened the console and typed:
console.log(window)
Which for me when I just did it logged a preview of what the expanded window object it provides when logging it. So for example, you should see something like:
Window {is_minor: 5, bmi_ie6: false, careers_adselector: "div.hireme, div#hireme"...}
Other NodeLists properties listed below the Elements of the list:
context - the context of the selection - http://domenlightenment.com/#4.4
length - the number of Elements in the HTMLCollection
selector - the selector used to select the Element or NodeList
__proto__ - An Object's __proto__ property references the same object as its internal [[Prototype]] (often referred to as "the prototype"), which may be an object or null (in the case of Object.prototype.__proto__). For more info on this refer to: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/proto
I modified the fiddle slightly and should show the preview of the objects when you view the console http://jsfiddle.net/jaredwilli/H3YWq/2/
You can't really get rid of any of these things either, they're a part of the DOM and will exist always otherwise the NodeType of what you're looking at will be something other than an ElementNode.
I'm just as annoyed as you are with this change. I know this isn't ideal, but it will hopefully help you a little bit.
console.log($('p')[0]);
You may have seen that solution before, and then found it didn't work if you were in a loop for instance:
$('p').each(function(){
console.log($(this)[0]);
});
That doesn't end up giving you the result you were used to either, so I had to use ['context'] instead of [0] like this:
$('p').each(function(){
console.log($(this)['context']);
});
Again, I'm looking for a better solution myself, but I thought I'd share with you what I've found.
You want first element so use [0]
As another option, check out Firebug in Firefox. I know, I love chrome too and use it every day, but Firebug is a great plugin and I've never had an issue with it.

Issue migrating MVC3 Application to MVC4: Compiler Error Message: CS1513: } expected

This is a really weird error, I think it may be a razor bug. I'm using VS 2012, MVC4, Framework 4.5.
Following these instructions: http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806
I created a new MVC4 project and then I copied all my code (controllers, views, viewmodels) to it from the MVC3 project.
Eveything worked just fine, until I tested one View which has a custom helper and inside it it has one foreach, one switch, three if statements and then I call some other custom helpers in there too.
It's exactly the same code in both projects, in MVC3 it works, but in MVC4 it shows this message:
Compiler Error Message: CS1513: } expected
So I tried adding one curly bracket but it shows the same error, so I keep adding brackets and it won't stop telling me the same thing.
I googled this issue but I just found this question with no answer:
http://www.1771.in/asp-net-mvc-4-issues-migrating-mvc3-view-in-vs-2012-rc.html
has anyone experienced this issue?
The Razor parser of MVC4 is different from MVC3.
Razor v3 is having advanced parser features and on the other hand strict parsing compare to MVC3.
You may run into syntax error in view while converting MVC3 to MVC4 if you have not used razor syntaxes in correct manner.
Solution of some common razor code mistakes that are not allowed in Razor v2 are :
--> Avoid using server blocks in views unless there is variable declaration section.
Don’t : #{if(check){body}}
Recommended : #if(check){body}
--> Avoid using # when you are already in server scope.
Don’t : #if(#variable)
Recommended : #if(variable)
Don't : #{int a = #Model.Property }
Recommended : #{int a = Model.Property }
I had exactly the same issue.
In Razor MVC3 i was accessing the vars like this: #vSuggestion but in MVC4 the # is not necessary.
My example, i had this code in MVC3 working:
#{
var vSuggestion = ((dynamic)ViewData["suggestion"]);
}
<!-- more code here -->
#{ int suggestion = #vSuggestion;
switch (suggestion)
{
case Suggestion.INCORRECT_PASSWORD:
case Suggestion.USER_ALREADY_IN_DATABASE:
<span>Trata de iniciar sesión de nuevo</span><br />
<span>Recupera tu contraseña #Html.ActionLink("aquí", "Recover", "Account")</span>
break;
case Suggestion.EMAIL_DONT_EXISTS:
<span>Comprueba que el correo electrónico está bien escrito</span><br />
<span>Registrate (abajo)</span>
break;
}
}
In MVC4, Razor wasn't catching the first curly bracket from the switch statement. So i removed the # from #vSuggestion and razor parsed the code properly.
Hope it helps.
I ran into this "Expected }" issue as well and the culprit turned out to be an apostrophe in an HTML comment This seems like a bug in Razor.
Here is an example on how to reproduce this issue in the default MVC 4 application with VS 2012. Just add the following a comment with an apostrophe to the #section featured {} in the default.cshtml. Remove the apostrophe from the comment and it works OK.
#section featured {
<!-- hello world it's not cool -->
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1>#ViewBag.Title.</h1>
<h2>#ViewBag.Message</h2>
</hgroup>
<p>...</p>
</div>
</section>
}
This may be more of a long shot but sometimes if you are using a keyword it will cause that error
List of Keywords VS 2012
http://msdn.microsoft.com/en-us/library/x53a06bb%28v=vs.110%29.aspx
I know two of the new keywords are await and async for 4.5
See the following for an example of what I am talking about
http://www.wduffy.co.uk/blog/css-class-property-asp-net-mvc-htmlattributes/
Try to add this line in web.config
<compilation debug="true" batch="false">
Now, when getting the error you should be able to open the temporary generated .cs file and take a look at generated code.
Maybe then you will more easily spot the problem.
For details look here Debugging ASP.NET generated code
Most helpful thing to do that will solve 6/10 of these for you is in VS2012
File-> Source Control -> Advanced -> Format this Document.
This will solve any un-closed div's, conditional statements even ul's and li's which cause big errors for .net.
I experienced this error but narrowed it down to a missing slash to close a tag. this worked in MVC3:
#helper metatags()
{
<meta charset="utf-8">
}
but not in MVC4. it requires this:
#helper metatags()
{
<meta charset="utf-8" />
}