MonoTouch: Default.png not being added to .app bundle - xamarin.ios

Using MonoTouch 4.0.4.1 and MonoDevelop 2.6b3
Our Default.png file is marked as "Content"
When we build the app, the resulting .app file when viewed using "Show Contents" in finder does not contain the Default.png.
The png is 320x480 32 bit
In previous versions the Default.png was being added correctly.
Has something changed?

There is a bug in the MonoDevelop beta releases that will not copy the content in root over to output. You can either use a post-build command to copy (and then resign!!!) the content or you can use the stable version of MonoDevelop (2.4.x)

Make sure you also set the "Copy to output directory" to "Copy if newer".

Ok guys, I guess i found a workaround, please give this a try
Im running MD 2.6RC1, in order to your content files are being included in the
final bundle, delete them from your project, then save your project close MD,
then reopen MD and add again your content files to your project, don't forget
to mark them as content ;)
this worked for me.
UPDATE:
This bug has been resolved, Just update to MonoDevelop 2.6 RC2
Alex

Related

javax.microedition.io.file does not exist in BlueJ

Trying j2me app development. I got a simple Hello to work, and a simple TextBox user as well. But when I tried to compile code for a file browser I got "javax.microedition.io.file does not exist".
The WTK according to the Sun website is supposed to include JSR75. And there's a camera demo .java file that uses it.
I've looked in various places (the WTK, BlueJ, even Netbeans) for menu options to turn it on. Nothing. And a search of this forum turned up exactly ONE message and it pertains to another IDE, and it seemed to work for him in BlueJ.
So what am I missing and how do I get it?
In NetBeans, you go to Project Properties (right-click the project, and select Properties). Then click "Platform" and mark "File Connection and PIM Optional Packages 1.0".
On a whim I did a search for JSR75 jar download and found a few zipped jar files that seemed to contain the file classes. I unzipped one of them and put it in the Libraries/Userlib directory of BlueJ; and now I seem to have the File... Classes. Reading and writing seem to work in the emulator.
I'll take another look at Netbeans when I get a chance.

Full package name instead of folder in Android Studio

FIXED IN AS 2.2.1
After update Android Studio to the 2.2 I've got this problem. It's hard to use such format with a small 13-inch display.
In Project view and Android view I get folders name as full packages name but I want to see just names of the directories:
I tried to search for this problem, but I only find "Compact empty middle packages" which impact only for a top level folder.
"Flatten packages" option creates tons of the directories, for every package making everything even worse:
One more screenshot:
In the Package/ Project or Androidview etc, Go to the gear icon on the right side and uncheck Flatten Packages and Compact Empty Middle Packages. This should show you the break down by directory instead of flattening it.
Note: This has now been fixed in Android Studio 2.2.1
AOSP - Issue Tracker:
Project structure view is showing full package names for sub packages when data binding is enabled.
https://code.google.com/p/android/issues/detail?id=222914
Check this configuration if Flatten Packages is not your desired solution:
Hope it will help

Paint.net outline object not working

I recently had to replace the hard drive in my computer and re-install Paint.net. I installed the latest version 3.5. When I copied my collection of plugin dll files (including outline Object) the Object option does not show up in the Effects menu. Any advice is appreciated.
Jerry
That's strange.
Have you checked 'Stylize' menu?
If it is not there, please re-install Paint.net, do not copy your plugins, download current release of this plugin from paint.net forum and check again.

Renaming Controller classes in MonoTouch MonoDevelop

What is the the best way to rename a class which inherits a UIViewController and has a designer.cs class linked to a storyboard?
I first tried to Rename the .cs file in MonoDevelop. This worked but the designer.cs file did not get renamed with it, and neither did the class name.
I then renamed the class name. This successfully changed the class name in both the .cs and .designer.cs files but still did not change the .designer.cs filename. It also did not change the name of the "Custom Class" for the controller in Xcode.
So in XCode I changed the name of the Custom Class and saved then switched back to MonoDevelop , to my horror it had created a new .cs with the same name as the renamed one and a new .designer.cs file which it put under the original (renamed) .cs file next to the old (not renamed) a.designer.cs file!
Can anyone tell me the sequence of steps I should have taken?
Renaming the file is tricky, since MD doesn't support renaming grouped files. You'd have to manually edit the csproj, or remove the files from the project, rename in Finder, and add them back.
Renaming the class is somewhat easier, but the key is to understand that the class actually has two names - the .NET name, and the Obj-C name. Renaming the .NET name should be easy, you can simply use the rename command in MD.
The Obj-C name is applied to the class on the [Register("SomeName")] attribute, and is the name that's used in xibs and in Xcode. However, beware that MonoDevelop will attempt to create .NET counterparts of any classes that it thinks were created in Xcode. This means you should change the Obj-C name in MonoDevelop first, then switch to Xcode and change the Custom Class there.
You have to go into the .csproj file and add a tag. For example:
<Compile Include="MainWindow.cs" />
<Compile Include="MainWindow.designer.cs">
<DependentUpon>MainWindow.cs</DependentUpon>
</Compile>
This will then show the correct relationship between the files in the MonoDevelop project window.
Incidentally, my experience so far is that this dependency is purely for convenience. Add the new designer.cs file into the solution and the code compiles just fine: dependency seems to be a sort of documentation.
ALSO: To delete or rename these dependent files, you can't do that in the MonoDevelop project pane: you do have to go to Finder (if you're in OSX, Explorer if you're in Windows) and deal with the files there, to rename or otherwise manipulate them, THEN repair the MonoDevelop csproj file by hand. The good news is, it's not hard, and it works fine when you do this, and you get a cool new hardcore understanding about how the project is knit together.
Many people also has to think about the version control system. This way works for me:
Quit MonoDevelop
In the version control system, rename the files
Open the csproj file in a text editor - search&replace
Open MonoDevelop
Open the XxxViewController.cs - search&replace
Open the XxxViewController.designer.cs - search&replace
Open the XxxViewController.xib - search&replace
You might be tempted to use Refactor/Rename instead of search & replace in step 5 but that will cause MonoDevelop to rename XxxViewController.designer.cs to XxxViewController_1.cs for some reason.
Also, you might be tempted to remove the files from the project before renaming them in the version control system and then add them back into your project again (so that you won't have to edit the csproj file manually). This will work but the "DependentUpon" part will disappear from the csproj file, which causes the designer file to not be below its counterpart. No big deal but it looks less nice in the Solution Explorer.
I tried all the solutions above and didn't work. Finally I just used the "Replace in Files" looking the whole solution. After that I did a "Rebuild" in the project and worked fine.

error RC2176 : old DIB in res\icon3.ico; pass it through SDKPAINT?

what is this Error, and how to resolve it?
I am using Visual studio 2005 for Smart device MFC developement,
Is upgrading to 2008 can solve my problem.
Error 85 error RC2176 : old DIB in res\icon3.ico; pass it through SDKPAINT
Thanks
this might help you:
http://www.axialis.com/tutorials/vistaicons.html
It looks like vista icons now use PNG headers. The error is slightly false though as its not an old DIB its just a header it doesn't recognize, PNG.
How was that icon created? Long ago Visual C++ 6.0 had its own little way of creating icon .ico files. Probably not using PNG so this might be the way to go is to find some program to emulate that and create an icon using the old DIB way. Or upgrading to 2008 :)
Actually there is another way not mentioned here in the other answers.
If you would install and integrate a more recent (same or later release date than VS 2008) SDK with VS 2005, that also resolves it. You can also go to C:\Program Files\Microsoft Visual Studio 8\VC\bin (or your equivalent of the path) and replace the files rcdll.dll and rc.exe with the ones from a more recent VS, WDK or SDK.
Side-note: the version of rcdll.dll and rc.exe must match, that is you need to copy both at once from your source (be it VS, WDK or SDK). For me any version starting with 6.0 or 6.1 worked. That's any version starting from the compilers that accompanied the Vista SDKs and VS versions or later.
There are actually 2 situations I've encountered that lead to this error RC2176.
As you probably know, a Windows .ICO file can contain multiple images for different sizes and color depth. VS2005 throws this error in at least two situations (unrelated to DIB)
.PNG images in the icon (as described in Codejoy's answer)
256x256 or larger images in the icon
By using GIMP to shrink the largest image size to 128x128, and avoiding .PNG, the problem is resolved with VS2005. Or, upgrade to a newer VS ;)
I had this problem in VS2012 for which I googled but didn't find anything else but this link to a MSDN site which talked about opening it up with sdk-paint , so in my project I doubleclicked the icon that was responsible for the error and deleted the PNG format and voila program started.
Greetz
Richard
The compressed/packed 256x256 was the problem for me. Once I unchecked the option to save as compressed (for Vista) in my icon editor app, the problem went away.
There is another situation I encountered which triggered the error, that is a corrupted PNG file. I've used the sed command to globally replace some strings in the project folder, and it just replaced the (looks liked) windows line ending to UNIX one, which caused my image files corrupted.
So, maybe there are some bugs in the PNG parser of MFC library, which cannot handle malformed input files.
Best resolution I have come across is from Axialis where they offer guidance of saving the ICO file in uncompressed PNG format.
https://www.axialis.com/docs/iw/How_to_use_a_Windows_Vista_Compressed_Icon_in_a_Software_Project.htm

Resources