Chris Rae

1

votes
1

answer
980

views

How to specify an absolute screen location in a storyboard (not relative to original control position)

I have a UserControl with a storyboard embedded in it. There will be a few of these UserControls spread around the screen, and when the user clicks on them I'd like the selected one to animate itself into the middle of the screen. I am using a Storyboard inside the user control to do this. However,...
Chris Rae
-1

votes
3

answer
54

views

How to call an async function in .NET without waiting for it

I have an async function in C# as follows: private static async Task AddEmoji(string emoji) { ... } I have a situation where I'd like to call it but I don't want to wait for its result and I don't care if it works or not. What's the right way to go about this? I thought I could just call it without...
Chris Rae
1

votes
1

answer
407

views

Is UserExtendedProperties.GetValue user-specific or device-specific?

I'd like to use UserExtendedProperties.GetValue to associate a user with a high score table in a game I'm working on. Reading Microsoft's own API description I cannot work out whether this applies to a user ([email protected]) or a physical device. Does anyone know? Chris
Chris Rae
1

votes
2

answer
580

views

HTTPS equivalent of WebRequest.CreateHttp on Windows Phone 7?

I have some C# code in a Windows Phone app... WebRequest wrq = WebRequest.CreateHttp('http://bing.com'); is it possible to make this use HTTPS instead? There's no CreateHttps, and no obvious flags for me to fiddle with. Chris
Chris Rae
1

votes
1

answer
1.4k

views

simplexml_load_string not parsing my XML string. Charset issue?

I'm using the following PHP code to read XML data from NOAA's tide reporting station API: $rawxml = file_get_contents( 'http://opendap.co-ops.nos.noaa.gov/axis/webservices/activestations/' .'response.jsp?v=2&format=xml&Submit=Submit' ); $rawxml = utf8_encode($rawxml); $ob = simplexml_load_string($ra...
Chris Rae
2

votes
1

answer
803

views

Using Localytics on multiple platforms - separate app key?

I'm intending using Localytics (http://www.localytics.com) for an app which will be released on both iPhone and Android. My question is: Should I aim to use a separate app ID for the two platforms? I'd really like to just use one (so that all my analytics apply to both apps) but I notice that some t...
Chris Rae
6

votes
3

answer
3k

views

Storing key/value pairs on disk using WPF

I have a bunch of key/value pairs I'd like to cache for my WPF application. In Silverlight this is deliciously easy - I can just do: IsolatedStorageSettings userSettings = IsolatedStorageSettings.ApplicationSettings; wombat = (string)userSettings['marsupial']; Is there anything like this in WPF? A w...
Chris Rae
2

votes
2

answer
136

views

Can't seem to get value from angular binding control in ng-change event

I have a simple Angular/Ionic page: Share location Current value: {{shareLoc}} In the controller I print the value of the checkbox when the value is changed: angular.module('ionicApp', ['ionic']) .controller('HomeController', function ($scope) { console.log('HomeController'); $scope.shareLoc = false...
Chris Rae
3

votes
3

answer
809

views

How to find the current available version of a Cordova plugin

I'm using a Cordova plugin - I know that an up-coming version of the plugin has a fix that I need, but at the moment I'm locked into using an older version of the plugin from before the bug was introduced. Is there a way to find out what the current version of a plugin is without uninstalling it and...
Chris Rae
4

votes
1

answer
5.7k

views

Setting focus to a textbox on load of Windows Phone 7 app

I have a TwoWay data-bound textbox inside my page. I want to do something pretty simple, but I can't for the life of me work out how to do it. When the page loads, I want to set the focus to the textbox if it doesn't have any text in it. protected override void OnNavigatedTo(System.Windows.Navigatio...
Chris Rae
2

votes
1

answer
81

views

Using different values for constants in development and live Android builds

I'm quite sure this question has been asked before but I cannot for the life of me find it. I am working on a simple Android app and there are a couple of things I'd like to have appear differently in 'dev' and 'live' builds. These are: An XML constant A code constant A button's visibility state (id...
Chris Rae
2

votes
2

answer
322

views

Mixpanel alias on multiple devices

I'm confused by the way that Mixpanel alias() is supposed to work, despite the fact that Mixpanel have multiple pages attempting to explain it. According to this page, I should call alias() only once per user, because it will create a one-time mapping from their user ID to the device's generated ID....
Chris Rae
4

votes
3

answer
528

views

Can't get lexers.PythonLexer() from Kivy app built with PyInstaller

I have a Python app which works very nicely, inside of which I do something like: from pygments import lexers then... testing = lexers.PythonLexer() Just running the script works great and I get a new instance of the PythonLexer. However... when I make a build folder for the app using PyInstaller an...
Chris Rae
8

votes
1

answer
4.7k

views

Restoring exact scroll position of a listbox in Windows Phone 7

I'm working on making an app come back nicely from being tombstoned. The app contains large listboxes, so I'd ideally like to scroll back to wherever the user was while they were scrolling around those listboxes. It's easy to jump back to a particular SelectedItem - unfortunately for me, my app neve...
Chris Rae
2

votes
1

answer
168

views

Make Ionic 1 toggle switch look like the iOS one on Android

I'm working on an Ionic 1 project with a toggle switch in it. You know: hello It looks different on Android to iOS, and I prefer the iOS one. I know that in Ionic 2, I can do: hello But this is an Ionic 1 project and I don't want to convert it to Ionic 2 just for this. Am I out of luck?
Chris Rae
8

votes
1

answer
6.4k

views

How to add a plugin on only one Ionic platform?

I am using the excellent background geolocation plugin on an Ionic project. Unfortunately Apple don't think my usage is valid enough so I have to work out how to add this plugin only on Android. I can't fix this at a code level because the very existence of the plugin marks my app as requiring backg...
Chris Rae
1

votes
1

answer
311

views

Do application settings persist after uninstall on Windows Phone 7?

I suppose I could easily test this, but does anyone happen to know whether my application settings will persist through an uninstall/reinstall on Windows Phone 7? I'm hoping to implement a time-limited trial, but obviously this plan may be a dud if uninstall/reinstall resets it! Chris
Chris Rae
3

votes
4

answer
1.3k

views

Kivy Garden in PyInstaller - stuck trying to trace import

I have a Kivy-based Python project that I'm trying to build. It uses the NavigationDrawer component from Kivy Garden, through an import: from kivy.garden.navigationdrawer import NavigationDrawer I have a PyInstaller spec file for it which builds a distributable version. This version works well on my...
Chris Rae
2

votes
4

answer
5.6k

views

What does this.finish() really do? Does it stop my code running?

I'm a bit hazy about what exactly this.finish() does. Specifically, I just wrote the following lines of code in an activity: this.finish(); Globals gs = (Globals) getApplication(); gs.MainActivity.finish(); The code is meant to close the current activity and also close the core activity of the app....
Chris Rae