What is the right value for nav_host_fragment? - kotlin

First of all, I am totally noob on Android Studio so please bear over with me.
I tried to resolve an error with nav_host_fragment, but obviously did something wrong and I get an error at this file:
<resources>
<item name="nav_host_fragment" type="id">"http://schemas.android.com/apk/res-auto"</item>
</resources>
What should I put instead of "http://schemas.android.com/apk/res-auto"?
Thanks for helping!

The navHostFragment should not be added inside resource tag.
The above code snippet is not correct.
Please thoroughly go through the document by clicking on below link and make changes to your code accordingly. This page also has a video which will help you even better.
Link:
Get started with the Navigation component
If you still face challenge, then please post all files and elaborate you issue in more detail.

Related

Fancytree Tooltip API

I have been using Fancytree quite successfully for several years. Of late a new requirement has arisen. I would like to change the tooltip for a node that is currently visible. Is there a way to do this? How? Using an API? I have tried changing the tooltip property of an existing Fancytree node. Strangely, this did not work. What will work? Thank you.
Over on Github, this was resolved by Mr. Wendt. He suggested calling node.renderTitle() after modifying node.tooltip (which was correct) and he found a typo in my code. See Github issue #1093

Magento 2, PageBuilder - adding custom content type

I'm trying to add custom content type to existing page builder module in Magento 2 following https://devdocs.magento.com/page-builder/docs/create-custom-content-type/overview.html
Bit of a problem that docs is kind of outdated, but the biggest issue for me right now, is that for some reason, panel with settings of content type is not loading. Console doesn't throw any errors and I'm not even sure how to debug this.
Normal behavior: https://drive.google.com/open?id=1OClPda-WGuc7idNogUnTz0wi4ZSk_Qu_
Behavior of custom content type (settings are not loading at all): https://drive.google.com/open?id=1I-IeTImec-M8DuLfgjiA193mhm0Fwtd8
Maybe someone already stumbled upon issue like this and know possible ways to solve it?
Ok I've found out what problem was, so I'm answering this question in case someone will need this in future.
Check your ui_component xml structure, I was having an issue with naming there (namespace was not correct), and that's why it was not loading.

Strange linkers and them not working with intellisense

All the docs about how to reference a form inside of a navigation form kept giving me odd code. VBA code using [ ] and !. I finally understand that the following code:
[Forms]![NavigationForm]![NavigationSubform].Form![cboCnty1]
was what I needed to resolve my issue. What I don't understand is why. It's so alien from everything else VBA that I know. It doesn't work with Intellisense either, which just made the journey to the right answer look like I was going the wrong way.
Why isn't it something more like:
Forms(NavigationForm).Controls("NavigationSubform").Controls("cboCnty1")
Ok, bad example, I know. But
Me.cboCnty1
would work find if the code wasn't in a module. I'm simply looking for greater understanding.

Ported OSX Obj-C/CG Screenshot Code to js-ctypes - crash on final line

I ported some objective-c/CoreGraphics code that takes a screenshot of multiple monitors but it's not working. The jsctypes guys won't be able to help because the section is just me answering questions lol
The objc/cg code is from here: https://stackoverflow.com/a/28247749/1828637
My jsctypes type/struct/declares are here: https://github.com/Noitidart/NativeShot/blob/mac-troubleshooting/modules/ostypes_mac.jsm
The jsctypes port is here: https://github.com/Noitidart/NativeShot/blob/mac-troubleshooting/modules/workers/MainWorker.js#L443-656
And the last line is line 643 which causes the crash:
var rez_writeToFile = ostypes.API('objc_msgSend')(data, ostypes.HELPER.sel('writeTofile:atomically:'), myNSStrings.get(OS.Path.join(OS.Constants.Path.desktopDir, 'full_ss.png')), ostypes.CONST.YES);
This coincides with the objectivec of
[data writeToFile:#"/tmp/screenshot.png" atomically:YES];
except i changed path to ...desktop/...png
I wrote to sepearte gists, to align the lines in text diff software to make sure I did everything.
Here is objc/cg: https://gist.github.com/Noitidart/8affcd8bee60d22dcb52
and here is jsctypes: https://gist.github.com/Noitidart/3d4a4e8df625dbea8cc1
I dont think i missed anything i dont know why it crashes on that final line
Do any of the ObjC/CG people see any type definition that is wrong or something that I missed (for example the ObjC code uses compound statments I'm not sure I understood/translated them correctly in the port).
Wowww so after struggling for like some hours then posting this I realize it right away haha
Casing typo in selector!! I had writeTofile:atomically instead of writeToFile:atomically!
If anyone would like to test this out, it's a simple firefox addon test case.
Install an addon that allows installing addons from github repos from here: https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/
Go to commit on this branch that works here: https://github.com/Noitidart/NativeShot/tree/f5f2e8606d3c5c657e901239d3ceb8c8c79a4494
Then click the "Add to Firefox" button at bottom right, below the "Download Zip" button
Click on the toolbar button icon that gets added to firefox, as seen in this screenshot: http://i.imgur.com/n7lSxje.png
Check desktop you now have a single png file with a screenshot of all the monitors, huge props to #KenThomas!

ICEfaces ace:fileEntry not working in Liferay portlet. Have a clue that needs explaining

Using LR 6.1.0-ce-ga1 and ICEfaces 3.2.0. Have this code in my xhtml:
<ace:panel>
<ace:fileEntry
required="true"
requiredMessage="You may not save if you have not selected a file."
fileEntryListener="#{profileBean.listener}"
maxFileCount="1"
maxFileCountMessage="Select one file, please."
useSessionSubdir="true"
immediate="true"
/>
</ace:panel>
First, the immediate doesn't work. listener in my bean never gets called. But that's maybe not as important as the following.
I have h:commandButton on the form. When I click it, I see what looks like the beginning of a progress bar drawn like it's going to display file upload progress. This is immediately covered by the following:
This box is often associated with ICEfaces push problems (I've been told by ICEfaces). I added icepush.jar to WEB-INF/lib, but it didn't help. What I'd prefer is not to have the alleged progress bar try to render at all.
So, would appreciate anyone's help in making this file upload work.
P.S., I've tried Tomahawk and plain Apache JSF 2.0, also. I'd like to get the ICEfaces version working, but I'm kind of open to any working solution, given my (Servlet 2.5-based) environment.
Thanks.
I would recommend that you look at the source code for the icefaces3-portlet demo, as it shows how to upload a file with ace:fileEntry in a portlet environment.