addressComponents attribute on a GMSPlace object is not visible - google-maps-sdk-ios

the addressComponents property on a GMSPlace is private,not public, this is an bug or it's normal?
If is not a bug how do I take the property?
Thanks

It has been made public in the newer versions (I believe the change was introduced in version 1.12.2, if I remember correctly).

Related

Polymer 1.0: Does <iron-meta> support binding to dynamic variables?

I can get my <iron-meta> instance to work properly when using a static value. But when I bind the value to a dynamic variable (using {{}}) it <iron-meta> no longer behaves as expected.
Does <iron-meta> support binding its value to dynamic variables?
<iron-meta id="meta" key="info" value="foo/bar"></iron-meta> // works
<iron-meta id="meta" key="info" value="{{str}}"></iron-meta> // fails
Previous work
This question is a refinement of this question in order to clarify that the ONLY thing causing the problem is the change from a static string value to a dynamic string value binding. I was getting a lot of other suggesting that had nothing to do with the change from static to dynamic so I thought it might be best to rewrite the question to clarify that. But the entire code context is contained in the links there if that would help.
Alternative solutions
There has been some recent chatter about using <iron-localstorage>. Perhaps that is the best way to go for dynamic binding essentially creating global variables?
Yes, <iron-meta> does support binding to variables, but perhaps not in the way you think.
Example: http://plnkr.co/edit/QdNepDrg9b3eCTWF6oRO?p=preview
I looked through your code here, here, and here but I'm not entirely clear what your expectations are. Hopefully my attached repro might shed some light. I see you have declaratively bound <iron-meta id="meta" key="route" xvalue="foo-bar" value="{{route}}"></iron-meta> which is fine - when route changes, iron-meta's key="route" will update accordingly.
However, be aware that in Polymer 1.0, <iron-meta> is in essence a one-way bind from parent to child in the sense that you set a meta key value dynamically by binding to a property; but to get that value, you'll have to get it imperatively via iron-meta's byKey() method.
<iron-meta> is just a simple monostate pattern implementation without an in-built path notification mechanism. What this means is value changes do not propagate upwards. Therefore, doing something like
<!-- this does not work like the way you think -->
<iron-meta id="meta" key="foo" value="{{bar}}">
in order to get the value of foo, or listen to changes to foo, does not work. This behaves more like a setter, where you set the value of foo based on your data-bound property bar.
From what I gather, it seems that you're trying to implement some sort of global variable functionality. A monostate implementation used to work in Polymer 0.5, but not in 1.0. Unfortunately, until Google endorses a "best-practice" pattern for this, suggestions till-date seems a bit speculative to me. You might find this (Polymer 1.0 Global Variables) helpful.
I have had success using <iron-signals> to communicate global information. I know there is a warning in the <iron-signals> documentation that discourages its use for related elements, but when broadcasting a shared resource it seems just the thing. For example:
// source element
var db = SomeDB.init();
this.fire('iron-signal', { name: 'database', data: db });
<-- sink element -->
<iron-signals on-iron-signal-database="dbChange"></iron-signals>
class SinkElement {
dbChange(e, detail) {
this.db = detail;
this.db.getSomeData();
}
}

Property reflection to attribute broken on canary?

It was my understanding after reading this www.polymer-project.org/docs/polymer/polymer.html#attrreflection (sorry, not allowed to include more than two links), that Property values are reflected back into their attribute counterpart
That doesn't look to be the case in 37.0.2007.2 canary with experimental Web Platform features enabled.
For instance, have a look at the console http://jsbin.com/fihan/2/edit
Another example is in Eric's Bidelman video at 19min 58s:
I would expect the Element panel to update <demo-tab selected="0"> to <demo-tab selected="1">
Thanks !
This is a recent change on the Polymer side (not Chrome) where property values are no longer reflected back to their attribute value. It's now opt-in for perf. You need to use the publish block with reflect: true:
publish: {
foo: {value: 'foo', reflect: true}
}
http://jsbin.com/qavavina/1/edit
We have yet to get the documented :( https://github.com/Polymer/docs/issues/402

Remove warning : invalidAbsoluteTypeName in pointcut

I am using LoadTime weaving.
My aspect have been tested and are perfectly working.
I have several project in my workspace and i'm trying to clear some warning just to keep the "real one"
This code give me : [Xlint:invalidAbsoluteTypeName] Warning and i can't clear it with #SuppressAjWarnings
pointcut somePointcutName():
call(*someMethod(..)) &&
!adviceexecution();
So i'm wondering if there is a way to clear those
Thank alots!
Okay, I played around and I guess I know what happened there: Whatever kind of type signature you have in your call pointcut, it seems you used an absolute one, e.g.
* MyClass.doIt(..),
but you have not imported the class and thus cannot access it like that. So you either need
import com.foobar.my.package.MyClass
in your aspect or
* *..MyClass.doIt(..)
in your pointcut. I guess the Xlint warning is a bit cryptic, but basically that is what it means.

How to detect if browser supports "plaintext-only" value in contenteditable parameter?

I can't find any relevant information about "contenteditable" HTML5 parameter. I've found out, that Google Plus is using this for Chrome browsers:
<div contenteditable="plaintext-only"></div>
It seems that no other browsers support this and it's only Chrome proprietary value. I want to use it in my project. However, I need to detect the browser and find out if supports "plaintext-only" setting.
Of course, I could detect only Chrome, but there might be other browsers that support it (I don't know about any at this moment) or other main stream browsers might start supporting this feature in future.
So I would rather detect if the "plaintext-only" functionality is supported than detecting just Chrome browser.
Anyone can help me on this ?
Here's an alternative if you prefer not to rely on catching exceptions to detect features:
function supportsPlaintextEditables () {
var div = document.createElement('div');
div.setAttribute('contenteditable', 'PLAINTEXT-ONLY');
return div.contentEditable === 'plaintext-only';
}
console.log(supportsPlaintextEditables);
//-> true/false
This works because setting the value to the attribute instead of the property will not throw a SyntaxError exception if 'plaintext-only' is an invalid value, instead it will set the property value to the default, 'inherit'.
Getting the property after setting the attribute results in a lower-cased string, so setting the attribute value to 'PLAINTEXT-ONLY' will result in a property with the value 'plaintext-only' (supported/true) or 'inherit' (not supported/false).
It seems to be a webkit-only feature. The spec only allows "true", "false" and "inherit" as possible values for the attribute
A bug has been filed to add support for plaintext to the editing spec, but it's funny that the request is for "plaintext" instead of "plaintext-only".
Edit:
This code can be used to detect the support. Demo:
function supportsPlainText()
{
var d = document.createElement("div");
try {
d.contentEditable="PLAINtext-onLY";
} catch(e) {
return false;
}
return d.contentEditable=="plaintext-only";
}
alert(supportsPlainText());
But remember that doing browser-specific pages it's what leaded us to the IE6 problem.

FusionCharts + Prototype Modalbox + Google Chrome = Browser View Bug

I am hoping that someone can help shed some light on the underlying issue causing the bug that you see here:
As you can see, the FusionChart is incorrecly overlaying on top of the Modalbox when the it is opened. This issue only occurs in Google Chrome. All other browsers are ok.
Any ideas on the underlying issue here? And what can be done?
Last time I messed with overlaying a div on top of Flash (What is going on here) I could get it to work on all platforms except Linux. Are you using a Linux distribution? If not the solution is usually to add wmode="transparent" to the embed.
Otherwise, the only solution is to set .style.display="none"; on the FusionChart whenever the Modalbox is shown and .style.display=""; when the Modalbox is closed.
When Flash objects appear on top of every other HTML elements, it is most likely because the window mode (wMode) parameter of the Flash movie is set to "window".
In FusionCharts, one can set wMode in two ways:
A. Using .setTransparent() JavaScript function
setTransparent(false) changes the window mode to "opaque" and that solves the issue of FusionCharts appearing on top of modal windows and lightboxes.
setTransparent(true) also serves the same purpose. It sets wMode to "transparent". (Any value for wMode, except "window" would do the trick.)
Example JavaScript:
var myChart = new FusionCharts( "FusionCharts/Column3D.swf",
"myChartId", "400", "300", "0", "1" );
myChart.setXMLUrl("Data.xml");
myChart.setTransparent(false); // set wMode to opaque
myChart.render("chartContainer");
Since FusionCharts 3.2, setting setTransparent(null) restores wMode to "window" and you would NOT want to do that for your case! :)
B. Using wMode property during new FusionCharts construction
Also since FusionCharts 3.2 introduced object-style construction method, the value of wMode can be provided while doing new FusionCharts(...) itself by providing wMode: 'opaque'