Where is this option? how to set the Main.as as Always Compile? The breakpoints and step by step function not work for me...
Open the Project panel (look in View menu if it's hidden), select the desired main class, and:
FD3: Right Click > Always Compile
FD4: Right Click > Set Document Class
In 'project properties' You have tab :'Compiler options' , first put text in 'Link report' option and compile , it will generate XML with compiled classes , than write additional Classes in file and put file in 'Load Externs'. Now compiler will include all classes from XML .
Related
as you see, the HTML content is not colorful, and it cannot autocomplete HTML tag
There are 2 ways to do that.
1) You could manually set the syntax to "Javascript React".
For that click on "Javascript" on the bottom right of your screen:
Then simply enter "react" and select it. After that you should have autocomplete for the html parts inside your render functions.
2) You can instruct VSCode to always open .js files as "javascriptreact". For that go to your settings and copy files.associations over to your local settings. Make sure it looks something like this and save:
"files.associations": {
"*.js": "javascriptreact"
}
Note on that one: This will always set the syntax to "javascriptreact" when you open .js files and might not always be what you want. A better solution would be to generally name react files as myfile.jsx. This way vscode will automatically set the syntax to "javascriptreact".
Hope this helps.
Save the file as .jsx ie (App.jsx) instead of .js
This is because you are saving the file as .js ie App.js.JavaScript files cannot understand HTML tags.
Another alternative is you can save in (.js) but your web pack should be configured in such a way that it should transpile it into .jsx.
For doing refer this - https://github.com/facebook/create-react-app
React understand javascript xml only.
Is there a built-in zen coding shortcut in PhpStorm to insert a <?php ?> tag? If not, how would I go about setting one?
No there is not, You can set it by Going to File -> Settings -> -- IDE Settings -- -> Live Templates -> Add And using the following values:-
Abbreviation: php
Group: user
Template Text: <?php $END$ ?>
Context: Check HTML
In PhpStorm2016.1 must change Applicable in Value to HTML .
Go to File -> Setting -> Editor -> Code Style -> Live Templates
On right sidebar click on "+" then :
Abbreviation : (for example) p
Template text :
Applicatin :change the value to HTMLl like befor
then click on ok .
In newer versions of PhpStorm(2019.* or higher) adding the shortcut is a little bit different.
First go to File -> Settings (or simply press CTRL + ALT + S). Open Editor tab and find Live Templates tab. Select PHP and click small blue plus icon at the right sidebar, select live template and:
Type shortcut on Abbreviation input.
Type <?php $END$ ?> on template text area.
Define applicable context like php and html.
If you want to expand with another key instead tab, you must define another expand key.
Click Apply and OK buttons. That's it.
Go to
File --> Settings --> Search & click Live Templates
Click + button on the right side
then click Live Template
lastly input following:
Abbreviation: PHP
Template Text: <?php $END$ ?>
Context: Check HTML
Click Apply then OK
Now type php and press tab in a php file
PHP tag (<?PHP ?>) will automatically generated
You can set it by going to File -> Settings -> -- IDE Settings -- -> Live Templates
and then input
Abbreviation: php
Group: user
Template Text: php $END$ ?>
Context:
Check HTML
In the past, there was a simple trick, to include the flex mxmlc module by adding the following line to the flash-cs4 makefile:
-include-libraries “/absolute/path/to/my/assets/assets.swc”
This gave you the ability to use getDefinitionByName, an helper function to access the embedded swc asset-library (instead of creating hand-written classes all assets).
Unfortunately, this has stopped working since flash-cs4. Does anybody know another solution?
Unfortunately, the only workaround I have found is to explicitly refer each of asset classes somewhere in the code. You may create dummy class like this:
public class AssetsExporter extends Sprite
{
public static function export()
{
AssetClass1;
AssetClass2;
//etc
trace( "DEBUG AssetsExporter.export()" );
}
}
Specify this class as Document class in Flash IDE, so it will be compiled into the resulting swc. Then in the main code of your application call
AssetsExporter.export();
After doing this you will be able to use getDefinitionByName().
You can add them to the libraries in the publish settings.
(Image from http://wiki.gigya.com/ via Google Images)
By the way, if you use SWC files, you can also do
new somepackage.SomeClass();
instead of
new getDefinitionByName("somepackage.SomeClass")
where applicable. This is because SWC files are included at compile time, not runtime.
Even though you can change a compiler setting manually, its easy if you are using FlashDevelop as this is very simple to fix.
Right click your included swc from the Project list. Choose options then "include library (complete library)".
..you can now use getDefinitionByName to get an unreferenced class from your swc file.
Im having problems with classpaths. I have used them before with "import" but I'm not able to link a class directly to symbol in the library.
I have a class c:/myfolder/src/myclass.as . In prefernces > AS3 settings, I have c:/myfolder/ as default classpath. I click linkage on the symbol and enter src.myclass . When I click the checkmark, it says 'class not found'. I am able to do: *import src.myclass; and attach the class to an instance on th stage. That works fine, but thats not what I need to do.
It's weird to use src as a package. Typically you'd set your preferences to c:/myfolder/src then put your top level package in there, but...
Check and make sure your file MyClass looks like this:
package src {
public class MyClass {
...
}
}
If it doesn't then you need to make sure your package matches the directories under your source directory (c:/myfolders).
Also you probably need to include the fully qualified package on the embed tag.
I found the answer. In preferences > AS3 settings the folder "c:\myfolder\" was below ".\". Once I moved it above, it saw the definition normally.
Am doing project in j2ee.I use Browse button. I need to fetch images/files from a folder inside my project folder, everytime.I wish to set my project's folder name as a default location for my browse button.How to do that?
am using tis following code in a jsp page:
and calling the value in servlet :
String image= (String) request.getParameter("img");
while browsing ,the whole path is getting displayed but only the name of the image is passing as value in the sevlet.How to get the entire path? or how to set my project folder as default location while browsing?
If this is rendering a standard
<input type="file".../>
Then you have no control over the default directory.
Using flash gains you a bit more control (filetype preset, single/multiple file selection etc.)
I'm not sure if Java Applets have more access/options, hopefully someone can advise.
PS. for the standard input tag, the browser will remember the last location you used, so you only need to navigate once, if you are uploading several files from the same directory.
I actually solved this problem with an interesting trick. Here's how...
Create an external vbscript include file called vbshelper.inc which contains the following code:
function stuffKeys(x)
Set wshShell = CreateObject("WScript.Shell")
wshShell.Sendkeys(x)
end function
Inside your HTML code header, place the following line as your first < Script> element...
< Script type="text/VBScript src="vbshelper.inc">
later, in your HTML code, create the button like this...
< input type="File" id="srcFile" onchange="go_do_something()" onclick="stuffkeys(' C:\Temp\*.txt~')">
Note the space before the C in ' C:\Temp*.txt~' and the tilde ~ after the .txt.