Hi,
On Fri, Jun 22, 2012 at 11:28 AM, Alex White <[email protected]> wrote:
> Hi,
>
> These are the issues I have encountered in the last few days, hopefully
> some of them have simple fixes.
>
> 1. why does IB loose all my outlets on some of the view controllers, there
> was one in particular where it did not matter what order I did things if I
> created a few outlets and then saved the information, closed IB, reopened
> IB the outlets were missing every time, I ended up having to create the
> view controller from scratch to fix the issue.
>
A few bugs have been fixed in MonoDevelop lately in this area, so this
might have been fixed already.
>
> 2. why can't IB rename outlets properly, I have seen a couple of different
> things happen, firstly where the .designer.cs does not get updated, so
> manual changes in there were required, another issue was if you delete
> something with an outlet attached then add something and want to create an
> outlet with the same name, sometimes it fails and other times it creates
> two references in the .h file.
>
> 3. why can't all references to a removed file e.g. an image file be found
> without having to search through the files, the build of the project works,
> and even runs on the simulator but not on a physical device.
>
This is a side-effect of how apps are installed on the device vs in the
simulator. In the simulator the contents of the app is copied to the target
directory, overwriting whatever is there (and leaving in place old files).
On the device the existing app is first removed, then the new one is
installed. Note that it is not MonoTouch that behaves like this, it's the
Apple API we use.
>
> 4. why can I build and run in the simulator an application but when it is
> run on the physical device I get errors like
>
> -[UIBarButtonItem UTF8String]: unrecognized selector sent to instance
> 0x421c450
>
> these errors don't occur on the simulator.
>
There are a number of reasons this can happen, I'd need to see concrete
sample code to say anything more.
>
> 5. using the tab bar out of the app delegate
>
> e.g. at the class level
>
> ReviseVCiPhone _tbRevise;
> OpenBikeListsVCiPhone _tbBikeLists;
> UINavigationController [] _navigationRoots;
> UITabBarController _tbController;
>
> inside finished launching
>
> _tbController = new UITabBarController();
> _tbRevise = new ReviseVCiPhone("Revise");
> _tbBikeLists = new OpenBikeListsVCiPhone("Open Bike Lists");
>
> _tbRevise.TabBarItem = new UITabBarItem("Revise", UIImage.FromBundle(
> "Images/Toolbar/Revise.png"), 0);
> _tbBikeLists.TabBarItem = new UITabBarItem("Bike Lists",
> UIImage.FromBundle("Images/Toolbar/Bike.png"),1);
>
> _navigationRoots = new UINavigationController [5] {
> new UINavigationController (_tbRevise) {
> TabBarItem = (UITabBarItem)_tbRevise.TabBarItem,
> } ,
> new UINavigationController (_tbBikeLists) {
> TabBarItem = (UITabBarItem)_tbBikeLists.TabBarItem,
> }
> }
>
I haven't tried this, but it looks like you create an array of 5 navigation
controllers, but only set the first two elements to something.
>
> _tbController.SetViewControllers(_navigationRoots, false);
> _window.RootViewController = _tbController;
>
> navigating seems to work fine if I go into the root view controllers, then
> from them into other view controllers, but once I then go 3 levels deep I
> get GC errors on the root view controllers, this problem is fixed if I do
> something like the following in the button click on the third level view
> controllers
>
> ViewBikeListVCiPhone _viewBikeList =
> newViewBikeListVCiPhone(_prevision_set,_description);
> this.NavigationController.PushViewController(_viewBikeList, false);
>
> surely this is not right, because if you set animate to true you are going
> forward not backwards if that makes sense.
>
As a last word I recommend filing bugs for all issues you find, that way
they won't end up lost in the mailing list and someone will fix it or
explain the problem.
Rolf
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch