IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Wednesday, January 30, 2013

Re: Cannot Understand Event Earsffdr Cocoa-Applescript

I've tried the applecation bundle thing, and my code looks like this:

 

 

    on myButtonHandler_(sender)

        set theFolder to POSIX path of (the path to current application's NSBundle's mainBundle()'s bundlePath())

        set theFile to theFolder & "/Contents/Resources/Dir.app"

        display dialog theFile

    end myButtonHandler

 

 

But now the error is:

«class ocid» id «data optr00000000E0B3660401000000» doesn’t understand the «event earsffdr» message. (error -1708)

 


In Applescript Editor, the code makes the error : NSBundle doesn’t understand the mainBundle message.

In addition, 'path to current application' doesen't work either, and it displays the original error.


View the original article here

Cannot Understand Event Earsffdr Cocoa-Applescript

Hello Guys,

I'm trying to just write a little X-code 4 app to display it's own directory, using Cocoa-Applescript. I've created a window under MainMenu.xib, and linked it to my code in AppDelegate.applescript. My code looks something like this:

 

on myButtonHandler_(sender)

        set theFolder to POSIX path of (the path to current application)

        set theFile to theFolder & "/Contents/Resources/Dir.app"

        display dialog (the path to me)

        return void

    end myButtonHandler

 

 

The app builds perfectly, but when I click the button, it says:

 

 

[AppDelegate myButtonHandler:]: «script» doesn’t understand the «event earsffdr» message. (error -1708)

 

I have no idea what is happening there, so any help is appreciated!

 

P.S This code also works perfectly in Applescript Editor, but I want it to look better with a window, so this is really weird.


View the original article here

Thursday, January 17, 2013

Is there a way to detect the event when device goes to sleep and the screen blackens?

I want to detect the event when the iOS device goes to sleep and the screen blackens?

Is there any way to do it?


View the original article here

Is there a way to detect the event when device goes to sleep and the screen blackens?

I want to detect the event when the iOS device goes to sleep and the screen blackens?

Is there any way to do it?


View the original article here

Overlapping views and touch event regions are inconsistent


I have placed 2 views (table views) within a view container that are partially overlapped, on purpose.  View A overlaps about 50% of View B.




If I move View B so they no longer overlap:



 



The screenshot on the left shows the 2 views after the move.  The screen on the right shows a blue region which represents where the original view was and where the touch events for viewB are. 



The previously overlapped region within View A does not respond to touch events, that is, ~50% does not, i.e. the overlapped portion you see in the above screen shot..  Only the region that wasn't orginally overlapped does.  In addition, within View B, the portion that is now occupying new space within the superview, does not respond to touch events, only the portion of the view that happens to occupy the old region.



The code is simple that I'm using to move the view:



       UIView* viewA = [self.childViewControllers[0] view];


    UIView* viewB = [self.childViewControllers.lastObject view];


   


    CGRect rect = main.frame;


    rect.origin.x += viewB.frame.size.width;



    [UIView animateWithDuration:0.2 animations:^{


        viewB.frame = rect;


    }];



Visually, the view moves but the touch region doesn't.



I used the new storyboard "Container View" mechanism within iOS 6 to initially place the views.



I have no idea why this is happening.  Any ideas?



Thanks.


View the original article here

Thursday, January 10, 2013

Overlapping views and touch event regions are inconsistent


I have placed 2 views (table views) within a view container that are partially overlapped, on purpose.  View A overlaps about 50% of View B.




If I move View B so they no longer overlap:



 



The screenshot on the left shows the 2 views after the move.  The screen on the right shows a blue region which represents where the original view was and where the touch events for viewB are. 



The previously overlapped region within View A does not respond to touch events, that is, ~50% does not, i.e. the overlapped portion you see in the above screen shot..  Only the region that wasn't orginally overlapped does.  In addition, within View B, the portion that is now occupying new space within the superview, does not respond to touch events, only the portion of the view that happens to occupy the old region.



The code is simple that I'm using to move the view:



       UIView* viewA = [self.childViewControllers[0] view];


    UIView* viewB = [self.childViewControllers.lastObject view];


   


    CGRect rect = main.frame;


    rect.origin.x += viewB.frame.size.width;



    [UIView animateWithDuration:0.2 animations:^{


        viewB.frame = rect;


    }];



Visually, the view moves but the touch region doesn't.



I used the new storyboard "Container View" mechanism within iOS 6 to initially place the views.



I have no idea why this is happening.  Any ideas?



Thanks.


View the original article here