changes to xamarin mainpage are not effective on next run - xaml

I have created a Cross platform application to create an android application. In Main page I have a toolbar and listview that lists the data from sqlite database. it was working all well and now when I am trying to do change to the same screen to add some more controls, its not working when I run the project to debug. New controls are not visible on the screen. Its always showing the old screen as it is.

i don't have the rep to comment, but I've found that kind of scenario often with Android.
Changing UI components don't update.
When I do UI changes I'll often uninstall the app off the Android first, as the most reliable way, as I'm sure I've done the "clean solution", delete bin/obj folders and still had issues with the app on the droid not being fully updated to the new UI.

Related

Hot reload in VS2022 does not work when loading multiple projects

I know there are a lot of people reporting issues with hot reload on vs2022; I've done a lot of reading the past couple of days. However, my issue appears to be a little different than most.
I originally thought that I was having the same issues as others. But while working on my code I noticed at one point that the hot reload button on the .net Maui page was a green check, so it was working.
It then dawned on me that I was only running the .net Maui app and not loading the Azure functions that went along with it.
I right clicked on my solution and selected "Set Startup Projects" again and selected both the .net Maui and the Azure functions projects and sure enough, I had the red X for the XAML hot reload button.
So it appears the hot reload for me is working if I debug the .net Maui app without the azure functions running as well. But this leads to another issue, I can't get to some areas of the code in my .net Maui app without the azure functions providing the data back. This is a problem because I can't create the view and it's taking a lot of starts, stops, guessing what the XAML should be then repeating.
I guessed the issue has to do with both apps being debugged. And I was right, when I selected the azure functions app to start without debugging in the "Set Startup Projects" then I got the XAML hot reload option. This makes some of it better, but I would really like to be able to debug both apps at the same time as I work on data transmission.
Does anyone know how to get both started apps in debug mode and still have the XAML hot reload option available in VS2022 (17.3.6)?

VB.Net application highlights all files in background when running / getting focus

I have an App that I inherited in VB6 and have ported mostly to VB.net
When I compile / run the app - it highlights all the files in the current selected folder.
What makes it worse, is it's very difficult to search online as what search terms does one use?
The app was ported to VS 2005 - quite successfully - but this has me stumped...
I have tried commenting out all the code that's run on startup and it still does it, so it must be some sort of background thing...
Any ideas?
I can't find an old version of my app to see if it's changes I have made and I don't know where to begin. See the image:
The top part is before I run the app, the bottom is once the app is running and has focus. I hope it makes sense
Also, if I'm browsing and then run the app, and go back to the browser, when my app gets the focus again, the webpage goes back to the top...
The folder is just an example - Basically when I compile (or later run) my App, if I go to Windows Explorer - when the app gets focus - whatever folder I am in has all its files highlighted. If instead of going to Windows Explorer, I go to a web browser, when the app gets focus the browser goes to the top (similar to Home).
There is Windows Integratio, but I have commented out what I can and still am no closer.
Does this info help?
I found the problem - after going back to the vb6 project and removing everything except for the 5 modules needed to startup and I eventually tracked the problem.
There was some code being called when two edit boxes received focus which called send keys home and end - hence it would go home - select all files to the end. I had deactivated one of the edit boxes to not receive focus and it helped temporarily(obviously until the other box got focus), but since deactivating the send keys when they get focus has helped. Albeit an arbitrary problem, maybe it will help someone in the future..

Why does OSX/Cocoa dock icon revert to default before going away?

I'm working on wrapping some Cocoa functionality in an Objective-C library that will be called from a cross-platform C library. One of my goals is to provide someone who does development in C on Linux with the ability to deploy to OSX without having to get into XCode, nib files, etc. I want them to be able to compile and link their code on OSX using the command line tools, and end up with a regular resizeable main window with the usual buttons and so on, an application menu and a dock icon that looks and behaves as expected, etc.
I'm working on OSX 10.8.5. I have XCode 5.0 installed. Here's my gcc --version output:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
I've figured out how to present a main window, how to set up the application menu, and various other things, programmatically, without using XCode or any nib or plist, but I've run into a problem with the dock icon.
I set a custom dock icon image by calling:
[NSApp setApplicationIconImage:dockImage];
When the user quits the app, the dock icon image reverts to something else (some kind of default application icon or view), briefly, before going away. How can I prevent that from happening without using XCode to create a nib or a plist?
I've tried setting the activation policy of NSApp to prohibitted in the app delegate's applicationShouldTerminate method, to try to hide the dock icon before this switch back occurs. That didn't help, it does hide the window and the dock icon, but the dock icon still switches back to the default icon, briefly, as part of the process of hiding. I confirmed this by returning NSTerminateLator, and confirming that setting the activation policy to prohibited does cause the dock and the icon to hide even though the app is not terminating, and not setting it leaves it unhidden.
I've tried subclassing NSApplication and overriding the setApplicationIconImage call. I have confirmed that it is being called a second time, by something other than my code (well, or not directly by my code, anyway), just before the program exits. I've tried preventing the second call to it from working by calling the super function the first time, but not the second time, and I've confirmed that code in that function can prevent my code from changing the application icon, but that didn't fix the problem. It still happens anyway, somehow.
I've also tried removing the application badge, like this:
[[window dockTile] setShowsApplicationBadge: NO];
just in case it was something to do with that, but that didn't work. The docs say that app badges are no longer relevant as of 10.6, but I was grasping at straws.
Being stumped on the programmatic front, I'm now trying to find out how to package an .app from scratch,without using XCode, and see if maybe I can create a plist from scratch that has a reference to application image in it. But a programmatic solution would be preferable, as I'd really like to minimize what goes into the OSX-specific packaging of a deployment.
Another possibility might be to use XCode once, to produce a very generic, bare-bones .app that my deployment scripts copy and alter.
Please don't shoot my question down as being "too broad" or "not constructive" or something like that. I realize I'm reinventing wheels that already exist in various forms, but there's no law against trying to build a better mouse trap, or just a different or even a worse one, for that matter. I realize I'm trying to fix a problem that a lot of people would consider inconsequential, but XCode-produced apps don't have this problem, and I really don't want the tools I'm creating to produce any user-visible artifacts like that. I'm not intending to diss Apple's tool chain or invite debate about whether or not what I'm pursuing should be pursued. I have a specific, technical problem that I'm looking for solution to that is within the constraints of my goals.

Totally independent forms in tabcontrol

I'm designing an application on VB.net and I'm newbie as well.
I thought about the general architecture of the application and came up with the following idea.
the application is made of different modules
the user can run different modules in the same time
each module will run his main form in a different tab in tabcontrol
each module has his own modal forms, mode-less windows, messages, ... etc.
Before going through much development details, I started first with trying this design. Though, I couldn't first embed dynamically a form in tab during run time and even after some workarounds, I couldn't make the modules run perfectly in parallel. For example when I have a modal window displayed in a module, the whole application freezes while I expect only the related tab to freeze and be able to switch to the others to do some work.
Does anyone know how to make the tab contents completely separate and not have one freezes the other?
Thank you.
There's no need to have separate modules/forms to run more than one task simultaneously. The issue you are having with the UI freezing is you are running all operations on the primary thread. You need to multithread the application. Do a quick search on stackoverflow for multithreading vb.net. If you can't find anything let me know and I'll do the search and provide links.

Showing .dmg EULA when updating with Sparkle Framework

I always have an EULA attached to my DMGs. But my users now can only see it the first time they download my application.
Whenever they get an upgrade within the app through Sparkle framework, the EULA is not shown when the .dmg gets extracted by Sparkle. How can I make Sparkle show the EULA?
Since EULAs are important to you, I would recommend that you display it in your application. That way, a user could always refer to it. A simple dialog with a WebView should do the trick.
It should not take very long to write and to localize, and it's time better spent than trying to shoe-horn it into Sparkle.