How to open a `vscode://file` link inside a devcontainer? - vscode-remote

I'm trying to use the https://www.locatorjs.com tool. I'm using Remote - Containers VS Code extension and the link is generated correctly - it looks like this: vscode://file//workspaces/frontend/src/App.tsx:9:7. The path is correct but this is a path inside a container and, when clicked, VS Code is trying to open this path on a host and it fails.
Is it possible to force VS Code to open this link inside an existing window that is attached to a container?

Related

How do I find the source code, in VS code, for a component, after running and seeing it locally?

I am working on my first front-end project for someone and he send me the souce code to modify some buttons, but because is the first time for me, I cannot find them in the source code due to the app having a lot of files, is there any way to do this in a smart way ?
Open the folder that contains the project in VS Code. Click the search icon, type a fragment of the jsx used to render the component in question, like <MyButton and you should see all of the instances of it. Click on one to open it in the editor and then rightclick on <MyButton in the source code and click "Go to definition."
If you don't know the name of the component then you can do basically the same thing with the caption for the button or its image file name.

Is there anyway of opening html files directly at localhost on browser directly?

I know it sounds weird but what I want is to make some automation on machine. I want any html file would be opening from .../htdocs/* should open in browser with http://localhost/*. How would I achieve this ?
Problem is not that it is not loading but what I want is clicking on html file would be started on localhost//... path rather than c://... path.
I tried to search using batch job but I don't know how to code in it so I am trying to learn it though I'm not sure whether it serves my purpose or not.

Settting default import/export path Reactjs

I need to build like some sort of input where you can set an import/export default path. To demonstrate what I'm trying to build I will use Chrome's default download location as example.
If anyone have any idea how I can start tackling this it will be very helpful.
Btw, I want to build this with reactjs
UPDATE:
When you click on the CHANGE button it will open the file system where you can set the path where the downloads will go. I want to do exactly that. I'm building a report UI where you can export/import reports.

correct way to add js in sencha architect (ExtJS)?

This thread works well in a mobile app but in a desktop app it would seem I cant add the reference to the external JS in an extjs desktop app.
The instructions from Sencha somehow don't correspond or it doesn't work for me when I try and follow them. So, I am selecting Resources->Library and can see the attribute Include JavaScript (ticked) and Library Base Path:/ext.
The JS file I am using I use in a phone app and its fine - I added it to the app.json in that and compiling the app copies the file over to the target and defers the loading.
In this case with SA I am not seeing the file copied to the target - nor can I follow the instructions with SA 3 that are documented. The only way I can add an external JS is by dropping it onto the filesystem into the ext folder manually. Again, it doesn't appear in the target and certainly errors when I run the app with
Uncaught ReferenceError: hex_sha512 is not defined
This JS has been used in other apps, is proved and tested but just relates to SA or my wrong use of SA.
The proper way to add a resource in Sencha Architect, regardless of framework, is to add it as a JS resource.
This is most easily done by hitting ctrl-t (or cmd-t on a mac) and typing "js resource" (or some shortened string thereof to get autocompletion)...
Alternatively, you can use the toolbox, click "Resources", and drag out or double click "JS Resource"
These are just different user interfaces to accomplish the same task.
Once you've added your JS resource using one of the above methods, you need to set the URL in the config pane (at bottom right unless you've configured Architect to swap the left and right panes)...
The URL is to be set relative to your project folder. If you copy the JS file into your project root under a folder called "lib" for example, then you'd set the url config to "lib/foo.js" - where foo.js is the filename, of course.
Hope that helps!
My lack of understanding of the instructions or they are not clear:
It would seem the way to do it is take eyes up to the top right of SA and spot the + button as shown in the image.
Add the JS resource and scroll up because it may be hidden behind the property inspector.
On setting the url field under properties, the source of the JS appears in the main editing window.
Certainly works fine after the app is built.

How can I make a url embedded in the about dialog box appear as a hyperlink? (resource script .rc)

I have an application written in c that has no dialog box.
However, when you right click the icon you get a floating menu and from there you can choose the about option. This will open an about dialog box. I have inside a link to some webpage, that can be pressed- that will open a browser and navigate to the URL. However, I am unable to make that URL appear as a hyperlink (all that GUI related work is done via the resource .rc file only).
Does anyone know how to color that link in blue and underline to make it appear as a hyperlink through resource script only?
Thank you
I haven't tried this myself but it looks like you can use the CONTROL statement in the resource script to include the SysLink class (which requires common controls v6/Win XP, and will therefore mean you also need a manifest in your application). For more details see http://msdn.microsoft.com/en-us/library/bb760706%28VS.85%29.aspx.
However, you will need to handle the notification from the SysLink control in order to launch the browser and you would need to call InitCommonControlsEx() before the dialog resource is used. That might stop all your GUI work being done by the rc file.
Another alternative would be to register a new window class, subclass from the SysLink control and customise the window message that would normally send the click notification to the parent in order to launch the browser. You could then use your custom class name in a CONTROL statement in the rc file. You still have more work to do but all the GUI handling would be done for you.

Resources