[MonoTouch] NSNotificationCenter.DefaultCenter.AddObserver - iOS5 problem
Hi everyone, I'm just throwing this out there to see if anyone has a similar experience. We have an existing iOS4 app ~ it's been live for a year ~ that crashes on startup in iOS5 b7 Debugging it shows that all our notificationcenter objects are null when we try to remove them (whereas in iOS4 they are obviously fine). We are using the [Obsolete]AddObserver(string,action) method to 'create' the observers and they work fine in iOS4. Example code: NSObject ObserverDownloadableMagsUpdated; public void ViewWillAppear() { ObserverDownloadableMagsUpdated = NSNotificationCenter.DefaultCenter .AddObserver(Constants.Notification_DownloadableMagsReceived , notification = { /* does stuff */ } and public void ViewWillDisappear() { NSNotificationCenter.DefaultCenter.RemoveObserver( ObserverDownloadableMagsUpdated); in iOS5, ObserverDownloadableMagsUpdated is null and the RemoveObserver call causes a crash in ViewWillDisappear. Thoughts? cd ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Twitter without UI - only code
Apple's doco says: Although you may perform Twitter requests on behalf of the user, *you cannot append text, images, or URLs to tweets without the user’s knowledge*. Hence, you can set the initial text and other content before presenting the tweet to the user but cannot change the tweet after the user views it. All of the methods used to set the content of the tweet return a Boolean value. The methods return NO if the content doesn’t fit in the tweet or the view was already presented to the user and the tweet can no longer be changed. https://developer.apple.com/library/ios/#documentation/Twitter/Reference/TWTweetSheetViewControllerClassRef/Reference/Reference.html#//apple_ref/doc/uid/TP40010943 Sorry! On Sat, Oct 15, 2011 at 11:15 AM, ric3kg rickgr...@mac.com wrote: I'm able to send Facebook posts in code, send email with SMTP classes... If the user enters their Twitter credentials, why shouldn't I be able to use that to post from within my app. Given they agree to the EULA... My app is for disabled folks who have enough trouble with simple tasks. We are trying to make the process more accessible to those who have difficulty with day-to-day tasks. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Twitter-without-UI-only-code-tp3906383p3906577.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Best practice for leveraging existing C# library projects
We have been successfully using SvnBridge (from Codeplex) for 18+ months. Makes TFS looks like SVN, you can then use MD SVN integration or the excellent VersionsApp for source control on the Mac. No thoughts on build server tho' sorry On Dec 8, 2011, at 8:48 PM, Nic Wise n...@fastchicken.co.nz wrote: The TFS question comes up quite a lot. the usual result is: 1. Use something else. 2. Use Teamprise, or whatever it is Microsoft calls it. It's a cross platform TFS client for Mac and Unix, which was developed originally by the people who did SourceGear Vault. And I doubt you'll get a TFS build server for it, as it would need to run on the Mac (for MonoTouch anyway - MFA might work), and I doubt MS have a Mac build agent. But I could be wrong - I've managed to avoid TFS for my career so far. On Wed, Dec 7, 2011 at 21:57, sisnaz jdeg...@comcast.net wrote: This is an interesting topic and nice response. My company is going to be in this situation soon as we get deeper in bed with MD as we're also very VS centric. Especially since we're now evaluating Mono Android and your new Mono.Mobile. Do you have any resources, blogs, articles etc to research on the practices you've outlined? Also do you have any recommendations for TFS plugins and build servers for use with MD? - There was only 1 trilogy -- View this message in context: http://monotouch.2284126.n4.nabble.com/Best-practice-for-leveraging-existing-C-library-projects-tp4163295p4170675.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Storyboard - Properly adding a new UIViewController
Specifically, Miguel links to the iOS intro doco http://docs.xamarin.com/ios/tutorials/Introduction_to_iOS_5 (scroll waaay down, to the Storyboard section, and sample ziphttp://docs.xamarin.com/@api/deki/files/323/=Storyboard.zip ) In particular, read around the line *Viewing the class is not just a convenience in this article – you MUST switch back to MonoDevelop to see the stub created, as this also generates the .h file that we are going to use in the next step!* To get MonoDevelop and XCode working in-sync, you will need to switch back forth. I would recommend doing the steps from scratch, 'as shown', to get the hang of it; then go and apply to your app. Trust me - it should definitely, positively, (probably) work ;-) HTH On Wed, Dec 21, 2011 at 10:46 AM, Jeff Stedfast j...@xamarin.com wrote: Hi Mike, You should be able to create all of this from within Xcode w/o needing to manually write any code. I thought Miguel made a screencast showing how to wire up storyboards and have them just work on MonoTouch, but I can't find it. Basically, just do what you'd do in Xcode and MonoDevelop will import the stuff and it should Just Work(tm). The following blog provides some links to a sample and the docs which you may find helpful. http://tirania.org/monomac/archive/2011/Oct-13.html Hope that helps, Jeff On Mon, Dec 19, 2011 at 9:54 AM, QMIMike mca...@qmiusa.com wrote: I have been searching through documentation, blogs, and I have posted on StackOverflow for nearly a week. I don't think this should be difficult, I just don't see where it is documented on how to do it. I can't do it within the Storyboard (Xcode). It won't create the proper .cs files that MonoDevelop can access. I can do it within MonoDevelop, but I get a .nib file. I finally deleted the .nib file and set the ViewController properties in Xcode to the proper ViewController. I setup my button and ctrl-Dragged to create a push Segue. But when I debug, I get the error; -[QMIContractorsViewController btnMoveToPictureViewController:]: unrecognized selector sent to instance 0xbbee660 I also tried doing it manually in a button trying to follow some example online and that did not work either. I would really like to use the new Storyboard features, but I need a demo, or some code to reference. Any help you could provide would be appreciated. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Storyboard-Properly-adding-a-new-UIViewController-tp4214368p4214368.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Release 5.1.1 Question - Support for iOS 5.0.1's skip file from being backed up to iCloud
Have you already seen 'Technical QA QA1719' regarding this feature of iOS 5.0.1? https://developer.apple.com/library/ios/#qa/qa1719/_index.html#//apple_ref/doc/uid/DTS40011342 As it says Whenever you create a file or folder that should not be backed up, write the data to the file and then call this method which sets a file attribute that the operating system looks at when backing up to iTunes/iCloud. All your other file operations remain the same - just remember to set for each new file/folder. Xamarin has kindly provided the complete get/set methods as of MT 5.0.3http://ios.xamarin.com/Releases/MonoTouch_5/MonoTouch_5.0/5.0.2-to-5.0.3 MonoTouch.Foundation.NSFileManager public static bool GetSkipBackupAttribute (string filename); public static bool GetSkipBackupAttribute (string filename, out NSError error); public static NSError SetSkipBackupAttribute (string filename, bool skipBackup); Apple's docs also provide some guidance on where to store various types of files, also discussed on the Xamarin docs sitehttp://docs.xamarin.com/ios/tutorials/Working_with_the_File_System#Application_Directories . HTH Craig On Thu, Jan 5, 2012 at 7:04 AM, Danny Pronk da...@familie-pronk.nl wrote: It seems like Xamarin have physic powers. Today I heard that my app was rejected due to the fact that I have left to many files being backed up to the iCloud :-) Also today I read in the 5.1.1 release that support for iOS 5.0.1's skip file form being backed up to iCloud has been integrated ! Can anybody please tell me how to use this feature on files that I place in the personal storage directory please…. Regards Danny ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Pushing Monotouch.Dialog.DialogViewController - No back button
Felix, DialogViewController ctor has an optional parameter pushing, if you pass true then the back button will show. In my case i subclass DialogViewController, so i've got this - notice the third param in the base() call public ExhibitorsScreen () : base (UITableViewStyle.Plain, null, true) { EnableSearch = true; // requires ExhibitorElement to implement Matches() } If you are creating a DialogViewController in-line with a RootElement, * pushing* is second arg. HTH cd On Wed, Feb 15, 2012 at 9:35 AM, Felix Collins fe...@intranel.com wrote: Hi, I've got a couple of UITableViewController based views that I push onto a UINavigationController just like the multiscreen tutorial example. That all works fine. I'm trying out Monotouch.Dialog so I created a DialogViewController based view and pushed that onto the UINavigationController. It shows up okay but no back button is shown. This seems to be a common enough problem in iOS judging by google results. Mostly the problem is that the previous view did not have Title set, mine does. I've also tried explicitly calling NavigationItem.**SetHidesBackButton(false,true) in my DialogViewController based view. I'm running out of ideas. Has anyone run into this? Regards, Felix __**_ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/**mailman/listinfo/monotouchhttp://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] App local file access
Dean, hopefully this helps a little: http://docs.xamarin.com/ios/tutorials/Working_with_the_File_System#Application_Directories you are correct, anything embedded in your app is in the 'app bundle', which is readonly on the device. there are a few other folders available for you to store data - in your case i think /Library/ makes more sense than /Documents/ finally (and don't quote me on this), i *think* i read somewhere that notification sounds _do_ need to be in the app-bundle ~ the only way to ensure they are definitely available. i could be wrong (frequently am) hth cd On Wed, Feb 22, 2012 at 3:19 PM, Dean Cleaver dean.clea...@xceptionsoftware.com wrote: Hi, ** ** Because of the 20MB limit on app size for download over mobile broadband, we’re trying to reduce the size of our app. One easy win is to remove the 5MB of sound files from the app, and download them on first run of the app. ** ** Currently they’re in a “Sounds” folder, but I presume that location will be read only on the device? From what I have managed to find online, the read/write area is “Documents” so I should be able to save them there, and play them from there I presume. ** ** Does that mean that if I currently use Apple push to play the sound file “Sounds/Electrical.caf” can I now change that to “Documents/Electrical.caf” and that will work? Or have I missed something? ** ** I’ve tried googling the file structure of an app, but haven’t found the right search terms yet. ** ** Dino ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Threading best practice
Miguel's ImageLoader (from TweetStation, in MonoTouch.Dialog) does something like that. https://github.com/migueldeicaza/MonoTouch.Dialog/blob/master/MonoTouch.Dialog/Utilities/ImageLoader.cs ...might be worth a read On Thu, Feb 23, 2012 at 8:57 AM, Tomasz Cielecki tom...@ostebaronen.dkwrote: My thoughts about this are as follows. Investigate if your web requests can be done asynchronously. If that is possible you could do something along this road: -Have a queue with the 100 requests. -Start a background thread with that keeps an eye on how many requests are in progress -Inside the thread start the async requests one by one untill you have reached your limit. -When each of the requests call back update the status of how many requests are in progress. -End the whole thing when you are done processing. I think that it how I would approach it. From: MojoDK Sent: 22/02/2012 21:13 To: monotouch@lists.ximian.com Subject: [MonoTouch] Threading best practice Hi, I need to do about 100 WebClient.DownloadString(x) as fast as possible. Threading is not my strongest side, so I ask for your help. What is best practice in MT for doing 100 webrequest as fast as possible? My idea was something like (I haven't tested it)... private void StartWebRequets () { for (int i = 0; i 100; i++) { ThreadPool.QueueUserWorkItem(DoQueryWeb, i); } } private void DoQueryWeb(object state) { int i = state as int; WebClient client = new WebClient(); string html = client.DownloadString(my url); InvokeOnMainThread(delegate { // Do main thread stuff here }); } My worries is that firing 100 webrequests will kill the app. How would you solve it? Can I tell ThreadPool to only do like 3-4 at a time? Thanks!! Mojo -- View this message in context: http://monotouch.2284126.n4.nabble.com/Threading-best-practice-tp4411605p4411605.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] MonoTouch.Dialog Pull-to-Refresh
Brett, short answer: attach the handler in the ctor. TL;DR the code at DialogViewController.cs line 63 is this (MonoTouch.Dialog source is on github https://github.com/migueldeicaza/MonoTouch.Dialog/): if (tableView != null) throw new ArgumentException (You should set the handler before the controller is shown); * * i guess adding the handler after the tableView has been created is too late for the MT.D core to wire it up p.s. i'm not sure you need the NSTimer - i think in Miguel's sample that's just to create a delay to simulate network activity. in your implementation just do work to reload your data and call ReloadComplete() when you are finished. p.p.s. the MWC app sample implements pull-to-refresh in News Twitter screens, also on githubhttps://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/Screens/Common/News/NewsScreen.cs HTH cd On Mon, Feb 27, 2012 at 12:27 PM, Brett Spurrier brett.spurr...@gmail.comwrote: Hi Jason, this is a DialogViewController(). So I implemented a new instance of the DialogViewController, then put that block of code in the ViewDidLoad() method. The app just shuts down stating an exception at DialogViewController.cs line 63. I have no idea what that means though. MD certainly doesn't pronounce the exception very well if one is fired. Any thoughts? Is there a particular order to where I should include the RefreshRequested block of code? Cheers, Brett On Sun, Feb 26, 2012 at 8:24 PM, Jason Awbrey ja...@awbrey.net wrote: what context are you doing this in (ie, what is this - a class derived from DVC, or something else?) what specifically is the error when it crashes? On Sun, Feb 26, 2012 at 6:29 PM, Brett Spurrier brett.spurr...@gmail.com wrote: Hi all, I have a DialogViewController which I am trying to implement the Pull-to-Refresh functions. However, everytime I add the line: this.RefreshRequested += delegate { NSTimer.CreateScheduledTimer (1, delegate { this.ReloadComplete(); } ); } ; it crashes. I've been trying to follow the example at: https://github.com/migueldeicaza/MonoTouch.Dialog/blob/master/Sample/DemoRefresh.cs which works when I run the sample project. But when I try to move the logi to my own app, it crashes. The Table displays just fine. It's only when I add the RefreshRequested handler that it crashes. Does anyone have any experience with this? Many thanks! Brett ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] writing a photo (jpeg) to Photo Album
UIImagePicker docohttps://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerControllerDelegate_Protocol/UIImagePickerControllerDelegate/UIImagePickerControllerDelegate.html#//apple_ref/occ/intfm/UIImagePickerControllerDelegate/imagePickerController:didFinishPickingMediaWithInfo:says UIImagePickerControllerMediaMetadata Metadata for a newly-captured photograph. The value for this key is an NSDictionaryhttps://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/Reference/Reference.html#//apple_ref/occ/cl/NSDictionary object that contains the metadata of the photo that was just captured. To store the metadata along with the image in the Camera Roll, use the writeImageToSavedPhotosAlbum:metadata:completionBlock:https://developer.apple.com/library/ios/documentation/AssetsLibrary/Reference/ALAssetsLibrary_Class/Reference/Reference.html#//apple_ref/occ/instm/ALAssetsLibrary/writeImageToSavedPhotosAlbum:metadata:completionBlock: method of the Assets Library framework. Here is a quick sample - the metadata is definitely preserved ( http://imgur.com/rV2SV). notice, however, the fileinfo on the right - that photo was captured and saved with an empty NSDictionary - so The image already has embedded metadata isn't really true (ie. UIImage only contains image data, the metadata comes back from the camera separately). cameraButton = UIButton.FromType (UIButtonType.RoundedRect); cameraButton.Frame = new RectangleF(10, 320, 60,30); cameraButton.SetTitle (Camera, UIControlState.Normal); cameraButton.TouchUpInside += (sender, e) = { // https://raw.github.com/migueldeicaza/TweetStation/master/TweetStation/UI/Camera.cs TweetStation.Camera.TakePicture (this, (obj) ={ // https://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerControllerDelegate_Protocol/UIImagePickerControllerDelegate/UIImagePickerControllerDelegate.html#//apple_ref/occ/intfm/UIImagePickerControllerDelegate/imagePickerController:didFinishPickingMediaWithInfo : var photo = obj.ValueForKey(new NSString( UIImagePickerControllerOriginalImage)) as UIImage; var meta = obj.ValueForKey(new NSString( UIImagePickerControllerMediaMetadata)) as NSDictionary; ALAssetsLibrary library = new ALAssetsLibrary(); // parameters need to be prepared here library.WriteImageToSavedPhotosAlbum (photo.CGImage, meta, (assetUrl, error) ={ Console.WriteLine (assetUrl:+assetUrl); } ); } ); }; View.Add (cameraButton); HTH cd On Thu, Mar 8, 2012 at 6:21 AM, Jason Awbrey ja...@awbrey.net wrote: according to the docs, the tags in the Dictionary you pass in will get merged with any tags already embedded in the image. If there is a conflict the new tags in the dictionary overwrite the tags already embedded in the image On Wed, Mar 7, 2012 at 12:12 PM, jGoff i...@goffs.net wrote: Does anyone have a code snippet the shows how to use the ALAssetsLibrary class for saving a JPEG file. I previously used the SaveToPhotosAlbum method in UIImage, but since it does not preserve the embedded metadata, I'm pretty sure I have to switch to WriteImageToSavedPhotosAlbum. The beginning would be: using MonoTouch.AssetsLibrary; ... ALAssetsLibrary library = new ALAssetsLibrary(); // parameters need to be prepared here library.WriteImageToSavedPhotosAlbum( -- But then what? I'm a little confused that it wants me to pass in the metadata. The image already has embedded metadata. Do I have have to extract it, so I can pass it back in? Also since it indicates that using imageData of Type UIImage is obsolete, which is the correct Type? Assistance doing this seemingly simple task would be greatly appreciated. Thanks. -- View this message in context: http://monotouch.2284126.n4.nabble.com/writing-a-photo-jpeg-to-Photo-Album-tp4454061p4454061.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Strange issue with double values in a Dictionary
iPhone4s, iOS5.0.1 everything looks fine to me... http://imgur.com/VOfp6 On Thu, Mar 8, 2012 at 8:53 PM, HairyJohn m...@johnhair.com wrote: Can somebody try this code on an actual device please? Driving me nutty. Dictionaryint, double test = new Dictionaryint, double(); test[0] = 100; test[1] = 200; test[2] = 300; test[3] = 400; Console.Out.WriteLine(test[1]); Put a breakpoint on the Console.Out and evaluate the contents of the dictionary. The values appear to be random, each time you evaluate a value it can be different, or zero. Thanks! Hairy -- View this message in context: http://monotouch.2284126.n4.nabble.com/Strange-issue-with-double-values-in-a-Dictionary-tp4445684p4456011.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Problem with UISegmentedControl on iPad
What iOS version is your iPad running? ApportionsSegmentWidthsByContent is iOS5 only. Using that property seems to work on my iPad with iOS5.1 installed... You could try something like this to avoid 'unknown selector' errors if (*yourSegmentedControl*.RespondsToSelector(new MonoTouch.ObjCRuntime.Selector(apportionsSegmentWidthsByContent))) { mapTypes.ApportionsSegmentWidthsByContent = true; } Roy - i think obj-c properties follow that standard where the getter has the 'name' of the property and the setter has the 'set' prefix... HTH cd On Tue, Mar 20, 2012 at 8:17 AM, Dean Cleaver dean.clea...@xceptionsoftware.com wrote: Am trying to set the UISegmentedControl to ApportionsSegmentWidthsByContent = true and it crashes on the iPad - doesn't crash in the simulator (iPhone) nor on my iPhone devices. Any ideas why the difference? MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UISegmentedControl setApportionsSegmentWidthsByContent:]: unrecognized selector sent to instance 0x868fc80 at MonoTouch.UIKit.UISegmentedControl.set_ApportionsSegmentWidthsByContent (Boolean value) [0x0] in filename unknown:0 at KleverLogic.FlashValet.iPhone.Valet.Common.ReceiptViewController.ViewDidLoad () [0x00374] in /xsl-home/kleverlogic/FlashValet/Mobile/iPhone/Valet/Common/ReceiptViewController.cs:103 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] MonoDevelop 2.8.8.2 / MonoTouch dll Output Folder Error
Not sure why 2.8.8.2 is packaging 'Library Projects' as app bundles, but another tacky workaround is to 'show contents' of the .app file it is generating and copy the DLL out into the same folder, then rebuild. WARNING: rebuilds won't pick up the latest - you would need to do this manually after every build, then build again (if that makes sense). On Fri, Mar 23, 2012 at 8:36 AM, Nic Wise n...@fastchicken.co.nz wrote: Work around: http://download.xamarin.com/monodevelop/Mac/MonoDevelop-2.8.8.1.dmg which is from here: http://monodevelop.com/Download All I have to say is: whoever designed MD to be just drop the .app into the folder deserves a medal :) :) On Thu, Mar 22, 2012 at 21:34, Nic Wise n...@fastchicken.co.nz wrote: Same same here. Build complete -- 0 errors, 9 warnings Building: Common (TestFlight|iPhone) Performing main compilation... /Developer/MonoTouch/usr/bin/smcs /noconfig /out:/Users/nic/code/git/MicroAgent/Common/bin/iPhone/TestFlight/Common.dll /r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll /r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll /r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll /r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll /r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll /r:/Users/nic/code/git/MicroAgent/libs/ATMHud.dll /r:/Users/nic/code/git/MicroAgent/libs/TestFlight.dll /r:/Users/nic/code/git/MicroAgent/extern/MonoTouch.Dialog/MonoTouch.Dialog/bin/iPhone/Release/MonoTouchDialog.app/MonoTouch.Dialog.dll /nologo /warn:4 /optimize- /codepage:utf8 /t:library /Users/nic/code/git/MicroAgent/Common/HUDStatusViewController.cs /Users/nic/code/git/MicroAgent/Common/HUDSyncProgress.cs /Users/nic/code/git/MicroAgent/Common/BaseSyncProgress.cs /Users/nic/code/git/MicroAgent/Common/Common.cs /Users/nic/code/git/MicroAgent/Common/Reachability.cs /Users/nic/code/git/MicroAgent/Common/WebViewController.cs /Users/nic/code/git/MicroAgent/Common/LoadingHUDView.cs /Users/nic/code/git/MicroAgent/Common/ExtensionMethods.cs /Users/nic/code/git/MicroAgent/Common/Threading.cs /Users/nic/code/git/MicroAgent/Common/AtmHudManager.cs /Users/nic/code/git/MicroAgent/Common/ATMHudSyncProgress.cs /Users/nic/code/git/MicroAgent/Common/CookieAwareWebClient.cs /Users/nic/code/git/MicroAgent/Common/StopWatchManager.cs Compilation failed: 1 error(s), 0 warnings error CS0006: Metadata file `/Users/nic/code/git/MicroAgent/extern/MonoTouch.Dialog/MonoTouch.Dialog/bin/iPhone/Release/MonoTouchDialog.app/MonoTouch.Dialog.dll' could not be found MonoTouch.Dialog isn't an app - it's just a DLL... https://bugzilla.xamarin.com/show_bug.cgi?id=4041 On Thu, Mar 22, 2012 at 17:34, johnHolmes francesco.colo...@gmail.com wrote: I'm facing the same issue :( HLP -- View this message in context: http://monotouch.2284126.n4.nabble.com/MonoDevelop-2-8-8-2-MonoTouch-dll-Output-Folder-Error-tp4496269p4496279.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Newbie: iPad application and incompatible target frameworks :(
So if i reference dll's in MonoDevelop -BUT- the project is a simple .NET4.0 class library..then there should be no problems Incorrect - sorry :-( To avoid confusion, **don't reference DLLs at all** (there are caveats to this if they're already built for the correct platform, but for now just don't do it). Instead, add the .NET code (that's in your DLLs) to your MonoTouch and Mono-for-Android solutions, so that they are compiled along with your MT or MfA project. so my MT solution will have a number of projects in it - one being the MonoTouch iPad project. Yes!! There are a few ways to include/share c# code projects (none of which are currently 'perfect'). 1) create a new MonoTouch Library Project/Mono for Android Class Library (csproj) file and add all the .cs files to it. 2) 'add as link' all the .cs files into your MT or MfA project (or another Library Project) You could download and check out our MWC Conference sample app from https://github.com/xamarin/mobile-samples/tree/master/MWC which shares a Core Project across iOS/Android/WindowsPhone using these methods. It does NOT reference a pre-built DLL ~ it includes the same c# files in each different solution so they get compiled for the specific platform. Downsides of this approach include refactoring in one solution will result in changing the shared code and possibly breaking on the other platforms. Something to watch out for. HTH craig p.s. if that's right, then will MT even consider changing it so that the iPad app can reference those projects in the future, instead of the .dll's ? there is such as thing as Portable Libraries but that is a way off, so for now you need to compile against the target platform. On Mon, Mar 26, 2012 at 2:48 PM, Pure Krome pure.kr...@world-domination.com.au wrote: Hmm. ok. this is confusing. :blush: Sorry - i'm a real newbie at this, so apologies for my really simple questions. What Sebastien is saying is that a DLL built in VS.NET is not compatible with MT. You have to build the library with MD/MT. Hmm. ok. So if i reference dll's in MonoDevelop -BUT- the project is a simple .NET4.0 class library .. then there should be no problems. BUT, if i want to use a dll built in VS.NET with a MonoTouch app (eg. iPad app) .. i need to build the source with MD (even though the source code is in another solution .. it's just that MD has compiled it into it's own MD compat dll) and then go back to my own solution, and add a reference to that new dll (which was created in the other instance of MD) ? -- View this message in context: http://monotouch.2284126.n4.nabble.com/Newbie-iPad-application-and-incompatible-target-frameworks-tp4503021p4504708.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Newbie: iPad application and incompatible target frameworks :(
I wouldn't characterize it as fragile - there are many large scale projects out there sharing massive amounts of code across platforms. And it sure as heck beats re-writing the code in Objective-C and Java! So now this means I can't do any of that :( well, no - you can still do *most* of that. Once you set-up the workflow it should work similarly to how you described (you can still work on your core and unit tests as you did - however you need to bring in the dependencies _as code_, so they'll compile in MT MD). A MonoTouch Library Project isn't some magic thing to be worried about - it's a regular csproj with a specific project-type-guid that tells it to compile against the MT profile of .NET that Sebastien mentioned. or i'm now into a world of pain trying to 'port' those repos Many open-source libraries just recompile or else have been forked for MT or MfA already. Json, Zipfiles, etc have all been done before. If they don't just recompile because of a compatibility issue, then bringing in the DLL wouldn't have helped you anyway - it still wouldn't have worked. I agree - it _is_ a little more effort... but then leveraging those open-source libraries in Objective-C or Java is going to be a *real* PITA. Are people just throwing everything into the one MT project no no no - you can build sophisticated multi-project solutions in MT and MfA just like a normal .NET project... but with the added bonus that if you do a bit of set-up work and planning you can deploy to iOS (phones + tablets), Android and Windows Phone 7 (throw in Silverlight and Windows 8 if you really want to get tricky and do a bit more planning). All you need is a couple of 'cloned' csproj files with different config (if you look at MWC, do a diff on MWC.Core.MT.csproj and MWC.Core.MD.csproj) - and to keep them in sync ongoing. As I said, it's not perfect (yet) but it works and gives you a massive head-start in deploying your .NET expertise on iOS Android. You could also check-out Touch.Unithttps://github.com/spouliot/Touch.Unitand Andr.Unit https://github.com/spouliot/Andr.Unit to extend your unit-testing onto the device platforms. I hope you can get the multiple-project mechanism working. Post if you have any other questions. Craig On Mon, Mar 26, 2012 at 3:38 PM, Pure Krome pure.kr...@world-domination.com.au wrote: Hi Craig - that helps a lot .. but really kills me :( What I did on the weekend was start using MD and I found that i'm not that efficient in programming in that IDE (just yet). So I commited/pushed my code to my repo. Switch over to VS2010, pulled .. and opened the sln. All the projects (except the MT one, of course) opened. I continued programming all day. Once all my tests worked, I pushed .. switched over the Mac .. pulled, build-all and tested my unit tests. All green lights! This ment that I could do my normal non UI programming in VS (ie, core/services/unit tests). I even used NuGet to grab my Json.net.dll and Moq.dll (but i'm not using package restore because it's obvious that non windows would know how to run nuget.exe :P). I was so excited how interoperable it all was (with of course, the MT specific project .. which is totally expected to not work outside of MD with MT installed). So now this means I can't do any of that :( Even worse .. I now need to grab the src for moq and json.net and add these projects to my solution .. and also make sure these projects are not a normal .NET 4 (or 3.5 or whatever) class library .. but a MonoTouch Library Project ? Oh - and hope and pray that they build first go .. or i'm now into a world of pain trying to 'port' those repos? I'm guessing this is because MT is a superset of Silverlight. This is all sounding more and more fragile and a real PITA when it comes to leveraging open source libraries already out there. Do other people who are making MT app's use Json.Net or Moq or AutoMapper or other common oss libraries, all face this same issue? Are people just throwning everything into the one MT project .. and not splitting things up into multi-projs and doing some TDD? -- View this message in context: http://monotouch.2284126.n4.nabble.com/Newbie-iPad-application-and-incompatible-target-frameworks-tp4503021p4504772.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Newbie: iPad application and incompatible target frameworks :(
Will look forward to your first AppStore approval ;) On Mon, Mar 26, 2012 at 4:28 PM, Pure Krome pure.kr...@world-domination.com.au wrote: Thanks again Craig :) i'll give the suggestions in here a try and report back with any success or more questions. But I will keep giving it a go :) And your input is really helpful, btw. Ta! -PK- -- View this message in context: http://monotouch.2284126.n4.nabble.com/Newbie-iPad-application-and-incompatible-target-frameworks-tp4503021p4504816.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] ViewDidAppear or ViewWillAppear not firing
yeah, maybe you could provide the code? gist.github.com the MWC sample subclasses DialogViewController https://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/Screens/iPhone/UpdateManagerLoadingDialogViewController.cs which is in turn subclassed https://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/Screens/iPhone/Sessions/SessionsScreen.cs with a ViewWillAppear method, so it is possible :-) HTH cd On Tue, Mar 27, 2012 at 5:13 PM, slodge m...@slodge.com wrote: Normally when I see this sort of thing happening its caused by a wrapping uinavigationcontroller ot uitabbarcontroller - check out so - there are lots of questions like http://stackoverflow.com/questions/3560669/viewwillappear-viewdidappear-not-being-called-not-firing Stuart -- View this message in context: http://monotouch.2284126.n4.nabble.com/ViewDidAppear-or-ViewWillAppear-not-firing-tp4507284p4508005.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] save file to windows
you can expose files that you save in your apps /Documents/ directory to the user through iTunes http://docs.xamarin.com/ios/tutorials/Working_with_the_File_System#Sharing_Files_with_the_User_through_iTunes just 'turn on' UIFileSharingEnabled via Info.plist then save your documents in that location. the user can then move files in/out of there with iTunes when the device is plugged in. otherwise you could look at: * running a web service on the server and pushing files to it over HTTP, or * implementing integration with a product like DropBox * using iCloud, and instructing the user on where to find the iCloud folder on their local box HTH cd On Thu, Mar 29, 2012 at 5:05 PM, Richard rich...@richdotnet.nl wrote: hi there, does anyone know how to save/copy a file to a windows pc/server or unc-path? i want to let the user select files on the iPad and copy/move/transfer to a windows-folder Richard -- View this message in context: http://monotouch.2284126.n4.nabble.com/save-file-to-windows-tp4514545p4514545.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How to handle the brightness, contrast, saturation for an UIImage.
There is some introductory info in the docs http://docs.xamarin.com/ios/tutorials/Introduction_to_iOS_5#CoreImage And a more compete example on github https://github.com/xamarin/monotouch-samples/tree/master/CoreImage On Thu, Mar 29, 2012 at 9:28 PM, Tomasz Cielecki tom...@ostebaronen.dkwrote: The UIImage has a reference to its CIImage, which you can apply a whole bunch of filters to. Look at the CI Image Filter Reference: https://developer.apple.com/library/mac/#documentation/graphicsimaging/reference/CoreImageFilterReference/Reference/reference.html On Wed, Mar 28, 2012 at 8:23 AM, Pritish pritish_deshm...@medsynaptic.com wrote: Hi, How to handle the brightness,contrast,saturation for an UIImage. Regards Pritish Deshmukh -- View this message in context: http://monotouch.2284126.n4.nabble.com/How-to-handle-the-brightness-contrast-saturation-for-an-UIImage-tp4511466p4511466.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Med Venlig Hilsen / With Best Regards Tomasz Cielecki http://ostebaronen.dk ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] MT.Dialog iPad / Universal
the MWC sample uses the same MT.Dialog screens in iPhone iPad - on the phone they're fullscreen (obviously) and on the iPad they sit in a SplitView (for example: the Speakers and Sessions lists). Pretty much the only special handling required was in the Element.Selected method - for iPhone we push a new controller, for iPad we have passed a reference to the splitView into the ctor, and we trigger the new screen load from there. if (splitView != null) splitView.ShowSession(session.ID); else { var sds = new MWC.iOS.Screens.iPhone.Sessions.SessionDetailsScreen (session.ID); sds.Title = Session; dvc.ActivateController (sds); } https://github.com/xamarin/mobile-samples/tree/master/MWC look at: Screens/iPad/Sessions/SessionSplitView.cs Screens/iPhone/Sessions/SessionsScreen.cs UI/CustomElements/SessionElement.cs HTH cd On Fri, Mar 30, 2012 at 8:36 AM, Nic Wise n...@fastchicken.co.nz wrote: I think someone commented on the list a while back that you have to break the bond with the UINavigationController, as it needs to go into a UISplitView. Not sure if it ever got released tho On Thu, Mar 29, 2012 at 21:21, danmiser danmi...@gmail.com wrote: Are there any writeups or samples about how to use MT.Dialog to display a different interface on an iPad with a universal application? Right now, the iPhone app works great. It's very data entry focused and uses nothing but MT.Dialog DialogViewControllers. I'm thinking of going with a split screen when launched from an iPad with a list of menus on the left and the content area reacting to those selctions. Any thoughts? -- View this message in context: http://monotouch.2284126.n4.nabble.com/MT-Dialog-iPad-Universal-tp4516860p4516860.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Help displaying UISplitViewController from UIViewController
SplitViewController is supposed to be the root (ala the Mail app) according to Apple's guidelines. It can also be added inside a UITabBarController (seehttps://raw.github.com/xamarin/mobile-samples/master/MWC/Screenshots/iOS/Sessions_iPad.PNGthe MWC sample https://github.com/xamarin/mobile-samples/tree/master/MWC, and note the special handlinghttps://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/UI/Controls/IntelligentSplitViewController.csrequired for rotation). cd On Fri, Mar 30, 2012 at 6:52 PM, chris.s chris.steph...@innov8.co.ukwrote: Thanks for the swift reply. Oddly enough, the method you outlined is one I tried but when it pushes the splitviewcontroller it doesn't get displayed. I tried it again this morning in case I had made a coding mistake, this time ran it using the emulator and I got the following error message displayed in monodev app output panel... 'Split View Controllers cannot be pushed to a Navigation Controller UINavigationController: 0x9b9a590 A quick google of the error message suggests that what I'm trying to do is blocked by Apple, it seems that split view controllers need to be root view controllers. There might be a few workarounds worth exploring and since it's an internal company app it shouldn't be an issue. Thanks for your help, at least I knew I was on the right track even if it turned out to be a dead end! Chris -- View this message in context: http://monotouch.2284126.n4.nabble.com/Help-displaying-UISplitViewController-from-UIViewController-tp4515952p4518335.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] how to UISlider use to implement brightness contrast , saturation
I just quickly put this sample together http://twitpic.com/93gfty you'll have to create a monotouch project from these files https://gist.github.com/2257994 AND don't forget to add the image file to your project https://github.com/xamarin/monotouch-samples/raw/master/CoreImage/clouds.jpg * warning: there is a memory issue using images from the camera. i haven't spent any time working out what i screwed up, but the code should give you an idea - it works using the smaller sample image that's linked above. HTH cd On Fri, Mar 30, 2012 at 4:30 PM, Pritish pritish_deshm...@medsynaptic.comwrote: Hi , How to handle the brightness , contrast and saturation of image on UISlider. Regards Pritish Deshmukh -- View this message in context: http://monotouch.2284126.n4.nabble.com/how-to-UISlider-use-to-implement-brightness-contrast-saturation-tp4518116p4518116.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Monotouch.Dialog controller calling Storyboard controller - a bad idea?
I haven't done a Storyboard with MT.D yet, but opening a Storyboard viewcontroller from regular old TableSource.RowSelected can be done like this (note the Identifier must be set in the Storyboard+Attributes Inspector for your view controller) // Specially for Storyboard !! var detail = viewController.Storyboard.InstantiateViewController(vegeIdentifier) as myVegeViewCtrl; detail.Title = tableItems[indexPath.Row].Heading; detail.LoadUrl (tableItems[indexPath.Row].Url); viewController.NavigationController.PushViewController (detail, true); HTH cd On Tue, Apr 3, 2012 at 10:55 PM, bustergonad gonad2...@hotmail.co.ukwrote: Is it bad to use call Storyboard view controllers from Monotouch dialog viewcontrollers in the same project? If it's ok to do, how do you call a Storyboard view controller (FirstViewController) from within a monotouch.dialog controller - ie. What do you pass into the constructor of the FirstViewController() I tried using FirstViewController(this) but it don't wanna play for me, so must be doing something daft! If I create a parameterless default constructor on the FirstViewController class, the controls on the class are always null - so fvc.Title returns null. eg. *FirstViewController declaration:* public FirstViewController (IntPtr handle) : base (handle) { TabBarItem.Image = UIImage.FromBundle (Images/first); } *Inside Monotouch.dialog DialogViewController:* var fvc = new FirstViewController ({what_goes_here?!}); fvc.Title= hi mom!; dvc.ActivateController(fvc); I really like being able to use Monotouch.dialog, but love also being able to use Storyboards to design more fiddly screens. I can call Monotouch.dialog controllers fine from within Storyboard view controller though. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-controller-calling-Storyboard-controller-a-bad-idea-tp4528682p4528682.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Using NS types instead of .NET types?
Hey, I don't know any pros/cons OTTOMH but there are some parts of the API (exposed by MonoTouch) that still require NSStrings (even NSArrays), so you will occasionally see them, even in examples and such. Therefore it is worthwhile being aware of their existence and how to use them. However, from a code maintenance perspective, I'd argue that sticking to one type system is probably better in the long term (regardless of performance/stability issues; though I doubt there are any such issues) -- just like any other 'coding standard' that is intended to make code sharing/debugging/maintenance easier. So stick to .NET types always, unless you *need* the NS equivalents... my 2c cd On Wed, Apr 4, 2012 at 12:05 AM, NC Software n...@nc-software.com wrote: Hello, I see some developers that have come from an Xcode background use NS types in MonoTouch instead of .NET types. For example, using NSString instead of String. Is there any impact to doing this? Pro's, Con's, should I raise this as a concern or is it negligible to the performance and stability (i.e. GC) of the app? Thanks. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Using-NS-types-instead-of-NET-types-tp4528885p4528885.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] On wifi, 3G, 4G or nothing?
Currently I think this class https://github.com/xamarin/monotouch-samples/blob/master/ReachabilitySample/reachability.cs is your best bet - however in my experience it can block, so should be run on another thread. also, i don't think it can tell the difference between 3G and 4G :) HTH cd On Wed, Apr 4, 2012 at 6:54 AM, MojoDK m...@fpr.dk wrote: Hi, Is it possible to tell if the App/Device is on Wifi, 3G, 4G or nothing? Thanks Mojo -- View this message in context: http://monotouch.2284126.n4.nabble.com/On-wifi-3G-4G-or-nothing-tp4530146p4530146.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] DialogViewController displays blank until touched
i don't see any InvokeOnMainThread ( () = { // stuff on main } ); when returning from an async op, you need to ensure any code updating the UI is running on Main... perhaps try wrapping the body of onPapersReceived? having said that, i'm not sure it explains why the table content 'disappears' when you tab away and back... :-s On Wed, Apr 11, 2012 at 9:34 AM, davidortinau d...@davidortinau.com wrote: Gist of the view and the service being called (uses RestSharp): https://gist.github.com/2355621 I'm not using ViewWillAppear. On Apr 10, 2012, at 6:30 PM, Craig Dunn [via MonoTouch] wrote: This also will happen if you navigate to a different tab and back. any chance you can post some code (gist.github.com)... in particular, what's in your ViewWillAppear method? On Wed, Apr 11, 2012 at 8:48 AM, davidortinau a href=x-msg://62/user/SendEmail.jtp?type=nodeamp;node=4547356amp;i=0 target=_top rel=nofollow link=external[hidden email] wrote: I'm having weirdness using DVC and was hoping someone might have seen this before. My searching here and on Stack Overflow haven't turned up any similar reports. I have an async service that returns a list which I then use Linq to add Elements to the Root (see link below). The view loads and displays an empty table...until you touch it at which point it displays the expected data. This also will happen if you navigate to a different tab and back. I've tried RefreshData() and set breakpoints to make sure methods aren't called twice unexpectedly. I also tried this with custom UITableViewCell and a custom UITableViewSource. Same result. Maybe it's my machine b/c I also have Unity installed with an older copy of MonoDevelop? If anyone has any idea what might be causing this, I've opened a SO question. Your input is MUCH appreciated. http://stackoverflow.com/questions/10093442/monotouch-dialogviewcontroller-is-empty-until-touched -- View this message in context: http://monotouch.2284126.n4.nabble.com/DialogViewController-displays-blank-until-touched-tp4547277p4547277.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list a href=x-msg://62/user/SendEmail.jtp?type=nodeamp;node=4547356amp;i=1 target=_top rel=nofollow link=external[hidden email] http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list a href=x-msg://62/user/SendEmail.jtp?type=nodeamp;node=4547356amp;i=2 target=_top rel=nofollow link=external[hidden email] http://lists.ximian.com/mailman/listinfo/monotouch -- If you reply to this email, your message will be added to the discussion below: http://monotouch.2284126.n4.nabble.com/DialogViewController-displays-blank-until-touched-tp4547277p4547356.html To unsubscribe from DialogViewController displays blank until touched, click here. NAMLhttp://monotouch.2284126.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: Re: DialogViewController displays blank until touchedhttp://monotouch.2284126.n4.nabble.com/DialogViewController-displays-blank-until-touched-tp4547277p4547366.html Sent from the MonoTouch mailing list archivehttp://monotouch.2284126.n4.nabble.com/at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] DialogViewController displays blank until touched
my personal preference is to keep UI stuff together, close to the UI. in the service you might not always be modifying the UI on callback - maybe you just save to a database or something, or you conditionally modify the UI only under certain conditions. YMMV tho' On Wed, Apr 11, 2012 at 9:40 AM, David Ortinau d...@davidortinau.comwrote: Ok, so invoking the callback on the main thread has fixed this issue. https://gist.github.com/2355654 Is this perhaps something better done in the service, or is it best practice to do it in the view like this? On Apr 10, 2012, at 6:34 PM, davidortinau wrote: Gist of the view and the service being called (uses RestSharp): https://gist.github.com/2355621 I'm not using ViewWillAppear. On Apr 10, 2012, at 6:30 PM, Craig Dunn [via MonoTouch] wrote: This also will happen if you navigate to a different tab and back. any chance you can post some code (gist.github.com)... in particular, what's in your ViewWillAppear method? On Wed, Apr 11, 2012 at 8:48 AM, davidortinau a href= x-msg://62/user/SendEmail.jtp?type=nodeamp;node=4547356amp;i=0 target=_top rel=nofollow link=external[hidden email] wrote: I'm having weirdness using DVC and was hoping someone might have seen this before. My searching here and on Stack Overflow haven't turned up any similar reports. I have an async service that returns a list which I then use Linq to add Elements to the Root (see link below). The view loads and displays an empty table...until you touch it at which point it displays the expected data. This also will happen if you navigate to a different tab and back. I've tried RefreshData() and set breakpoints to make sure methods aren't called twice unexpectedly. I also tried this with custom UITableViewCell and a custom UITableViewSource. Same result. Maybe it's my machine b/c I also have Unity installed with an older copy of MonoDevelop? If anyone has any idea what might be causing this, I've opened a SO question. Your input is MUCH appreciated. http://stackoverflow.com/questions/10093442/monotouch-dialogviewcontroller-is-empty-until-touched -- View this message in context: http://monotouch.2284126.n4.nabble.com/DialogViewController-displays-blank-until-touched-tp4547277p4547277.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list a href=x-msg://62/user/SendEmail.jtp?type=nodeamp;node=4547356amp;i=1 target=_top rel=nofollow link=external[hidden email] http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list a href=x-msg://62/user/SendEmail.jtp?type=nodeamp;node=4547356amp;i=2 target=_top rel=nofollow link=external[hidden email] http://lists.ximian.com/mailman/listinfo/monotouch -- If you reply to this email, your message will be added to the discussion below: http://monotouch.2284126.n4.nabble.com/DialogViewController-displays-blank-until-touched-tp4547277p4547356.html To unsubscribe from DialogViewController displays blank until touched, click here. NAMLhttp://monotouch.2284126.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: Re: DialogViewController displays blank until touchedhttp://monotouch.2284126.n4.nabble.com/DialogViewController-displays-blank-until-touched-tp4547277p4547366.html Sent from the MonoTouch mailing list archivehttp://monotouch.2284126.n4.nabble.com/at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Path of NSUserDefaults plist
never really thought about this before, but a quick look with PhoneDisk indicates the file is at /Library/Preferences/bundleid.plist this code should get a valid path (not tested) string documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.Personal); // Documents folder string libraryPath = Path.Combine (documentsPath, ../Library/); // Library folder string plistPath = Path.Combine (libraryPath, Preferences/YOURBUNDLEID.plist); // replace YOURBUNDLEID eg. com.xamarin.sampleapp or whatever you've used On Thu, Apr 12, 2012 at 3:30 AM, Guido Van Hoecke gui...@gmail.com wrote: Hi, I've been googling around to find a monotouch code snippet to load the path to the application's NSUserDefaults.StandardUserDefaults plist file, but did not find it. Basically, I just want to print that path to the Console when debugging. That would allow to copy the path and feed it to a plist editor to verify the expected plist content. Any help would be appreciated, With kind regards, Guido -- He who makes a beast of himself gets rid of the pain of being a man. -- Dr. Johnson ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] SharpZipLib performances
a-ha! context :) for the record, I have used SharpZipLib to decompress 200-500Mb *downloads* (post-install), which makes a lot of sense for certain applications (say, a magazine reader). I don't think you are getting much value from ZIPping something you ship in the IPA. As previously mentioned, the IPA's contents will be unpacked into the app home directory on the device: so if you've compressed it, uses 200Mb (but you need to unzip) and if you don't it's obviously taking up the full 700Mb - PLUS another 700mb when you've decompressed it into a read/write file location. The problem of 3 mins to unzip seems to override any other consideration tho' - if your app doesn't start-up and be usable quickly, the app's size doesn't really matter so much? So i'd definitely consider just bundling the full-size file... anyway, your call :-) Now, regardless of what you decide there, you also need to know this: do NOT put the 700Mb sqlite file in /Documents/ as Apple will reject your app within seconds of it hitting the approval process! How do I know this? I followed exactly the same pattern (copy out a pre-built file from the bundle into /Documents/ - and it was only 2.3Mb!!). Also - there is that plist property that lets users access /Documents/ from within iTunes... you may not have it enabled *now*, but if you wanted to in a future version of your app, you'll be 'screwed' if your main database is located there too... Why does it get rejected immediately? It violates the *iOS Data Storage Guidelines* https://developer.apple.com/icloud/documentation/data-storage/ Point #1 - your data is not user-generated, and it can be re-created from the bundle. You might then continue reading Point #2, and think you should put your sqlite file in Application_Home/Library/Caches/ BUT there is a process called 'Cleaning http://www.marco.org/2011/10/13/ios5-caches-cleaning' whereby iOS will (under extremely low storage situations) delete the contents of /Caches/ without asking! The solution I've gone for (and which I think is what Apple approves of) is storing the file in Application_Home/Library/ (or in a subfolder that you create there, but NOT /Caches/) AND following Point #4 whereby you mark the file with SetSkipBackupAttribute(). So what does this mean? Your 700Mb file is safe from being deleted, is in a location that will never be exposed to the user, and is read-write. Good, right? HOWEVER it also won't be backed-up (not to an iTunes PC nor to iCloud). That's fine - unless your user deletes and restores your app, or buys a new device and does a backup/restore to move everything from the old hardware to the new... your app (with prefs and whatever was in /Documents/) will be copied across - but your 700Mb read-write sqlite database won't be! In your FinishedLaunching you are probably doing a 'check' to see if the database has already been moved (and moving/uncompressing if required) - the trick is to decouple this from any data that _is_ backed-up (so don't store a flag in userprefs, or in a file) -- because the flag that says 'sqlite file is loaded' would be backed-up and restored, but the file itself wouldn't be (ugh, confusing eh? i'm only explaining all this 'cause i made the mistake myself, thinking a boolean prefs-check was faster than a System.IO.File.Exists). I think the physical file-exists check is safest (open to other suggestions tho). if it doesn't exist, unpack from the bundle all-over-again... also, don't store any user-generated data in that same 700Mb sqlite. Any user-entered data should be in a separate sqlite that DOES get backed-up (too bad about FK dependencies) unless you want to get into an approval-argument with Apple... clear as mud? hope it makes some sense... after two rejections my app did finally get approved with SetSkipBackupAttribute used. but if Apple was concerned about my 2.3Mb file, they're sure to raise an eyebrow at 700Mb! let me know if you have questions/need clarification ;-) HTH cd On Fri, Apr 13, 2012 at 6:10 PM, johnHolmes francesco.colo...@gmail.comwrote: Nic Wise wrote Keep in mind that the file that is downloaded to the users device - .ipa - is a ZIP file already, so you will not benefit from double compression. If you need to keep them all together,then try using store, see what the size of the resulting .ipa is, and the speed difference. Good point. I'll try to explain why I need to compress the file prior to the .ipa. The file is a sqlite db. It's uncompressed size is ~700mb. I need read/write permission on that file. If I'm not wrong, all content file stored in the bundle is read only, so i need, once the application is installed, to copy the original db to a writable folder. A good candidate seems to be the /Document folder. At this point the user will have 2 copy of the file, one compressed and one uncompressed, readable and writable, in the /Document folder. I know it's not good to have rendundant 200mb of data but I haven't
Re: [MonoTouch] Animate-rotate an imageview?
there's a recipe for a simple animated image http://docs.xamarin.com/ios/recipes/Standard_Controls/Image_View/Animate_an_ImageView looks like thishttp://docs.xamarin.com/@api/deki/files/902/=ImageViewAnim1.png?size=bestfitwidth=233height=350 hth cd On Wed, Apr 18, 2012 at 3:59 AM, MojoDK m...@fpr.dk wrote: Hi Nic, Thanks - it got me started. Here's what I've done so far... private void StartWaitSpin () { this._viewWait.Hidden = false; UIView.BeginAnimations (playerWaitSpin); CGAffineTransform t = CGAffineTransform.MakeIdentity(); t.Translate(10, 10); t.Rotate(3.14f); this._imageViewWait.Transform = t; UIView.SetAnimationDelegate (this); UIView.SetAnimationDuration (0.2f); UIView.SetAnimationDidStopSelector (new MonoTouch.ObjCRuntime.Selector(WaitSpinStopped)); UIView.CommitAnimations (); } [Export(WaitSpinStopped)] private void WaitSpinStopped () { StartWaitSpin (); // - this makes the app crash without an error description in output window } ... but it seams like calling StartWaitSpin within the WaitSpinStopped crashes the app. Any idea how I get it to loop without crashing? Thanks!! -- View this message in context: http://monotouch.2284126.n4.nabble.com/Animate-rotate-an-imageview-tp4564803p4565564.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Animate-rotate an imageview?
Sure - I'm just pointing out options. Personally I'd use the least-code approach every time... Apple put the UIImageView animation feature there for us to use! On Wed, Apr 18, 2012 at 3:25 PM, MojoDK m...@fpr.dk wrote: Hi Craig, I do not want to add unnecessary image files to my project, when iOS can spin it smoothly using rotate. I just need to figure out how to do a 360 rotatation and how I can stop the animation. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Animate-rotate-an-imageview-tp4564803p4566748.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How to save Image from Iphone Camera to project directory other than photo album - Mono touch
Hey, so you might have already seen this example http://docs.xamarin.com/ios/recipes/Media/Video_and_Photos/Save_Photo_to_Album_with_Metadata grab that code, then in ImageViewController.cs : add this code to the Tweet Station.Camera.TakePicture handler. Note that it isn't saving the GPS or other photo/camera metadata, *just* the image itself. var documentsDirectory = Environment.GetFolderPath (Environment.SpecialFolder.Personal); string jpgFilename = System.IO.Path.Combine (documentsDirectory, Photo.jpg); // hardcoded filename, overwrites each time NSData imgData = photo.AsJPEG(); NSError err = null; if (imgData.Save(jpgFilename, false, out err)) { Console.WriteLine(saved as + jpgFilename); } else { Console.WriteLine(NOT saved as + jpgFilename + because + err.LocalizedDescription); } HTH craig On Thu, Apr 26, 2012 at 6:39 PM, gill.saqib gill.sa...@gmail.com wrote: Hi Guys, I am new bee to mono development, i need some help with iphone camera integration. I want to capture image from iphone camera and save the image in to mono project folder not into photo album. Thanks! Regards, Gill -- View this message in context: http://monotouch.2284126.n4.nabble.com/How-to-save-Image-from-Iphone-Camera-to-project-directory-other-than-photo-album-Mono-touch-tp4589225p4589225.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Monotouch.Dialog.MessageElement not clipping to the rounded table view corner
Have you considered just using UITableViewStyle.Plain? I'm not sure putting MessageElements inside the Grouped style is 'normal' UI... the Mail.app is Plain. Just a thought... On Fri, Apr 27, 2012 at 12:39 PM, Felix Collins fe...@intranel.com wrote: I notice that the top and bottom MessageElements in a DialogViewController do not clip to the border of the table view correctly. I'm new to iOS where would I start to fix this? http://monotouch.2284126.n4.nabble.com/file/n4591614/msgelement.png -- View this message in context: http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-MessageElement-not-clipping-to-the-rounded-table-view-corner-tp4591614p4591614.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Monotouch.Dialog.MessageElement not full height the first time it is displayed
Hey Felix, From memory MT.D custom element sizing can be done two ways - implementing IElementSizing on the Element (which I am assuming what is happening here, as MessageElement is built-in) OR implementing CreateSizingSource on the DialogViewController subclass and returning something that responds to GetHeightForRow. I can't remember the exact details OTTOMH but I vaguely recall having an issue with IElementSizing on a custom element I once wrote (similar effect, rows show as default height); which I was able to work around by writing a custom DialogViewController.SizingSource instead. If you don't have any other success, you might try implementing that too; in case it helps (as a last resort :) ... this was a little while ago for me. Also - you mention the simulator is iOS 5.0 -- is the iPad also 5.0 or 5.1? I have seen some little inconsistencies introduced in 5.1 so it'd be interesting to know if the OS versions are exactly the same. -cd On Mon, Apr 30, 2012 at 9:45 AM, Felix Collins fe...@intranel.com wrote: I have a weird problem with a list of message elements running on the simulator. The first time that a DialogViewController with message elements is shown they appear not to size to the correct height (see pic below). If I navigate away and back to the view or to a different view with message elements then they show up correctly. Running on iPad iOS 5 it seems to work ok first time so maybe it is just a simulator issue. Can anyone suggest a fix or workaround? MonoDevelop 2.8.8.4 Apple Developer Tools: Xcode 4.2.1 (834) Build 4D502 Monotouch: 5.2.11 Running on Simulator 5.0 targeting iOS 3.0 http://monotouch.2284126.n4.nabble.com/file/n4597150/narrowmessagepng.png -- View this message in context: http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-MessageElement-not-full-height-the-first-time-it-is-displayed-tp4597150p4597150.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] mainnavigationcontrller buttons
Hey John, do you want to give this a try? NavigationItem.SetRightBarButtonItem (new UIBarButtonItem (UIBarButtonSystemItem.Add), false); NavigationItem.RightBarButtonItem.Clicked += (sender, e) = { Console.WriteLine(Right Bar Button Clicked!); }; this particular snippet is from the Tasky sample https://github.com/xamarin/mobile-samples/blob/TheNewTasky/Tasky/TaskyiOS/Screens/HomeScreen.cs (you can see the [+] button in this screenshothttps://github.com/xamarin/mobile-samples/raw/TheNewTasky/Tasky/Screenshots/iOS/Home.png ) HTH craig On Tue, May 8, 2012 at 9:37 PM, John Murray j...@murray.gb.com wrote: I have a 5 pages (left right swipe) which is created by adding views to a scroll view (as in Wally’s et altera’s book) ** ** A navigation controller exists – I presume it is the one automatically created in the AppDelegate ** ** So I can either show it with a title thus ** ** this.NavigationController.NavigationItem.Title = “Hello World” ** ** ** ** Or hide it this.NavigationController.NavigationBarHidden= true; ** ** ** ** ** ** ** ** What I cant seem to do is add a button to it ** ** I’ve tried various stuff such as ** ** This.NavigationController.NavigationItem.RightBarButtonItem = new UIButtonBarItem(“go”,UIBarButtonItemStyle.Plain,dosomething); ** ** ** ** ** ** I am sure I am missing the obvious here or is it not possible to put buttons on the root navigation ? ** ** ** ** Tia JM ** ** ** ** ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Open iTunes Store from App
Are you testing on a real device? Because the simulator doesn't have the iTunes app, it can only show links in Safari (same goes for AppStore and Maps links). I just ran this on my iPhone var u = new NSUrl( http://itunes.apple.com/mx/album/meditacion-del-testigo/id415533606?uo=4;); UIApplication.SharedApplication.OpenUrl (u); and it goes straight to *Meditación del Testigo* in iTunes. HTH craig On Mon, May 14, 2012 at 3:14 PM, rafaelc rafaelc...@hotmail.com wrote: Thank you for your answer I change it to itms but still doesn´t work, It return an error: The URL can´t be shown -- View this message in context: http://monotouch.2284126.n4.nabble.com/Open-iTunes-Store-from-App-tp4631331p4631557.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UIBarButtonItems are not firing in UIViewController
Looks like a couple of problems to me (i'm looking at AuthenticatePasscodeController, probably the same problems are in SetPasscodeController) First, this.NavigationController.InvokeOnMainThread( should just be InvokeOnMainThread( Second, alertView.Hidden = true; doesn't do what you think it does. It is just hiding the alertView - the screen is still 'modally blocked'. it looks like this, http://screencast.com/t/9SX9vps6ZB right? this is why your Edit button isn't working. instead change your code to alertView.DismissWithClickedButtonIndex(0, false); ...and it works http://screencast.com/t/jtG1fHqS5T6 HTH On Wed, May 16, 2012 at 8:09 AM, Jason Awbrey ja...@awbrey.net wrote: I haven't had a chance to look at your code yet, but are you assigning a delegate to your button? IIRC, you can either use a delegate or a C# style event handler, but not both. Trying to do so usually ends up with neither working. On Tue, May 15, 2012 at 2:03 PM, celticfrost adeel2...@gmail.com wrote: Thank you Bill. I gave it a go but still no joy. I have attached the full code. If you can kindly take a look please. http://monotouch.2284126.n4.nabble.com/file/n4635215/FirstAttempt.zip FirstAttempt.zip I even tried to replace uiviewcontroller and uitableview with a uitableviewcontroller but faced the same issue. Basically all the app does is, it displays initial startup screen. Then depending if it is being run for the first time, it asks user to set passcode or else takes user directly to screen asking for passcode which is hardcoded to 1234. After it takes user to MainTableController which uses uitableview and where I have UIBarButtonItems but their events are not firing. Many thanks for taking time to look into the code. Craig -- View this message in context: http://monotouch.2284126.n4.nabble.com/UIBarButtonItems-are-not-firing-in-UIViewController-tp4633026p4635215.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Problem with making code based on database access gallery project work
try changing var counties = connection.TableCountyData(); to the following two lines: var countiesTable = connection.TableCountyData(); var counties = (from i in countiesTable select i).ToList (); // using System.Linq basically the object returned from connection.Table isn't really a list you can bind to: you need to perform a query on it that gives you a generic list that your TableSource expects. HTH On Thu, May 17, 2012 at 5:41 AM, Chris_M kungfuchri...@yahoo.com wrote: I'm creating an app that reads data from a pre-created database, one that will NOT be modified by the user. This is purely a search and display info app. The code below is the main view for the app, which displays a company logo, adds a search bar (which will be used essentially to filter the displayed data to specific searched-for counties or cities), and upon initial display loads and displays the entire list of data (which will be about 200 entries, I believe). My code is based on a couple of the tutorials and gallery projects, but chiefly the Data Access gallery example and some advice from the inestimable Nice Wise. I am also specifically trying to use only the SQLite-Net code to work with my database. I've whittled my way down to just two errors, and after searching and reading everything related I can find, I still don't know why they're happening or how to fix them. They are both generated by the same line, which is marked below by the comment THIS IS THE PROBLEM LINE RIGHT HERE! I apologize in advance for my ignorance and the many other mistakes I have no doubt made (and also that this post is kind of long; I thought including all the code would be best, though). I'm having a blast learning to combine what I've gotten to work from following tutorials and gallery projects, but it's a slow, clumsy process sometimes. I wouldn't trade the experience for anything, but I have a high tolerance for my own knuckleheadedness. :-) Anyway, the two errors I'm getting are: The best overloaded match for [the method in question] has some invalid arguments. And: Argument #1 cannot convert 'SQLite.TableQuery[my table]' expression to type 'Systems.Collections.Generic.List[list with the same name as my table]' What am I doing wrong, and how can I fix this? code below=== using System; using System.Linq; using System.Collections.Generic; using MonoTouch.Foundation; using MonoTouch.UIKit; using MonoTouch.Dialog; using System.Drawing; using System.Data; using System.IO; using SQLite; namespace MyDBAccessApp { public class HomeNavController : UITableViewController { // declare vars // add these in later when nav button options added // ListNavItemGroup navItems = new ListNavItemGroup(); // NavItemTableSource tableSource; protected ListCountyData counties = new ListCountyData (); protected TableSource tableSource; CountyData county; UIImageView imageView; UIImage logoGraphic; UILabel appTitle; UISearchBar searchBar; float _TopOfScreen; float _CentScreen; float logoVert; float logoHorz; float appTitleVert; float appTitleHorz; float logoWidth; float logoHeight; float barVert; string dbName = FCResData.sqlite; public HomeNavController () //: base(UITableViewStyle.Grouped) { } class SearchDelegate : UISearchBarDelegate { public override void SearchButtonClicked (UISearchBar searchBar) { searchBar.ResignFirstResponder (); } public override void CancelButtonClicked (UISearchBar searchBar) { searchBar.ResignFirstResponder (); } } public override void ViewWillAppear (bool animated) { base.ViewWillAppear (animated); // hide the nav bar when this controller appears NavigationController.SetNavigationBarHidden (true, true); } public override void ViewWillDisappear (bool animated) { base.ViewWillDisappear (animated); // show the nav bar when other controllers appear NavigationController.SetNavigationBarHidden (false, true); } public override void ViewDidLoad () { logoGraphic = UIImage.FromFile
Re: [MonoTouch] iPad Master/Detail help, please?
Bob, there is also a SplitView sample on github https://github.com/xamarin/monotouch-samples/tree/master/SplitView (looks like https://github.com/xamarin/monotouch-samples/raw/master/SplitView/Screenshots/01.png ) and a couple of SplitView 'recipes' here with sample code to download http://docs.xamarin.com/ios/recipes/Content_Controls/Split_View finally, there is also the (more complex) MWC sample https://github.com/xamarin/mobile-samples/tree/master/MWC which has a UITabBarController that contains some SplitViews (looks like https://github.com/xamarin/mobile-samples/blob/master/MWC/Screenshots/iOS/Sessions_iPad.PNG ) word of warning: splitview inside tabbar has some 'issues' with rotation on ipad. the IntelligentSplitViewController in MWC is intended to get around those issues https://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/UI/Controls/IntelligentSplitViewController.cs HTH craig On Tue, May 22, 2012 at 7:33 AM, Nic Wise n...@fastchicken.co.nz wrote: No, that was it. I've put the project up on my blog: http://www.fastchicken.co.nz/drop/bob-ipad.zip Does that one work for you, and match up with what you have? On Mon, May 21, 2012 at 6:55 PM, bobreck rr...@keylogic.com wrote: Nic, Thanks so much for the reply. Unfortunately, when I start a new project and put your code into the SelectedRow method, I get a null error on vc. Is there, by chance, something that you forgot to include? Bob -- View this message in context: http://monotouch.2284126.n4.nabble.com/iPad-Master-Detail-help-please-tp4646069p4648527.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Duplex WCF Communication
Mr Shackles has kindly created client apps for MonoTouch and Mono-for-Android, although I'm not sure how complete they are https://github.com/gshackles/SignalR HTH On Fri, May 25, 2012 at 3:11 PM, Mike Kuzminski mkuzmin...@gmail.comwrote: I emailed Monotouch support and they suggest using SignalR which is available from Github and NuGet. I'm testing it on the windows server and client side before I test on Mono. but apparently it works with mono touch. If it works, It should provide a nice layer to abstract all the asynchronous communication. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Duplex-WCF-Communication-tp4650078p4654049.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How to keep selected (element)row highlighted
The MWC sample does that - both for the master list (landscape view) and also the mini 'speaker list' for sessions that you can see in this screenshot. https://raw.github.com/xamarin/mobile-samples/master/MWC/Screenshots/iOS/Sessions_iPad.PNG the relevant pieces of code are : * in the SpeakersTableViewSource.cs, we DON'T deselect, so the blue highlight will remain if (AppDelegate.IsPhone) tableView.DeselectRow (indexPath, true); * in SessionView.cs we set the selection to a particular row when loading if (AppDelegate.IsPad) { // set the highlight for whatever speaker is showing in the other column (only iPad, obviously) if (speakerTable.IndexPathForSelectedRow == null) speakerTable.SelectRow (NSIndexPath.FromRowSection (0,0), true, UITableViewScrollPosition.Top); else speakerTable.SelectRow (speakerTable.IndexPathForSelectedRow, true, UITableViewScrollPosition.Top); HTH craig On Sun, Jun 3, 2012 at 10:38 PM, Guido Van Hoecke gui...@gmail.com wrote: Hi, I'm working at a universal app where I use the wonderfull MTSplitViewController when ran on the iPad (Thank you René). Both Master and Detail panes use DialogViewControllers (Thank you Miguel). Selecting an element on the Master creates and pushes the corresponding DialogController onto the UINavigationController associated with the Detail pane. This interaction works like a charm! When I tap an element in the Master pane, the blue selection bar fades out, which is the normal expected behaviour. However, for a Master pane it would be desirable that this selection color would not diappear, leaving a clear trace of the selected option that corresponds to the current Detail pane content, as a kind of the 'Active menu choice'. I dare hope that this can be easily achieved, but I've stackoverflowed and googled around without success. Any ideas or suggestions? Thanks in advance, Guido -- You will be surprised by a loud noise. http://vanhoecke.org ... and go2 places! ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] C#/Mono Oauth libraries
You're sure to come across Miguel's TweetStation app - code is OS https://github.com/migueldeicaza/TweetStation On Tue, Jun 5, 2012 at 7:31 AM, Brett Spurrier brett.spurr...@gmail.comwrote: I'll check it out. I've only been on the list for a few months. Thanks! On Mon, Jun 4, 2012 at 2:28 PM, Jason Awbrey ja...@awbrey.net wrote: have you searched the list archives? I know this has been discussed in the past On Mon, Jun 4, 2012 at 4:16 PM, Brett Spurrier brett.spurr...@gmail.com wrote: Hi everyone, This isn't really MonoTouch specific, but given the community following on this list, I thought I'd ask here anyhow. Has anyone had any experience with MonoTouch and OAuth 1.0, specifically using it with Twitter and LinkedIn? Are there any C# libraries available to sign requests? Or examples? I've googled my mind numb on this, but can't find a straight forward example of how to use Mono (or C#) to connect to Twitter and LinkedIn. Any thoughts would be awesome. Cheers, Brett ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How to keep selected (element)row highlighted
MWC uses MonoTouch.Dialog extensively! Looking at the MT.D code, the Element.Selected method is usually implemented like this: public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath) { // dostuff tableView.DeselectRow (indexPath, true); } If you create a custom Element for your app and implement RowSelected without 'DeselectRow' it should work. You can probably also just subclass the Elements you're already using and just override this one method... you might want to make it conditional so that on the iPhone it DOES deselect. MT.D is pretty extensible (and the source is available too). I'd be surprised if you had to re-write as a UITableView... -craig On Mon, Jun 4, 2012 at 9:48 PM, Guido Van Hoecke gui...@gmail.com wrote: Craig, Unfortunately, MWC does not use Monotouch.Dialog: it uses its own UITableView which gives a finer control over things. My Master is a DialogViewController, which is also available on the iPhone with some minor conditional stuff, mostly to differentaite between the iPhone and iPad paradigm. I can highlight the entry at NSIndexParth.FromRowSection(0,0) at initial loading time, but fail to keep the selection highlighted whenever an entry is tapped. Here's what I've got to handle this: * in the Dialog Constructor: if (AppDelegate.IsPad) Dvc.OnSelection += DvcOnOnSelection; * and the DvcOnSelection method: private void DvcOnOnSelection(NSIndexPath nsIndexPath) { Dvc.TableView.SelectRow( Dvc.TableView.IndexPathForSelectedRow, true, UITableViewScrollPosition.None); } This method is called whenever a row is tapped, but it does not preserve nor force the selection color. Any ideas to preserve the selected color in Monotouch.Dialog? It would be a pity if I had to recode the existing iPhone controller as a lower level TableViewController on the Ipad... Thanks in advance, Guivho. On 3 June 2012 23:58, Craig Dunn craig.d...@gmail.com wrote: The MWC sample does that - both for the master list (landscape view) and also the mini 'speaker list' for sessions that you can see in this screenshot. https://raw.github.com/xamarin/mobile-samples/master/MWC/Screenshots/iOS/Sessions_iPad.PNG the relevant pieces of code are : * in the SpeakersTableViewSource.cs, we DON'T deselect, so the blue highlight will remain if (AppDelegate.IsPhone) tableView.DeselectRow (indexPath, true); * in SessionView.cs we set the selection to a particular row when loading if (AppDelegate.IsPad) { // set the highlight for whatever speaker is showing in the other column (only iPad, obviously) if (speakerTable.IndexPathForSelectedRow == null) speakerTable.SelectRow (NSIndexPath.FromRowSection (0,0), true, UITableViewScrollPosition.Top); else speakerTable.SelectRow (speakerTable.IndexPathForSelectedRow, true, UITableViewScrollPosition.Top); HTH craig On Sun, Jun 3, 2012 at 10:38 PM, Guido Van Hoecke gui...@gmail.com wrote: Hi, I'm working at a universal app where I use the wonderfull MTSplitViewController when ran on the iPad (Thank you René). Both Master and Detail panes use DialogViewControllers (Thank you Miguel). Selecting an element on the Master creates and pushes the corresponding DialogController onto the UINavigationController associated with the Detail pane. This interaction works like a charm! When I tap an element in the Master pane, the blue selection bar fades out, which is the normal expected behaviour. However, for a Master pane it would be desirable that this selection color would not diappear, leaving a clear trace of the selected option that corresponds to the current Detail pane content, as a kind of the 'Active menu choice'. I dare hope that this can be easily achieved, but I've stackoverflowed and googled around without success. Any ideas or suggestions? Thanks in advance, Guido -- You will be surprised by a loud noise. http://vanhoecke.org ... and go2 places! ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Need help with UITableView
Possibly you are using a UITableViewController or a Monotouch.Dialog.DialogViewController as the basis of the screen - both of these have a UITableView 'built in' that uses up the entire screen space, which is why the rows appear as you described. This is kinda their expected behavior. Create a *UIViewController* instead and add all the controls to it, specifying the Frame of each such that they're laid-out as you have shown, * including* a UITableView. Using MT.D is a little tricky in this scenario, as DialogViewController does want to use the entire screen. A normal table with a UITableViewSource will probably be easier in this scenario... HTH On Tue, Jun 5, 2012 at 2:13 PM, Chris_M kungfuchri...@yahoo.com wrote: I'm trying to build an app where cells in a UITableView are populated with data from an SQLite database saved in the app's Library folder, and the cells can be tapped to go to a screen with more details from that record. So far so good there. My problem is with the overall UI layout. What I'm trying to achieve is a layout where there's a logo graphic at the top of the screen, then a text label, then a search bar, then the populated UITableView cells, then a footer graphic, and then a row of buttons (I'll attach a bad mockup to this message so you can see what I'm shooting for). I'm able to place all the elements on the screen where I want them, but the problem is that data-populated UITableView cells, instead of just appearing in the middle of the screen as desired, they appear from the top of the screen to the bottom, behind the other UI elements on the screen. I feel like there's probably something really simple that I'm missing (as has proven to be the case in the past), but I haven't found any information or examples that address my specific issue (although I've seen actual apps that appear to do it). So how do I achieve the UI functionality that I'm searching for, where the data-populated cells appear only in the middle of the screen? (I'd also be curious if there's a way to do it using MonoTouch.Dialog as well.) --Chris http://monotouch.2284126.n4.nabble.com/file/n4655183/iPhoneDesignMockup.png iPhoneDesignMockup.png -- View this message in context: http://monotouch.2284126.n4.nabble.com/Need-help-with-UITableView-tp4655183.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Twitter without UI - only code
Apple's docohttp://developer.apple.com/library/ios/#documentation/Twitter/Reference/TWTweetSheetViewControllerClassRef/Reference/Reference.htmlseems pretty clear that the built-in Twitter framework is not intended to send tweets without the user seeing them first. you cannot append text, images, or URLs to tweets without the user’s knowledge Miguel has written a complete Twitter app - https://github.com/migueldeicaza/TweetStation - so I'm sure you can find the code in there that he uses to send tweets, however I suspect you will also need to authenticate the user yourself too (as TweetStation does) ~ I'm not sure if you can rely on iOS5's auth in this case. I vaguely recall martinbowling having some success with this stuff, so googling his blog/tweets might help... On Sat, Jun 2, 2012 at 11:12 PM, nphias mas...@gmail.com wrote: Hi there, I want to adress the API for TWTweetComposeViewController in MonoTouch.Twitter I have a helper class which allows me to setInitialText and add an image to the tweet. it is then displayed to user from within my app. The user can then choose whether to send or cancel the tweet with the two button options. This is fine, however I dont want the user to edit the tweet text. so i use the method TWTweetComposeViewController.setEditing(false,false) This method appears to have no effect in the simulator with the user being able to edit the text. having read other threads it may be possible to avoid user editing with TWRequest but using that i cannot add the image.. so its no good any ideas? -- View this message in context: http://monotouch.2284126.n4.nabble.com/Twitter-without-UI-only-code-tp3906383p4655161.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Twitter without UI - only code
Ah, right, setEditinghttp://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html isn't a Twitter framework method, it's inherited from UIViewController. Its doco states: Subclasses that use an edit-done button must override this method to change their view to an editable state Since the TWTweetComposeViewController doesn't use 'edit-done' as its UI, setEditing isn't used (I guess). On Thu, Jun 7, 2012 at 6:39 AM, nphias mas...@gmail.com wrote: my Question refers specifically to monotouch.twitter API and the method TWTweetComposeViewController.setEditing(false,false) which by description does not appear to do what it says it should do.? I searched Miguels tweetstation code and there is no reference to monotouch.twitter and TWTweetComposeViewController if you read the Apple docs description on TWTweetComposeViewController : *The TWTweetComposeViewController class presents a view to the user to compose a tweet. Although you may perform Twitter requests on behalf of the user, you cannot append text, images, or URLs to tweets without the user’s knowledge. Hence, you can set the initial text and other content before presenting the tweet to the user but cannot change the tweet after the user views it. All of the methods used to set the content of the tweet return a Boolean value. The methods return NO if the content doesn’t fit in the tweet or if the view was already presented to the user and the tweet can no longer be changed. * Indeed the last sentence would indicate that even though the user can cancel the tweet entirely, they are still allowed the ability to modify it on the view. So perhaps I have misunderstood the intention of the method setEditing. Anyway sorry if this repeats previous remarks.. I hope it will help other new developers -- View this message in context: Re: Twitter without UI - only codehttp://monotouch.2284126.n4.nabble.com/Twitter-without-UI-only-code-tp3906383p4655226.html Sent from the MonoTouch mailing list archivehttp://monotouch.2284126.n4.nabble.com/at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Checking local network availability
Hey, not 100% sure I know what you're asking here, but I'll take a shot 1. Apple basically requires that your app doesn't crash. They will test on a device without network, and if it crashes (because of bad code, or startup time exceeds the 10sec limit) they will fail your app. So: you need to do some quick stuff to get your app started-up and displaying something, and kick off something in the background to check network availability. Show a message about requiring network connection if it fails (eg. even App Store does this http://twitpic.com/9twli1 ) 2. Check at least on startup and whenever the app comes to the foreground (they may have gone off to Settings to enable the network, then returned to your app!). There is a Reachability.cs class that you can use, which is based on a Apple sample (SO refs follow) http://stackoverflow.com/questions/1961341/check-for-internet-access-with-monotouch http://stackoverflow.com/questions/5081178/how-to-use-miguels-reachability-classes it is implemented in the MWC sample app https://github.com/xamarin/mobile-samples/tree/master/MWC HTH -craig On Thu, Jun 7, 2012 at 4:41 PM, rnendel11 rnende...@gmail.com wrote: Quick questions 1. What are the apple requirements for checking WiFi availability (local networking) on startup? 2. What is the best way to determine if a local network is available at startup (assuming I only need to check at startup)? App background The app leverages web services, but only for community sharing features - fundamentally, the app leverages local networking for primary operations. Thanks! -- View this message in context: http://monotouch.2284126.n4.nabble.com/Checking-local-network-availability-tp4655233.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] is the downloadable code in McClure's iPhone Programming with MT... compatible with current version of MT/MD?
Hey, That book was sent to press just after the first iPad was launched (early-mid 2010) so some of the code is getting old (from 2009)! I didn't get the same error as you, but the sample also didn't work for me just now; this updated gist shows code that does work (3 lines modified). I also allowed MonoDevelop 3 to upgrade the solution/project file. https://gist.github.com/2893977 In this case, it looks like the more aggressive GC was causing a problem for me. When you say they 'almost work', do you mean they are crashing out? In the simulator, on a device, or both? HTH Craig On Fri, Jun 8, 2012 at 12:05 AM, jGoff i...@goffs.net wrote: Is the sample code downloadable from Wrox for McClure's Professional iPhone Programming with MonoTouch and .NET/C# in synch with the current versions of MT/MD? If not, what tweaks are necessary to make them compatible? My experience is that they almost work. I'm getting the following: Applications are expected to have a root view controller at the end of application launch. I've just tried PickerView01 (chapter 4, example 6), but my hunch is that this will happen for all of the code snippets. Anyone? -- View this message in context: http://monotouch.2284126.n4.nabble.com/is-the-downloadable-code-in-McClure-s-iPhone-Programming-with-MT-compatible-with-current-version-of--tp4655242.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Implementing IImageUpdated in custom MTD Element
Hey - the MWC2012 sample app has a couple of custom MTD elements that use IImageUpdated (Speaker cells have a head-shot, Exhibitor cells have a logo, Twitter cells have an avatar image). links below. HTH craig https://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/UI/CustomElements/SpeakerCell.cs https://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/UI/CustomElements/ExhibitorCell.cs https://github.com/xamarin/mobile-samples/blob/master/MWC/MWC.iOS/UI/CustomElements/TweetCell.cs On Sat, Jul 7, 2012 at 5:34 AM, dickies archmap...@gmail.com wrote: Can anyone help out with an example please? -- View this message in context: http://monotouch.2284126.n4.nabble.com/Implementing-IImageUpdated-in-custom-MTD-Element-tp4655755p4655824.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UISplitView - master always hidden in landscape
Hi Petr, which Xamarin sample did you try? There is one on github https://github.com/xamarin/monotouch-samples/tree/master/SplitView also also three separate recipes on http://docs.xamarin.com/ios/recipes eg. http://docs.xamarin.com/ios/recipes/Content_Controls/Split_View/Use_Split_View_to_Show_two_Controllers also - can you confirm which version of iOS you are using (5.0 or 5.1) and whether the behaviour is the same on emulator and device? craig On Fri, Jun 29, 2012 at 11:06 PM, Petr Slováček pslova...@newlink.czwrote: Hello everyone, ** ** I have a problem when trying to implement a UISplitView. In every article I found on this topic is mentioned that master view is always visible in landscape mode. I tried to implement UISplitView in my application using latest MonoTouch but my master view is always hidden and I have to drag it out from the left side to be able to see it when the application is in landscape mode. To be sure if something is not wrong with my code I also tried Xamarin sample – SplitView and to my surprise it behaves exactly the same. What’s wrong with UISplitView in MonoTouch? I didn’t see such behavior of split view in any application on my iPad yet. ** ** Petr ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Newsstand Sample
There is some documentation on using the Newsstand APIs http://docs.xamarin.com/ios/tutorials/Introduction_to_Newsstand however that doesn't cover the actual reading/rendering stuff - you choose your own data format and write that yourself... HTH On Thu, Jul 19, 2012 at 6:04 PM, Lennie De Villiers lennie.w...@gmail.comwrote: Hi, Do you've a sample to write a digital mag in Newsstand with MonoTouch? Thank you! ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Signalr and monotouch
Mr Shackles has already done some good work getting SignalR on Xamarin https://github.com/gshackles/SignalR HTH On Jul 21, 2012, at 8:23 AM, Alex Soto dxdr...@gmail.com wrote: Hello guys, Do you know if SignalR can be used with MonoTouch?? Also any example would be great Or if you know a better solution that would be great. What I need to achieve is when the app is running in foreground i must push info from the server to the device When some records are stored in a database Alex ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Trying to Create HTML-Style Image Map
Tool that might be helpful - http://www.paintcodeapp.com/ - for drawing custom CG shapes. It outputs MonoTouch/C# code http://blog.xamarin.com/2012/06/06/meet-our-new-favorite-design-tool-paintcode/but does cost $99 to buy the full version. Just FYI... On Mon, Jul 23, 2012 at 10:56 AM, Chris_M kungfuchri...@yahoo.com wrote: My stakeholders now want an HTML-style image map -- a map of counties divided into regions, where tapping on a region brings up a list of counties in that region (I already have all that functionality working as a table view. The image map idea is pretty good, though.) The regions, each one a collection of counties, is like a jigsaw puzzle piece in outline. I have a public domain map of all the counties in question. What I'd like to do is use the map image (with each region having a different fill color for all the counties in that region) and then draw the region outline using Core Graphics custom drawn shapes with a transparent stroke and fill, and then use an appropriate event handler when a shape is tapped. I have a couple concerns about this approach. First, I've only used images in images views and custom buttons so far, and I've drawn shapes with simple CG techniques. But I don't know how to combine a UIImageView with a CG drawing context. Is there a way to do that and then draw the shapes over the image view? Or do I need to place the image in the CG drawing and then draw the shapes over that image? How is that done? My second concern is drawing the region shapes themselves. I'm envisioning a lot of painstaking point-by-point trial and error between the code and the simulator for review. (I'm doing everything programmatically and not using IB at all in this project.) Is there an easier way to go about this? --Chris -- View this message in context: http://monotouch.2284126.n4.nabble.com/Trying-to-Create-HTML-Style-Image-Map-tp4656120.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Retrieving EXIF (GPS) data from UIImage
Just to clarify, you can't get this info from a UIImage object, because that object is just for loading/displaying images. You *can* get the info direct from an image *file* (with an NSUrl reference) using the ImageIO framework (as per that example you linked to). Here's the MonoTouch equiv... // Ensure you have these 'using' using MonoTouch.Foundation; using MonoTouch.UIKit; using MonoTouch.CoreFoundation; using MonoTouch.ImageIO; // Then put this in your code somewhere var url = new NSUrl(myPhoto.JPG, false); // could be an NSUrl to asset lib... CGImageSource myImageSource; myImageSource = CGImageSource.FromUrl (url, null); var ns = new NSDictionary(); var imageProperties = myImageSource.CopyProperties(ns, 0); var width = imageProperties[CGImageProperties.PixelWidth]; var height = imageProperties[CGImageProperties.PixelHeight]; Console.WriteLine(Dimensions: {0}x{1}, width, height); // Output all teh things Console.WriteLine(imageProperties.DescriptionInStringsFileFormat) HTH craig On Thu, Aug 16, 2012 at 10:55 PM, ric3kg rickgr...@mac.com wrote: I'm trying to retrieve GPS data from photo imported from a Photo Album. Apple has a tech note on how to do this (http://developer.apple.com/library/ios/ipad/#qa/qa1654/_index.html). But I can't find CGImageSourceRef in Monotouch. Am I missing something? I'm using Monotouch 5.2.13. I can get the data from AssetLibrary calls but how does one get there from an UIImage object? Thanks, Rick -- View this message in context: http://monotouch.2284126.n4.nabble.com/Retrieving-EXIF-GPS-data-from-UIImage-tp4656547.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Setting HighlightedTextColor when UITableViewCellSelectionStyle.None is used
What about cell.Highlighted = true; // no animation or cell.SetHighlighted(true,false); // optional animation ? I'm not really sure what effect you are trying to accomplish with this code... if it is just to have different colors on every second row, why not just set the TextColor directly inside your if-else? On Tue, Aug 21, 2012 at 6:39 AM, Drew Greenwell dgreenw...@leapfroginteractive.com wrote: Hey all, I’ve got a UITableViewCell that I want to change the HighlightedTextColor. Setting the HighlightedtextColor property only seems to work when UITableViewCellSelectonStyle is set to something other than None. Do I have to subclass UITableViewCell to get this to apply or am I just missing something? ** ** Here’s a trimmed down version of my GetCell method. Note: Setting SelectionStyle to anything but none makes the highlighted color show as expected when the row is selected ** ** public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { // the row index int row = indexPath.Row;** ** var dRow = Rows [row]; // get a reusable cell instance and set the style var cell = tableView.DequeueReusableCell (TableCellIdentifier + dRow.ViewName + dRow.Text); if (cell == null) { cell = InstantiateCell(dRow, UITableViewCellStyle.Subtitle, TableCellIdentifier); if(indexPath.Row % 2 == 0){ // setting this to anything but None shows the highlighted text color cell.SelectionStyle = UITableViewCellSelectionStyle.None; var label = cell.TextLabel; label.TextColor = UIColor.Black; label.HighlightedTextColor = UIColor.Yellow; }else{ // setting this to anything but None shows the highlighted text color cell.SelectionStyle = UITableViewCellSelectionStyle.None; var label = cell.TextLabel; label.TextColor = UIColor.Black; label.HighlightedTextColor = UIColor.Yellow; } } ** ** Thanks in advance for any insight. __ Information from ESET NOD32 Antivirus, version of virus signature database 7403 (20120820) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] cross platform library code
Yep - there is a very basic example PCL project here https://github.com/conceptdev/xamarin-samples/blob/master/TaskyProPortable/ there is a few basic Linq statements in here https://github.com/conceptdev/xamarin-samples/blob/master/TaskyProPortable/Tasky.Core.Portable/DL/TaskDatabase.cs HTH On Tue, Aug 21, 2012 at 10:05 AM, Jason Awbrey ja...@awbrey.net wrote: can I use LINQ in a PCL project? On Mon, Aug 20, 2012 at 3:01 PM, Jeff Stedfast j...@xamarin.com wrote: You can actually create a single Portable Library Project. It's a bit of a hack, but it works. Jeff On Mon, Aug 20, 2012 at 3:58 PM, Jason Awbrey ja...@awbrey.net wrote: If I want to share domain code in a library project between MT/MfA/WP7, I have to create separate csproj files for each platform, correct? Are there any tools for converting the csproj files for each platform, or is it best just to do it manually? JA ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Setting HighlightedTextColor when UITableViewCellSelectionStyle.None is used
ah okay - so what is your goal? just to implement a custom 'selected' cell appearance? You said: Note: Setting SelectionStyle to anything but none makes the highlighted color show as expected when the row is selected Is that the behavior that you _want_? The expected effect of UITableViewCellSelection.None is that the cell has no distinct style when selected, so it makes sense that you need to set it to either Blue (default) or Grey for anything to happen (automatically) when a cell is selected. if you want the on-tap behavior to be yellow text on a white background, cell.TextLabel.TextColor = UIColor.Black; cell.TextLabel.HighlightedTextColor = UIColor.Yellow; //cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; // or leave as default cell.SelectedBackgroundView = new UIView(newSystem.Drawing.RectangleF(0,0,320,44)){BackgroundColor=UIColor.White}; or else - i'm misunderstanding what you are actually trying to accomplish? p.s. this code should already be running on the main thread On Tue, Aug 21, 2012 at 11:23 AM, Drew Greenwell dgreenw...@leapfroginteractive.com wrote: Sorry Craig, I didn’t catch your second statement. The if/else modulus statement in my code generally has separate styles for the alternating row (I pass a CellStyle model that contains default and alternating styles). When I reduced the code, it would have been more appropriate for me to remove that if all together. Here is a more readable sample of my code.*** * ** ** public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { // the row index int row = indexPath.Row; var dRow = Rows [row]; // get a reusable cell instance and set the style var cell = tableView.DequeueReusableCell (TableCellIdentifier + dRow.ViewName + dRow.Text); if (cell == null) { cell = InstantiateCell(dRow, UITableViewCellStyle.Subtitle, TableCellIdentifier); cell.SelectionStyle = UITableViewCellSelectionStyle.None; var label = cell.TextLabel; label.TextColor = UIColor.Black; label.HighlightedTextColor = UIColor.Yellow; } } ** ** ** ** *From:* monotouch-boun...@lists.ximian.com [mailto: monotouch-boun...@lists.ximian.com] *On Behalf Of *Drew Greenwell *Sent:* Monday, August 20, 2012 9:07 PM *To:* Craig Dunn *Cc:* monotouch@lists.ximian.com *Subject:* Re: [MonoTouch] Setting HighlightedTextColor when UITableViewCellSelectionStyle.None is used ** ** I actually initially thought about that and wrote this code below, but it also seems to have no effect. If I call cell.SetHighlighted(true, false); immediately after initializing the cell the highlight is on, but I need it to highlight only when the row is selected. I’m getting close to saying it can’t be done without a custom cell, but that seems wrong. ** ** public override NSIndexPath WillSelectRow (UITableView tableView, NSIndexPath indexPath) { selectedRowIndex = indexPath; tableView.CellAt(indexPath).SetHighlighted(true, false);** ** return indexPath; } public override void WillDeselectRow (UITableView tableView, NSIndexPath indexPath) { tableView.CellAt(indexPath).SetHighlighted(false, false);* *** } ** ** *From:* Craig Dunn [mailto:craig.d...@gmail.com craig.d...@gmail.com] *Sent:* Monday, August 20, 2012 7:42 PM *To:* Drew Greenwell *Cc:* monotouch@lists.ximian.com *Subject:* Re: [MonoTouch] Setting HighlightedTextColor when UITableViewCellSelectionStyle.None is used ** ** What about ** ** cell.Highlighted = true; // no animation or cell.SetHighlighted(true,false); // optional animation ** ** ? I'm not really sure what effect you are trying to accomplish with this code... if it is just to have different colors on every second row, why not just set the TextColor directly inside your if-else? ** ** ** ** On Tue, Aug 21, 2012 at 6:39 AM, Drew Greenwell dgreenw...@leapfroginteractive.com wrote: Hey all, I’ve got a UITableViewCell that I want to change the HighlightedTextColor. Setting the HighlightedtextColor property only seems to work when UITableViewCellSelectonStyle is set to something other than None. Do I have to subclass UITableViewCell to get this to apply or am I just missing something? Here’s a trimmed down version of my GetCell method. Note: Setting SelectionStyle to anything but none makes the highlighted color show as expected when the row is selected public override
Re: [MonoTouch] Uitableview with images .. slow scrolling
you should look into MonoTouch.Dialog.Utilities.ImageLoader - just add a project reference to MonoTouch.Dialog-1 https://github.com/migueldeicaza/MonoTouch.Dialog#image-loading On Wed, Aug 22, 2012 at 8:44 AM, Jason Awbrey ja...@awbrey.net wrote: load the images asynchronously and cache them On Tue, Aug 21, 2012 at 5:39 PM, Aziz a-alma...@hotmail.com wrote: Hi guys I have a table view which has in getcell() the following line : cell.ImageView.Image= UIImage.LoadFromData(NSData.FromUrl(www...com )); it works and it get the image and assign it to the cell but the problem is : the scrolling in the tableview is too slow and it be fast when I remove the above line ..! how I can solve the problem ? Thanks -- View this message in context: http://monotouch.2284126.n4.nabble.com/Uitableview-with-images-slow-scrolling-tp4656636.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Uitableview with images .. slow scrolling
oh, also, i forgot this sample https://github.com/xamarin/monotouch-samples/tree/master/LazyTableImages (unfortunately it's a bit old, but might be useful reference) On Wed, Aug 22, 2012 at 8:00 PM, Wally McClure theevilprogram...@hotmail.com wrote: Apologies for just noticing this thread. I would wrap this up in a thread so that the download of the image takes place off the main thread. I've written about how to do this in: http://www.devproconnections.com/article/mobile-development/ios-uitableview-141550 I use a threadpool thread (I'm so .NET 1.0) and it works pretty well. You can do this many different ways. I've also tried with the TPL and had success. Wally -- Date: Tue, 21 Aug 2012 20:09:16 -0500 From: ja...@awbrey.net To: a-alma...@hotmail.com CC: monotouch@lists.ximian.com Subject: Re: [MonoTouch] Uitableview with images .. slow scrolling look at how it's used in Elements.cs https://github.com/migueldeicaza/MonoTouch.Dialog/blob/master/MonoTouch.Dialog/Elements.cs On Tue, Aug 21, 2012 at 8:00 PM, Aziz a-alma...@hotmail.com wrote: I'm sorry for miss understanding ..!! but I have problem with the second arrg: IImageUpdated I do't need any thing to call when the request complete ..what I need to assigin the image to cell.ImageView.Image : ( -- View this message in context: http://monotouch.2284126.n4.nabble.com/Uitableview-with-images-slow-scrolling-tp4656636p4656641.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Monotouch.Dialog with SQL-NET CRUD
TaskyPro is a very simple example that uses MonoTouch.Dialog for a list screen, and MonoTouch.Dialog's Reflection API to render the task-input form which allows for data editing and deletion. it uses the SQLite-NET library to wrap the database. Solution: https://github.com/conceptdev/xamarin-samples/blob/master/TaskyProIntegrated/TaskyiOS/ Main List View Screen: https://github.com/conceptdev/xamarin-samples/blob/master/TaskyProIntegrated/TaskyiOS/Screens/controller_iPhone.cs Task Editing Screen (MonoTouch.Dialog Reflection API) https://github.com/conceptdev/xamarin-samples/blob/master/TaskyProIntegrated/TaskyiOS/AL/TaskDialog.cs On Wed, Aug 15, 2012 at 7:02 AM, Pirate tellme007_tel...@hotmail.comwrote: hey guys , I'm still beginner but i need basic demo that shows me how to do CRUD operations and interact with elements created using Monotouch.Dialog . Preferably MVC demo . I'd be very grateful . I searched the whole internet for simple example but couldn't find . thanks a lot -- View this message in context: http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-with-SQL-NET-CRUD-tp4656524.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Need Simple UIWebView Example to Format Text
in the Monospace11 app - https://github.com/conceptdev/Monospace11 - some of the screens use webviews for formatting (found it faster to format nicely, and work cross-platform with Android). anyway, check out the SpeakerBioViewControllerhttps://github.com/conceptdev/Monospace11/blob/master/iOS/TabSpeakers/SpeakerBioViewController.cs, SessionViewControllerhttps://github.com/conceptdev/Monospace11/blob/master/iOS/TabSessions/SessionViewController.csand WebViewControllerBasehttps://github.com/conceptdev/Monospace11/blob/master/iOS/WebViewControllerBase.cs in the *WebViewControllerBase* class i have a snippet of stylesheet that gets re-used on each screen public string StyleHtmlSnippet { get { // http://jonraasch.com/blog/css-rounded-corners-in-all-browsers return style + body {background-image:url('Background.png'); background-color:#F0F0F0; }+ body,b,i,p,h2{font-family:Helvetica;} + h1,h2{color:#F09402;} + h1,h2{margin-bottom:0px;} + .footnote{font-size:small;} + .sessionspeaker{color:#44;font-weight:bold;} + .sessionroom{color:#66;} + .sessiontime{color:#66;} + .sessiontag{color:#800020;} + div.sessionspeaker { -webkit-border-radius:12px; background:white; width:285; color:black; padding:8 10 10 8; } + a.sessionspeaker {color:black; text-decoration:none;}+ /style; } } and then the code calls 'FormatText()' (which is overridden in the subclasses) and display the html in a webview. notice it sets up the base directory so that images from inside the app bundle can be displayed (eg. background image referenced in the CSS). i've summarised the ViewDidLoad() method here: basedir = Environment.GetFolderPath (System.Environment.SpecialFolder.Personal); basedir = System.IO.Path.Combine (basedir, .., Monospace11.app); // USE YOUR APP BUNDLE NAME webView.LoadHtmlString(FormatText(), new NSUrl(basedir, true)); THEN in the *subclasses*, override FormatText() to return a string of HTML, incorporating the StyleHtmlSnippet and using styled elements like H2, and class = body or sessionspeak... protected override string FormatText () { StringBuilder sb = new StringBuilder (); sb.Append (StyleHtmlSnippet); sb.Append (h2 + _speaker.Name + /h2 + Environment.NewLine); if (!string.IsNullOrEmpty (_speaker.Bio)) { sb.Append (span class='body' + _speaker.Bio + /spanbr/); } sb.Append (br /); foreach (var session in _speaker.Sessions) { sb.Append (div class='sessionspeaker'a href='http://MIX10.app/; + session.Code + ' class='sessionspeaker' + session.Title + /a/divbr /); } return sb.ToString (); } IF you need to catch links inside the HTML and do custom stuff, for more info on making the http://MIX10.app urls work, see the WebViewDelegate.ShouldStartLoad() methods in each page... HTH cd On Fri, Sep 7, 2012 at 7:28 AM, Jason Awbrey ja...@awbrey.net wrote: I would go even simpler (there are probably syntax mistakes in this, but you get the idea) html body pthis is my textp pspan style=font-family: arial; font-size: 14px; font-weight: bold this is more text in a different font /span span style=color: redthis more text, but colored!/span /p /body /html if you're still stuck feel free to send me an example of what you're working on and I'll try to help On Thu, Sep 6, 2012 at 4:17 PM, Chris_M kungfuchri...@yahoo.com wrote: Thanks, Jason. To be honest, embedded css is kind of new territory for me, although it *seems* like it ought to be the path of least resistance. I have tried something along the lines in this example: http://www.blooberry.com/indexdot/css/examples/cssembedded.htm Embedded CSS Example . Now, what I tried is much simpler than that (I'd post the code, but it's all messed up at this exact moment), but I get Unexpected Symbol [...], expecting identifier error messages pretty much with every CSS element. That's why I was hoping there might be a simple example online somewhere that is known to work in MonoTouch that I could look at. Really, just seeing a MonoTouch-friendly example that sets the font to a particular size and typeface would be a huge help. --Chris jawbrey wrote Just using html with embedded css should do the trick. Can you post a sample of what you're doing and why it doesn't work? On Thu, Sep 6, 2012 at 3:32 PM, Chris_M kungfuchris99@ wrote: I have a page of dynamically generated data and text (pulled from a database and parsed) to display. The formatting isn't going to be fancy -- I need to set the font, have some bold text some plain text, change the font color in a few places, and control the line spacing some. A UIWebView should do the trick, but I haven't been able to get the font stuff to work the way it should when building a web page. I Googled for help, but I just a ton of responses that aren't helpful. Can someone point me in the direction of a simple example online of what I'm looking for that changes or sets the actual font, changes the font size, changes the font color, like
Re: [MonoTouch] Issue with tableView [Noob]
not 100% sure what you mean? if you're using one of the built-in UITableViewCell layouts, eg cell = new UITableViewCell (UITableViewCellStyle.Default, cellIdentifier); then the text _is_ being displayed in a UILabel, so you can just set the shadow properties: cell.TextLabel.ShadowColor = UIColor.Gray; cell.TextLabel.ShadowOffset = new System.Drawing.SizeF(2,2); ? On Fri, Sep 14, 2012 at 7:52 AM, Kris Bloom k...@ev3d.net wrote: i am trying to figure out how to add a simple Table Cell that has an image, text and i want the text to have a shadow like the UILabel does.. I got it working great with the StyledStringElement but it does not have a way to do the text shadow. I then tried UITableViewCell but it doesn't have a tapped event. Am i caught in a catch 22 here? Any help would be great :) Thanks, Kris Bloom Extreme Velocity 3D www.ExtremeVelocity3d.com ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] StoreKit: UpdatedTransactions() not called for restores?
Hey there, I know that Restore does work, as I've built commercial apps that implement it; and the Xamarin sample also works for me. The documentation basically says if there are no restorable-transactions then UpdatedTransactions() won't get called. If PaymentQueueRestoreCompletedTransactionsFinished() *is* getting called, then that indicates that StoreKit is definitely hearing you and trying to restore! So it is puzzling... Might as well check all the obvious stuff: - there have definitely been purchases done by the Test Apple ID that is performing the restore? - especially, these transactions are definitely having the FinishTransaction() method called on them? - the type of products you are selling are Non-Consumable (or Auto-renewing subscription)? All other product types don't get Restored. Finally, although you don't *have* to do anything in PaymentQueueRestoreCompletedTransactionsFinished() I think it is nice to provide some sort of indication to the user that a Restore was run and is now complete. Otherwise they have just pressed a button (Restore) but with no visual feedback or idea whether it worked or not! As for speed - yes, sandbox can be slow. I've been testing other features of StoreKit the past few days and haven't had any problems (other than it's slightly slower than production). HTH craig On Tue, Sep 18, 2012 at 8:18 PM, dermotos m...@dermotos.com wrote: I've implemented my in app purchasing, and the purchasing itself works fine. I have based it on the Xamarin sample. However, when I do a restore purchase (SKPaymentQueue.DefaultQueue.RestoreCompletedTransactions();) the delegate PaymentQueueRestoreCompletedTransactionsFinished(SkPaymentQueue queue) (phew!) gets called, but UpdatedTransactions doesn't. According to Apple docs: paymentQueueRestoreCompletedTransactionsFinished: Tells the observer that the payment queue has finished sending restored transactions. Discussion This method is called after all restorable transactions have been processed by the payment queue. *Your application is not required to do anything in this method.* Is this a StoreKit bug? Everything is setup correctly, if I literally just switch the button that calls purchase to restore instead, the above behavior occurs. Im wondering has anyone encountered similar issues? Im also having strange problems at the moment creating test users (every user, no matter what details I enter already exists apparently). Hopefully Apple are just making changes. Anyone else encounter issues with StoreKit? One other thing, I noticed that the sandbox is vey slow. It can take up to a minute sometimes for the UpdatedTransactions() method to fire during purchases. Is this normal/limited to sandbox? Thanks. :-) -- View this message in context: http://monotouch.2284126.n4.nabble.com/StoreKit-UpdatedTransactions-not-called-for-restores-tp4657072.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Passbook API
The PassBook API lets you read passes that have been created and signed with a certificate attached to your TeamID. So you can create multiple pass types (each with their own certificate), distribute them to customers and write multiple apps that can read one type or all of those passes. Your apps cannot read passes signed by other companies. Note: you do not create passes on a device, they must be created on a server somewhere, since they require a certificate for signing, and the certificate should be private/secure. you can 'trigger' pass creation on a device in your app (so it looks to the user like it is being created) but you should write a webservice or something and do the actual pass creation on the server. there's a few forks of ZXING barcode reader for MT (eg. https://github.com/JohnACarruthers/zxing.MonoTouch), i have tested it with PassKit barcodes and it has worked. others like redlaser should also work. for those that haven't already read about it - http://docs.xamarin.com/ios/tutorials/Introduction_to_PassKit HTH craig On Fri, Sep 21, 2012 at 5:53 AM, Abe Gillespie abe.gilles...@gmail.comwrote: Does the API also allow you to read passes? Say I want to create a pass on one device and read a pass on another. Is this possible through the Passbook API? Or is there a reliable barcode reader lib or method to do so? Thanks. -Abe ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Maptastrophe?
looks like the URL to 'capture' requests from an app via OpenUrl() and show the Maps app is now: http://maps.apple.com/maps?q=cupertino https://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html#//apple_ref/doc/uid/TP40007894-SW1 OT: interestingly, there is still documentation for the youtube URL scheme :) https://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/YouTubeLinks.html#//apple_ref/doc/uid/TP40007895-SW1 On Mon, Sep 24, 2012 at 11:01 PM, Jason Awbrey ja...@awbrey.net wrote: I don't believe that they are still capturing maps.google.com - when I click on map links I get taken to Google maps in Safari however, I agree that the new map is a huge step back - I was in San Antonio a few weeks ago while running the beta, and the maps app kept insisting the nearest Sea World was in Orlando On Mon, Sep 24, 2012 at 7:01 AM, Alex White alexwhit...@gmail.com wrote: The apple maps are sub-standard all my windows users (over 1000 of them) that use the iPhones and iPads that have upgraded to IOS6 have taken their devices into the apple stores and got replacement units as the mapping component is completely useless and there seems to be no way to take the devices back to IOS6. My users use the street view function a huge amount and need complete mapping and street view of the whole of london, the Apple mapping has major gaps in it. Whilst there is apps that do this job, it is completely out of order that apple have hijacked maps.google.com and map it to somewhere else, if they are not going to use maps.google.com for their component then they should release the URL so that it can be used in safari. This upgrade has gone down very badly in my user base, many of the guys that were going to upgrade their phones are not going to now. ATB Alex On 24 Sep 2012, at 10:20, Rolf Bjarne Kvinge r...@xamarin.com wrote: Hi, On Sun, Sep 23, 2012 at 11:25 PM, Chris_M kungfuchri...@yahoo.comwrote: I am very close to having my first app ready to submit to Apple -- except that I haven't looked at any iOS related stuff yet. Now I'm kind of scared. I display a Google Maps view in the app itself and there's also functionality to launch the external Maps app. Will either of these work in iOS 6? The API hasn't changed at all, you do it the exact same way you used to with the Google maps and in iOS6 it'll use the Apple maps. In other words: you don't have to do anything at all to make the Apple maps work if you already have the Google maps working. Rolf Reading all of the problems with Apple's new Maps app, I'm not really super excited about the prospect of switching to it instead. If I do have to switch to Apple Maps for iOS 6 support, I assume I'll have to use code to detect the OS version and will be able to stick with what I got for iOS 5 and earlier, and then implement the code to use Apple Maps separately if the user is using iOS 6? (I looked and didn't see this addressed elsewhere, so if it has come up already I apologize.) --Chris -- View this message in context: http://monotouch.2284126.n4.nabble.com/Maptastrophe-tp4657170.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Error in creating GeoLocation since MT 6.0
basically it says: (as of September 20th) The currently available binaries are now compiled for MonoTouch 6.http://xamarin.com/mobileapi if you're using the mobileAPI (Xamarin.Geolocation) maybe try downloading the latest from that link? On Thu, Sep 27, 2012 at 5:21 PM, Rolf Bjarne Kvinge r...@xamarin.comwrote: Hi, See this: https://bugzilla.xamarin.com/show_bug.cgi?id=7331 Rolf On Thu, Sep 27, 2012 at 3:56 AM, technohead dj_technoh...@yahoo.comwrote: Hi, I've just recently upgraded to MT 6.0 and tried recompiling some pre-existing code that was working in MT 5.4. I'm getting the runtime error: Method not found: MonoTouch.CoreLocation.CLLocationManager.add_AuthorizationChanged'. when trying to create an instance of Geolocator using the following code: Geolocator geolocator = new Geolocator { DesiredAccuracy = 10 }; I have not installed XCode 4.5 so am still compiling against iOS SDK 5.1. I am currently avoiding installing 4.5 because I still want to be able to compile apps for arm V6. Is this a bug or does this require an upgrade of the iOS SDK? Dennis -- View this message in context: http://monotouch.2284126.n4.nabble.com/Error-in-creating-GeoLocation-since-MT-6-0-tp4657263.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Any idea what this could be?
from what version did you move _to_ 6.0.3? perhaps the changelog between the two releases might point at something that's been updated to give you a clue? also, 6.0.4 has been released http://docs.xamarin.com/ios/releases/MonoTouch_6/MonoTouch_6.0#MonoTouch_6.0.4 -- you might already have been prompted to download that? might be worth trying? alternatively, does downgrading back to the previous MT version you had fix the problem? cd On Sat, Oct 13, 2012 at 11:40 AM, Dean Cleaver dean.clea...@xceptionsoftware.com wrote: James, ** ** I did share the code. That’s it: ** ** public override void WillEnterForeground(UIApplication application) { try { //ThreadPool.QueueUserWorkItem(this.EnterForeground); } catch (Exception ex) { Application.SendError(ex); } } ** ** I can’t publish my entire app code in here. But why am I getting exceptions that simply crash my app in a method that I have no real code in? Even if I comment out the entire “WillEnterForeground” I still get explosions that just kill the app completely. ** ** It will not break in code – always just blows up. Never blew up before, just after I made the mistake of upgrading to MonoTouch 6.0.3. This code has been working for over 12 months, and now I’m in deep shit where I can’t publish a new version because I cannot get any help on some severe crashes. ** ** Hell – I’ve even got one crash on an iPad where it actually manages to disable the Home button until you reboot the device – any ideas what API I might be using incorrectly to achieve that? ** ** Dino ** ** *From:* James Darbyshire [mailto:james.darbysh...@blazeware.net] *Sent:* Friday, October 12, 2012 19:35 *To:* Dean Cleaver *Cc:* monotouch@lists.ximian.com *Subject:* Re: [MonoTouch] Any idea what this could be? ** ** To be blunt, we can't help without having code to look through. ** ** MonoTouch doesn't just add method calls, and throw exceptions on its own. ** ** My guess is that your problem is probably an incorrect use of an API or object somewhere. ** ** iOS application development is a lot more accessible now, thanks to MT, but if you don't do the basics, just as with ObjC or PhoneGap (et. al.) your foundations will be shaky. ** ** Share the code, or at least somewhere we can reproduce the problem, and we can help you diagnose the problem. Regards, ** ** James On 13/10/2012, at 11:23 AM, Dean Cleaver dean.clea...@xceptionsoftware.com wrote: Anyone able to help before I ditch MonoTouch and try something that works? We are seriously in a position where we cannot release code because of this problem, and the CEO is discussing ditching MonoTouch completely because we can’t rely on it to work. Dino *From:* Dean Cleaver *Sent:* Friday, October 12, 2012 17:16 *To:* Dean Cleaver; monotouch@lists.ximian.com *Subject:* RE: Any idea what this could be? It’s now seemingly not Linea – just random: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[OS_dispatch_semaphore UIApplicationWillEnterForeground:]: unrecognized selector sent to instance 0x81b27e0 at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38 at KleverLogic.FlashValet.iPhone.Valet.Application.Main (System.String[] args) [0x00048] in /xsl-home/kleverlogic/FlashValet/Mobile/iPhone/Valet/Main.cs:40 And here’s my WillEnterForeground: public override void WillEnterForeground(UIApplication application) { try { //ThreadPool.QueueUserWorkItem(this.EnterForeground); } catch (Exception ex) { Application.SendError(ex); } } Yeah – basically empty, yet it still crashes in the UIApplicationWillEnterForeground – any ideas? Dino *From:* monotouch-boun...@lists.ximian.com [ mailto:monotouch-boun...@lists.ximian.commonotouch-boun...@lists.ximian.com] *On Behalf Of *Dean Cleaver *Sent:* Thursday, October 11, 2012 15:00 *To:* monotouch@lists.ximian.com *Subject:* [MonoTouch] Any idea what this could be? I got
Re: [MonoTouch] Any idea what this could be?
Yeah, actually deploying a MT5.2-based app might not be the solution, just wondering if it resolves the issue and therefore helps narrow it down to something in MT or something in the app? Another thing that I'm not sure you've mentioned is whether it is easily, reliably reproducible - or just random? If random, is it still guaranteed to happen within a certain period (ie. always happens within 5 minutes of usage) or something like that? You did say that sometimes it fails differently (ie. disables home button?) - is it always the same error message with the same 'breaking' behaviour, or was that a specific combination of code that was repeatable? since the errors are around foreground behaviour, i As you said, it feels like a needle in a haystack. When all else fails, I usually end up doing a source-control diff to my last-known-good version and undoing everything bit-by-bit. Even that is very difficult if you can't easily/reliably reproduce in the first place, cause you don't know when it's fixed :) If you _can_ easily/reliably reproduce, the best bet is to gradually rip out code until you have the smallest breaking example and submit that to bugzilla for the devs to investigate. But that only works if it is reproducible to start with :-\ wish i could give some more concrete advice, but as you say it's a very vague situation to start with. cd p.s. random question: I presume that WillEnterForeground code is in your AppDelegate? are you also creating NSNotificationCenter.DefaultCenter.AddObserver() listeners for UIApplication.WillEnterForegroundNotification anywhere in your app? long shot i know... On Sat, Oct 13, 2012 at 12:11 PM, Dean Cleaver dean.clea...@xceptionsoftware.com wrote: Craig, ** ** I went from version 5.2.12. I didn’t know 6.0.4 was out, until I re-started MonoDevelop after installing 5.2.12 again, but I see it only changes a compiler setting for something specific. ** ** Am going to recompile in 5.2.12 and see if the CEO has the same problems. If so, it probably is something I did in code, but what I have no idea. The exception reports are all extremely vague. ** ** Looks like going back to 5.2.12 is not an option as I still only have SDK 6 as a choice, and it means all the orientation stuff is broken. So unless I buy another Mac with Lion on it and go back to XCode 4.4 I’m not sure how I can get around that. ** ** Dino ** ** *From:* Craig Dunn [mailto:craig.d...@gmail.com] *Sent:* Friday, October 12, 2012 19:44 *To:* Dean Cleaver *Cc:* James Darbyshire; monotouch@lists.ximian.com *Subject:* Re: [MonoTouch] Any idea what this could be? ** ** from what version did you move _to_ 6.0.3? perhaps the changelog between the two releases might point at something that's been updated to give you a clue? ** ** also, 6.0.4 has been released http://docs.xamarin.com/ios/releases/MonoTouch_6/MonoTouch_6.0#MonoTouch_6.0.4 -- you might already have been prompted to download that? might be worth trying? alternatively, does downgrading back to the previous MT version you had fix the problem? ** ** cd ** ** On Sat, Oct 13, 2012 at 11:40 AM, Dean Cleaver dean.clea...@xceptionsoftware.com wrote: James, I did share the code. That’s it: public override void WillEnterForeground(UIApplication application) { try { //ThreadPool.QueueUserWorkItem(this.EnterForeground); } catch (Exception ex) { Application.SendError(ex); } } I can’t publish my entire app code in here. But why am I getting exceptions that simply crash my app in a method that I have no real code in? Even if I comment out the entire “WillEnterForeground” I still get explosions that just kill the app completely. It will not break in code – always just blows up. Never blew up before, just after I made the mistake of upgrading to MonoTouch 6.0.3. This code has been working for over 12 months, and now I’m in deep shit where I can’t publish a new version because I cannot get any help on some severe crashes. Hell – I’ve even got one crash on an iPad where it actually manages to disable the Home button until you reboot the device – any ideas what API I might be using incorrectly to achieve that? Dino *From:* James Darbyshire [mailto:james.darbysh...@blazeware.net] *Sent:* Friday, October 12, 2012 19:35 *To:* Dean Cleaver *Cc:* monotouch@lists.ximian.com *Subject:* Re: [MonoTouch] Any idea what this could be? To be blunt, we can't help without having code to look through. MonoTouch doesn't just add method calls, and throw exceptions on its own
Re: [MonoTouch] UIRefreshControl UITableView
Wally, I don't see you assigning the UIRefreshControl you created to the UITableView's RefreshControl property. You've got a local var refresh but unless the table view itself has the widget assigned, it won't work... you could probably just ditch your field and assign to the TableView.RefreshControl property directly? cd On Thu, Dec 13, 2012 at 11:46 AM, Wally McClure theevilprogram...@hotmail.com wrote: I am trying to get the UIRefreshControl to work in a UITableView. I've been reading the content at Craig Dunn's blog on the UIRefreshControl. It would seem to me that I would need to add a UIRefreshControl into the UITableViewController. Unfortunately, that is a no go. I don't seem to get the effect that I am looking for as the HandleValueChanged event is never called. What do I need to do to go about using the UIRefreshControl and a UITableView? public class MyTableController : UITableViewController { TwitterSearch ts; UIRefreshControl refresh; public MyTableController () { } public override void ViewDidLoad () { base.ViewDidLoad (); } public override void ViewDidAppear (bool animated) { base.ViewDidAppear (animated); ts = new TwitterSearch(); ts.StartSearch(MonoTouch, new AsyncCallback(ProcessResult)); refresh = new UIRefreshControl (); refresh.ValueChanged += HandleValueChanged; } void HandleValueChanged (object sender, EventArgs e) { Console.WriteLine (HandleValueChanged); ts.StartSearch(MonoTouch, new AsyncCallback(ProcessResult)); } void RefreshData(IAsyncResult iar) { ListTweet twtL = ts.ProcessRestXmlLINQHttpResponse (iar); var td = new TweetListData (twtL); InvokeOnMainThread (delegate { TableView.DataSource = td; TableView.ReloadData (); if ( refresh.Refreshing ) { refresh.EndRefreshing(); } }); } void ProcessResult(IAsyncResult iar){ RefreshData (iar); } } ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Multiple projects
That is normally what people expect - assuming the startup project references the other one, you really want them both to be compiled so that the latest changes are all included. Aanyway... to change the behavior, right click on your solution in MonoDevelop Options Build Configurations Configuration Mappings tab ... there you can untick the Build column to control which solutions are built in which configurations. [screenshot] http://www.screencast.com/t/zyPniBRlPc Note: i'm not necessarily recommending that, as if you forget about it later (or someone else uses your solution) it can easily get confusing as to why one of the projects doesn't build with the others... cd On Thu, Dec 13, 2012 at 1:37 PM, Guido Van Hoecke gui...@gmail.com wrote: project. Still when I build the current startup project, it builds both ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Load image from native library resources
I think they'll be in the 'root' file location of the App Bundle? If the library has them in a folder-structure, then the folder structure will be preserved, based in the App Bundle root... On Fri, Dec 14, 2012 at 8:22 AM, Nic Wise n...@fastchicken.co.nz wrote: If you build the app, and look inside the .app folder/file, whats in there? a folder called Resources with your files? If so, just do UIImage.FromFile(Resources/whatever.png); :) On Fri, Dec 14, 2012 at 2:53 PM, Dennis Welu dennisw...@motisconsulting.com wrote: Any tricks / is it possible to load an image in the Resources folder of a bound native library? I have the native library, the bindings project, and the application using it. From the application code I've tried various things to load a png from the library resources. Is this a case where I should be using UIImage.FromAssembly maybe? Can't seem to get FromBundle/FromFile to work no matter what image name/path I try. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Load-image-from-native-library-resources-tp4657849.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Storyboard and localization
Storyboards provide a nice design-time experience for UI layout, navigation design and can be faster to load in your app than XIBs. Regarding l10n however, this quote is from Apple's docs: *Note:* Before Xcode 4.5, developers and localizers had to modify storyboards and nib files for each language an app supported. The task required not only that they translate the visible or audible text of a storyboard or nib, but that they adjust the sizes and positions of views after translation. In iOS5 an earlier, it isn't possible to 'localize' a Storyboard file... there were two options available: 1) create a separate *.storyboard _for each language_ (ie. copy and paste the storyboard into each *.lproj folder, and type the localized strings into the storyboard directly) 2) create your storyboard _not_ in an *.lproj folder, and ensure all the localizable elements have an outlet created so you can access from C#. Then in your MonoTouch code, set the display properties directly eg title.Text = MonoTouch.Foundation.NSBundle.MainBundle.LocalizedString (Task Details, Task Details); Both these approaches are very manual. In iOS6 Apple introduced a new concept called Base Localization - but this ONLY works on iOS6 so if you want backwards compatibility with iOS5 and earlier, you can't use it. There are details in this link https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/chapters/InternationalizeYourApp/InternationalizeYourApp/InternationalizeYourApp.html This method introduces a new folder - Base.lproj - where you put your *.storyboard files. Then in each *.lproj folder you create a .strings file with the same name as the storyboard. For now, MonoDevelop does not offer the IDE helpers that Xcode does (as described in that link) but you *can* do it manually - i've just pushed an example https://github.com/conceptdev/xamarin-samples/tree/master/TaskyL10nStoryboard note that it does get tricky - you need to match up the object-ids in Xcode to create the localization keys, like this: SXg-TT-IwM.placeholder = nombre de la tarea; Pqa-aa-ury.placeholder= ; zwR-D9-hM1.text = Detalles de la tarea; bAM-2j-Rzw.text = Notas; NF3-h8-xmR.text = Completo; MWt-Ya-pMf.normalTitle = Guardar; IGr-pR-05L.normalTitle = Eliminar; HTH cd On Fri, Dec 28, 2012 at 5:48 AM, Morten Kruse krus...@msn.com wrote: I think that it is a NO then. It is not possible to localize the storyboard. But why use it then? -- View this message in context: http://monotouch.2284126.n4.nabble.com/Storyboard-and-localization-tp4657895p4657902.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] IOS to Android
it will depend on the structure of the monotouch app. all the UIKit code (views, viewcontrollers, ui controls) will need to be re-written for Android (views, activities, ui controls). HOWEVER all non-UI-specific code should be re-usable... you might just need to check some assumptions about filesystem use (Android doesn't have all the special directories that iOS app sandbox does). will also depend on whether that non-UI-code is already separated out into distinct classes or even a library project. some of the issues around code sharing across both platforms are covered in http://docs.xamarin.com/ios/Guides/Application_Fundamentals/Building_Cross_Platform_Applications hard to be more specific about how fast and easy, but certainly having it all in C# that you can share is a good start! there are many examples of Xamarin-built apps that run on both :) On Thu, Jan 31, 2013 at 2:16 PM, Alejandro Vazquez alexvazq...@yahoo.comwrote: Hi, Does anyone know how fast and easy is to migrate a monotouch ios app to mono for android? Thanks a lot ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] building a ipa from visual studio with Xamarin Studio
I'm just looking at this now. There is a button in the iOS toolbar in Visual Studio - Show IPA file in Finder, which I think some of you have already found. It doesn't seem to work as expected, however; or else there's some ritual to follow first in terms of the configuration you build, etc. I'm going to see if I can find out what that is. If you are watching the Output Window Mac Server Log you'll see the output that gives you a hint about where the final .app bundle goes. I am choosing BUILD Deploy from the menubar (ensuring the configuration i'm using has 'Deploy' ticked in the Solution Configuration options). as an example, the app i'm currently building is going to: /Users/*craigdunn*/Library/Caches/Xamarin/mtbs/builds/*Monospace11* /efaef3ca-cbcf-49e2-a52a-069372d79667/output/Release/iPhone/*Monospace11* .app obviously this isn't an IPA, but it's a start. will post more info when i know it. cd On Tue, Mar 5, 2013 at 2:37 PM, Nic Wise n...@fastchicken.co.nz wrote: I do it in XS, I dont have VS here. But you do it via Project - Zip App Bundle (IPA is a zip!) or Build - Archive and it ends up in the XCode Organiser's archive section. But to do an IPA to upload to itunes, zip app bundle works. Now, does VS have it... I'm not sure :( On 5 March 2013 21:49, John Thornton johnt...@microsoft.com wrote: Can anyone tell me how to produce an IPA using XS and a build host from Visual Studio 2012? Myself and several others have asked this on the Forums but I’ve seen no official response yet. Is this supported? http://forums.xamarin.com/discussion/comment/6384/#Comment_6384 http://forums.xamarin.com/discussion/comment/6385/#Comment_6385 http://forums.xamarin.com/discussion/comment/6469/#Comment_6469 Thanks, John ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Xamarin.iOS to Xamarin.Mac Roseta Stone
the biggest shock for me was how different NSTableView was - it's still kinda familiar (and let me get a basic sample http://conceptdev.blogspot.com/2012/09/microsofts-azure-mobile-services-and_13.htmlup and running pretty quick) but the Mac controls definitely feel different to iOS :) bon voyage! cd On Thu, Mar 21, 2013 at 9:48 AM, Nic Wise n...@fastchicken.co.nz wrote: I've not seen one, but generally CocoaTouch - Cocoa UI* - NS* NS* - NS* (no change) Basically, you have UIKit on CocoaTouch, and you have AppKit, I think, on Cocoa. They don't do the same thing, at all, tho the basic metaphores and patterns are similar. Best thing apple did (and WORST thing MSFT did with windows.forms on desktop and mobile and web) was to throw out the old UI controls and start again with UIKit. You then go in without preconceived notions of what a Button should do for example. Would love to know how you get on, if you blog about it etc. On 21 March 2013 15:43, ric3kg rickgr...@mac.com wrote: I'm about to embark on the voyage of converting an iOS app to the Mac and was wondering if there might be a Roseta Stone to help guide my journey? Something like UIWebView = WebView... Thanks, Rick -- View this message in context: http://monotouch.2284126.n4.nabble.com/Xamarin-iOS-to-Xamarin-Mac-Roseta-Stone-tp4658166.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Database Encryption
Depends on how secure you want it to be - the sandbox (plus curated app store) generally means other applications can never hack at/steal your data, and in the /Library/ folder end-users generally won't find it either. However, if the phone/device was stolen, unencrypted files are fairly simple for someone to find (eg. using PhoneDiskhttp://www.macroplant.com/phonedisk/, doesn't require jailbreaking). So if you want to protect the data even if a phone is lost or stolen, considering encryption is probably a good idea. There's nothing built-in to Xamarin to do that, but there is a component available to purchase on the store SQLCipher https://components.xamarin.com/view/sqlcipher-for-xamarin/ HTH Craig On Thu, Mar 21, 2013 at 10:59 AM, Matronix matro...@gmail.com wrote: I have a current application that I will be be expanding on. The current application has a sqlite db that stores some data and I want to add to it. The data I am going to add will be sensitive information. If the database is in the /Library/ directory, is encryption needed? What does encrypting the DB stop since everything will be in a sandbox? Are there build in ways to encrypt the db? -- View this message in context: http://monotouch.2284126.n4.nabble.com/Database-Encryption-tp4658170.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How to save the file to user accessible folder outside the application bundle in Ipad
this doc might help http://docs.xamarin.com/guides/ios/application_fundamentals/working_with_the_file_system On Wed, Apr 24, 2013 at 11:50 PM, madhusudhan reddy ymadhusudhanredd...@gmail.com wrote: I have an application where i need to save the PDF to a folder where user can see and access the folder in ipad. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Hosting database server or services in iOS
Here's a pretty old (2009) sample from Mike doing some basic listening/response from iOS http://mikebluestein.wordpress.com/2009/10/13/create-a-mini-web-server-using-monotouch-to-serve-up-a-silverlight-app-to-your-desktop/ HTH On Tue, Aug 27, 2013 at 8:42 AM, Nic Wise n...@fastchicken.co.nz wrote: BTW, thinking about it, you can run a HTTP or FTP Server on iOS, tho you app must be in the foreground. ewallet and airforms (http://polarbearfarm.com/airforms/) both do it. They are done in ObjC, but there is no reason not to be able to do it in Xam.iOS. On 27 August 2013 16:41, Nic Wise n...@fastchicken.co.nz wrote: You might need to read around. I think you can create a HTTP server on iOS (ie, listen to a socket and do something), and it might be built in to .NET / Mono too. However, if the app isn't the front up (eg someone switches out to safari for a short period) then it gets shut down - no background processes. Possibly the same if the power button gets hit by accident. As I said in the last one, I'd go for json over http, as it's _easy_, and quite quick. Personally, I think I'd go for a Mac Mini or similar (maybe even a Raspberry PI or something _tiny_, depending on how much control you have over the client setup), and have that as the host. Then you can do whatever you want without having to work around iOS limitations. iOS7 may change that a bit, but I'm not sure I'd build a business on it :) Also think about what happens if the server disappears, or if the network goes down (as they do) On 27 August 2013 09:24, hocp...@yahoo.com hocp...@yahoo.com wrote: Hello, I've developed a Point of Sales (POS) app on the iPad and iPhone. The app used local SQLite database to store data. The app mainly operates in a single store (close loop) environment with local network router. But in this environment I need to be able to run several iPad(s) connecting together in a single database. I want one iPad at the cashier counter to host the database and the rest of the iPad devices connecting to the host. In the POS environment all app needs to be responsive in real-time or close to real-time data access, because there a lot data transfers between them. I think Core Data, web service, MS Azure, etc. is not going be responsive enough. Nor having a local desktop Windows server to provide local data access will NOT cut it because we want the store owner to be able to bring the host iPad home after closing the shop. Questions: 1. Can I develop the app to host local database? 2. What is the best network protocol for the host? Socket, REST, JASON, WCF -Thanks Andrew Pham -- View this message in context: http://monotouch.2284126.n4.nabble.com/Hosting-database-server-or-services-in-iOS-tp4658440.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Error with monotouch.dialog (new monotouch update)
an easy fix is to build up the Sections manually rather than combining it all into one statement, for example this old code: Root = new RootElement (Tasky) { new Section() { from t in tasks select (Element) new StringElement((t.Name==?newTask:t.Name), t. Notes) } }; INSTEAD becomes this -- ListElement le = new ListElement(); foreach (var t in tasks) le.Add (new StringElement((t.Name==? newTask:t.Name), t.Notes)); // add to section var s = new Section (); s.AddAll (le); // add as root Root = new RootElement (Tasky) { s }; Let us know if you have trouble converting your code - I think you'll need to flatten out both your Sections. It may not look as pretty but at least it is unambiguous. This is not related to Xcode 5 or iOS 7 specifically, I think it is related to the changed covariance/contravariance handling of generic types in the latest version of Mono... (someone correct me if i'm wrong there). On Tue, Sep 24, 2013 at 5:58 PM, Alejandro Vazquez alexvazq...@yahoo.comwrote: Hi, I used to have the following code: var root = new RootElement (Tasks){ new Section (Process Type) { new RootElement (Process, new RadioGroup ( processtype, 0)){ new Section (){ guarantor,dependent, volunteer, // all these are Elements } } } }; Now, I update Monotouch SDK, Xcode 5, etc... and when I try to build the project I get an error on the following line: new RootElement (Process, new RadioGroup (processtype, 0)){ with the following error: HumanResources/HumanPendingRequests.cs(18,18): Error CS0121: The call is ambiguous between the following methods or properties: `MonoTouch.Dialog.Section.Add(MonoTouch.Dialog.Element)' and `MonoTouch.Dialog.Section.Add(System.Collections.Generic.IEnumerableMonoTouch.Dialog.Element)' (CS0121) Any clue on how to fix it and why is now showing that error? Thanks a lot. Alejandro ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Error with monotouch.dialog (new monotouch update)
LOL yeah casting works too haha... in my defense, it was late when i typed that ;) On Wed, Sep 25, 2013 at 5:02 AM, Alejandro Vazquez alexvazq...@yahoo.comwrote: Thanks a lot Craig, What I just did is: var root = new RootElement (Tasks){ new Section (Process Type){ (MonoTouch.Dialog.Element)new RootElement (Process, new RadioGroup (processtype, 0)){ new Section (){ guarantor,dependent, volunteer // all these are Elements } } } }; And it now compiles without errors. Thanks a lot! Alejandro -- *From:* Craig Dunn craig.d...@gmail.com *To:* Alejandro Vazquez alexvazq...@yahoo.com *Cc:* monotouch@lists.ximian.com monotouch@lists.ximian.com *Sent:* Tuesday, September 24, 2013 11:31 PM *Subject:* Re: [MonoTouch] Error with monotouch.dialog (new monotouch update) an easy fix is to build up the Sections manually rather than combining it all into one statement, for example this old code: Root = new RootElement (Tasky) { new Section() { from t in tasks select (Element) new StringElement((t.Name==?newTask:t.Name), t. Notes) } }; INSTEAD becomes this -- ListElement le = new ListElement(); foreach (var t in tasks) le.Add (new StringElement((t.Name==? newTask:t.Name), t.Notes)); // add to section var s = new Section (); s.AddAll (le); // add as root Root = new RootElement (Tasky) { s }; Let us know if you have trouble converting your code - I think you'll need to flatten out both your Sections. It may not look as pretty but at least it is unambiguous. This is not related to Xcode 5 or iOS 7 specifically, I think it is related to the changed covariance/contravariance handling of generic types in the latest version of Mono... (someone correct me if i'm wrong there). On Tue, Sep 24, 2013 at 5:58 PM, Alejandro Vazquez alexvazq...@yahoo.comwrote: Hi, I used to have the following code: var root = new RootElement (Tasks){ new Section (Process Type) { new RootElement (Process, new RadioGroup ( processtype, 0)){ new Section (){ guarantor,dependent, volunteer, // all these are Elements } } } }; Now, I update Monotouch SDK, Xcode 5, etc... and when I try to build the project I get an error on the following line: new RootElement (Process, new RadioGroup (processtype, 0)){ with the following error: HumanResources/HumanPendingRequests.cs(18,18): Error CS0121: The call is ambiguous between the following methods or properties: `MonoTouch.Dialog.Section.Add(MonoTouch.Dialog.Element)' and `MonoTouch.Dialog.Section.Add(System.Collections.Generic.IEnumerableMonoTouch.Dialog.Element)' (CS0121) Any clue on how to fix it and why is now showing that error? Thanks a lot. Alejandro ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch