Software and Technology Ramblings

September 13, 2010

iPhone and iPad is not showing up in Xcode Organizer or iTunes

Filed under: Apple — Tags: , , , — Doug Hays @ 1:19 pm

Just a quick tip if your iPad or iPhone is not appearing in Xcode or iTunes. This was happening to me even after a complete machine restart.

Found a tip that suggested a re-install of iTunes.

So, I re-installed iTunes and I’m back in business!

May 19, 2010

Twitter Status Update URL issue with URL encoding

Filed under: iPhone Development — Doug Hays @ 2:43 pm

I am developing an iPhone app that allows the user to tweet information from the app. For simplicity’s sake, I chose to use the URL method of sending the user off to Twitter to sign in and finish their status update. When I redirected the user to:

The status update was dropped after the user logged in. So, I switched to:

which looked fine even on a smaller screen. And, after the user logged in, the status message was retained. But, so was the URL encoding. Instead of “Hello World” the status would have been an unsightly “Hello%20World”.

I finally stumbled onto the fix and it’s an easy one. Just drop the www:

And, now it works as expected after the user logs in.

January 11, 2010

Calling CakePHP Code from Other PHP Code

Filed under: CakePHP — Tags: , — Doug Hays @ 11:13 pm

In order to call CakePHP from non-CakePHP code, we will copy index.php from /app/webroot and put it into our non-CakePHP codebase as cakephp.php.

Then, we’ll create a function requestCakePHP that requires the cakephp.php file:

function requestCakePHP($url)


// Set the url parameter for cakephp
$_GET['url'] = $url;

require_once 'cakephp.php';

// Fire up CakePHP and buffer results
$Dispatcher= new Dispatcher ();

return ob_get_clean();


Then, whenever we need to call for some Cake, we just call requestCake with the URL minus the hostname:

echo requestCakePHP("/webpages/view/2");

In the example above, I have a webpages controller, a view action and am viewing webpage #2.

September 9, 2009

Google Maps Info Window Too Big – Fixed!

Filed under: CSS, Google Maps — Doug Hays @ 9:13 am

It always feels good to solve a long-standing and puzzling issue.  Today’s fix has to do with a Google Maps window that was about 50% taller than it had to be:

Google Maps Info Window - Too Tall

After several rounds of setting fixed widths inside the info window’s HTML content, I added the following CSS for .gmapmarker which is the class of the div that wraps all of my info window’s content:

#gmapmarker {
display: block;
max-height: 185px;
.gmapmarker {
    max-height: 185px;
And that did the trick:
Google Maps Info Window - Height Fixed

May 17, 2009

Automatic Switching of Environments with Adobe AIR

Filed under: AIR, Flex — Doug Hays @ 11:31 pm

There is an issue with AIR application development to which I still have not found an official answer.

I just need to switch between http://localhost and depending on whether I was running in Flex Builder (via adl).

I found all sorts of articles about using conditional compilation (yikes) and reading XML files (I’m too lazy).

This is what I ended up using:

if (NativeApplication.nativeApplication.publisherID != "") {
   return "";
else {
   return "http://localhost";

It doesn’t give you the ability to switch between 3+ different environments, but it’s a very easy way to toggle between development / production environments.

« Newer PostsOlder Posts »

Powered by WordPress