I accidentally deleted a multi-image entry from the list in the Codename One theme designer and can no longer access the image from code (I get a NullPointerException) or the Designer & GUI Editor. The folder with the scaled images is still located in the res/theme folder for the project.
I would like to restore this entry in the list but every option I can find to add a multi (or any) image doesn't seem to be able to handle this case. How can I add a multi-image folder to the resource list?
Follow these steps to solve this:
Cut that multi-image folder and paste somewhere out of the res folder.
In your theme designer, add a dummy multi-image and rename it to match your required multi-image's name.
Save your theme designer and close it, now go to your res folder and delete the newly created multi-image folder that matches the name of the original one and copy the previous one you paste somewhere into the folder.
Open your theme.res and save again.
EDIT:
Second method:
Check XML Team Mode under File in your theme designer, close the designer without saving anything.
Make sure your multi-image folder is located in the res folder. Go to Netbeans and switch the projects navigation tab to Files and look for theme.xml under your project files tree and double click to edit, now add the below code right after <resource majorVersion="1" minorVersion="7" useXmlUI="false">
<image name="my-image-name.png" type="multi" />
Substitute your image name as necessary. Save the xml file and close it, then reopen your theme.res and change anything just to create a new "Save" .
Related
I am using Visual Studio 2017 to write some stuff in C. When I open a new project, I have some default filters and in "add" option for the project there's only filter and no folder/directory.
I want my project to have a folder structure, but can't add folders to the project in Visual Studio. Looking online I can only find solutions for adding an existing folder to a project and not adding a new one.
How can I add new folders to a Visual Studio C project?
How can I disable filters?
The way that I think of Visual Studio 2017 (earlier versions of the IDE as well) and its presentation of files in File View is as a kind of virtual file organizing system. File View allows you to logically organize files, presenting the actual file system in a more helpful manner.
The icons that look like folders in the File View are not really folders but are instead labels, called filters, which allow you to group your files however you like regardless of how they are physically stored in your persistent storage area such as a hard drive.
Filters are more flexible by not corresponding to the physical file folder hierarchy as they allow you to organize files that are all in a single folder into logical groups. Filters allow this to be done at a finer grain than is typically used by grouping files in folders. Filters also allow you to group files that are in multiple folders together into a single logical folder within File View.
However filters can be confusing because most of us are so accustomed to file folder hierarchies that the filter methodology can disconnect the logical file as represented in a Filter from the physical file location located in a folder.
My typical methods of adding files
Typically what I do is to create the physical folders through Windows or doing a clone of an existing Git or Subversion or VS Team Services source tree. With something new I may use the New Solution or New Project wizard to create my initial starting point and then organize and add files and folders physically through Windows and then go into the Visual Studio IDE to create the Filters and then Add existing files to the Filters. In some cases I will create sub-filters within a Filter in order to better organize the files within a physical Folder.
For new files I will just use the Add New Item menu option to add the item to the proper project. If you right click on a filter name, the new file will automatically be added to the filter. In some cases when I have added additional filters to the project to organize files, I will drag the newly created item to the proper filter and drop it there.
This drag and drop is not changing the physical location of the file but is changing its logical position by moving it from one filter to another. To move the file physically from one folder to another, I will usually do that with Windows. Just remember that if you do physically move a file with Windows you must also modify the file's entry in the Visual Studio 2017 filter to which it has been assigned, I usually do a Remove on the file followed by Add Existing Item and browse to its new location.
It appears you can not have the same file in multiple filters within the same project.
In some cases when I Add New item, I will change from the suggested folder displayed in the Add New Item dialog to a different folder using the Browse button. And if I need a different extension to the file then I will make that change as well, a common action when adding a new C source file to a project which requires changing the .cpp extension to .c.
You can also use the Browse button to navigate to a folder where you can then create a new folder if you like using the right click menu that displays when you do a right click in the displayed list of files and folders.
Unfortunately, the Add New Item dialog always wants to put a file into the project directory with all the other files. The Add Class wizard doesn't give you the opportunity to specify anything other than the default project folder. I have in some cases created C++ classes using the Visual Studio IDE, removed them from the project, moved the physical files to where I want them to be and then added them back to the project.
The filter approach seems to work well because the total solution is divided up into multiple projects and each project has its own physical folder. The multiple projects may correspond to particular DLLs or static libraries or other components that are used by the solution.
See also Can I configure Visual Studio to use real folders instead of filters in C++ projects?
Example screenshots of folder and filters
Here is a Windows folder view of a small project of the resources being used:
And this is how I have the filters set up. Normally the list of resource files can be quite long however I have created two sub-filters to logically separate out bitmap files from icon files though they both share the same physical resource folder.
Also the filter named PepIncludes corresponds with an actual physical folder named the same while the filters named "Header Files" and "Source Files" are groups of files that all reside in the same physical folder which is named the same as the project folder.
The following screen shot shows how filters can provide flexibility. I have a folder with include files, PepIncludes, and I have the same collection of files in two different projects within this Visual Studio 2017 solution. In a solution with 30 or 40 projects, this can make it a lot easier to manage files. For instance you can see that after modifying the file "ECR.h" the fact that it has been modified shows in both of the filter file listings (the small red check mark next to the name).
In my repository I have a folder containing some physical models. I accidently clicked on "Convert to a project" which converted the folder to a project and now my folder is a project and have a different Icon (A briefcase Icon instead of a folder Icon).
How can I switch back the project to a simple folder, is there an option to convert back?
Looking back at this question with PowerDesigner 16.6, there still isn't an option to undo the conversion.
However, you can create a new folder, and move the models under it...
So I have a word template that I am trying to populate within my wpf application. It works fine during development. However, when I try to edit the file after publishing/installing the application it no longer has the folder/files that were used in the development process.
What steps do I need to take to have files present after installation to manipulate, create, or delete files?
Right-click the file in VS Solution Explorer, then in file properties set Copy To Output Directory to Copy Always
Add that template as content in your solutions. You will find this from properties.
It is possible to export settings from one project and import them in another.
However, it seems that only "include Paths" and "Symbols" can be moved to a new project this way.
Is there any reliable way to copy all settings? Particularly I would like to copy the linker settings for my embedded ARM project.
I do not want copy the settings manually, as this is something that will have to be done often by at bunch of people.
The easiest way I've discovered to duplicate the settings for a project is to use another workspace. It takes a few steps to set up but you should only need to do it once.
1. Start a 2nd copy of eclipse and select or create a new workspace.
2. Import your baseline code.
3. Rename the project to something generic like NewProject
4. If your project has files you don't want to be imported into new projects delete them. I find it helpful to keep a few (like main.cpp)
Now back to your original workspace.
1. File->Import->Existing Projects into Workspace Next button
2. Use Browse... to go to your newly created workspace and select NewProject.
3. Check the Copy projects into workspace checkbox.
4. If you have warnings about the project already existing try clicking the Refresh button and make sure you don't have a folder in the current workspace with the same name. [ You can delete a project but not remove it from the hard disk so you have to make sure the intended folder name is not in use. ]
5. Rename the project to your desired name.
6. Start coding...
All the toolchain settings, include paths and library paths should be intact. It seems like a lot of work, but once you do it once its not too bad (as long as you can keep duplicating that one project).
This can be done in simple steps. Useful if you do not want to create new workspaces.
Open the project in the workspace.
Click on project and copy.
On the project tab area, paste the project.
Eclipse asks for a name, rename it to a new project.
Click Ok.
I have copied the deepzoom data created folder "Generated Images" into
a folder named "temp" in my VS2010 web project, but I am unable to see
the "Build" property of this ("temp") folder.
While compilation, VS2010 shows an error "'Build Action' not set to 'Resource'"
The build actions are only applied to files, not folders. You need to set the files to "Content", but why are they not under ClientBin where they would normally reside (and no such settings are required)?
You are basically adding a large number of data files to a website, for the DeepZoom component to download as required. This needs to be relative to the location of the XAP Silverlight application.
As you need to point your MultiScale image control at something it can reference, either put GeneratedImages (back) under ClientBin or change it to a full URL pointing at the location of the dcz_output.xml file (the controlling DeepZoom file).
I just put a deepZoom on my blog here to confirm the parameters needed. In that instance I dropped the whole generated image folder into DeepZoom/GeneratedImages on the site and reference it with path=DeepZoom/GeneratedImages/dzc_output.xml and it worked a treat. So you can put the deep zoom anywhere on a site, but make sure the URL reference matches.
I strongly recommend you never call a folder "temp" unless you are deleting it 5 minutes later :)