Re: WKWebView +

2015-02-13 Thread dangerwillrobinsondanger


> On 2015/02/14, at 4:39, patrick machielse  wrote:
> 
> Also, the new WKUIDelegate protocol doesn't seem to have an equivalent to the 
> the 'old' WebUIDelegate/WebView method:

So far WKWebView doesn't have a lot of anything if you're looking at it 
thinking like the WebView. 

From what I could intuit from the small API it offers is that it's intended 
that you do EVERYTHING via JavaScript. 

The good but poorly documented WebKit API is still with us and still really 
capable. 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Connecting a button to MyView zeros integers

2015-02-13 Thread Roland King

> On 14 Feb 2015, at 01:16, Kyle Sluder  wrote:
> 
> On Fri, Feb 13, 2015, at 10:42 AM, David Duncan wrote:
>> Since you elided your header file, this begs a question – is this iOS or
>> OS X?
>> 
>> If I’m not mistaken, subclasses of NSView do not get -initWithCoder:, but
>> rather -initWithFrame:, which begs the question of have you confirmed
>> that your -initWithCoder: method is being called?
> 
> This depends on whether the "prefer coder" checkbox was checked when the
> XIB was authored. If that checkbox is checked, instantiation behaves
> like iOS, where custom views get -initWithCoder: instead of
> -initWithFrame:.
> 

From the fact in the original message that the two variables remained at the 
default of zero my assumption was that neither piece of advice from the 
previous thread on this was followed, those being :-

1) Leave the 'prefer coder' checkbox checked, because it's more consistent, 
arguably fixes a longstanding bug, and remembering when you've turned it on and 
off is likely to lead to confusion. 
2) Don't put initialisation code directly in initWithCoder: but factor it out 
to a separate method called from all the init routines, so it doesn't matter 
which one is called, they all funnel through the same setup code. 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Human-understandable process name

2015-02-13 Thread Michael Crawford
Would it help to examine kernel data structures?

Not everything the kernel does is directly accessible by userspace
frameworks, but within certain limits mostly having to do with
security you can read many kernel data structures.

I don't personally know which ones would help you however this kind of
thing is commonly done.
Michael David Crawford, Consulting Software Engineer
mdcrawf...@gmail.com
http://www.warplife.com/mdc/

   Available for Software Development in the Portland, Oregon Metropolitan
Area.


On Fri, Feb 13, 2015 at 2:58 PM, Kevin Meaney  wrote:
> Apologies. Having just reread that forum post rather than working from what I 
> remembered it is about the relationship between the processes rather than 
> process names.
>
> You might still we'll be in luck.
>
> Kevin
>
> Sent from my iPad
>
>> On 13 Feb 2015, at 21:05, Andrew Keller  wrote:
>>
>> Hello all,
>>
>> I'm not sure if this is the correct list, but I figure I'll start somewhere.
>>
>> I'm writing a program that collects activity statistics on other running 
>> programs (in particular, network usage statistics).  I have already 
>> successfully harvested the statistics I want, organized by the PID and name 
>> of the process, however I'd like to do a better job communicating this 
>> information to the user.  I am intrigued by Mac OS 10.10's ability to report 
>> "Apps using significant energy"; it seems to have the ability to get a 
>> commonly understood human-readable program name, even when the process in 
>> question is a helper app with a different name.  Is this ability replicable 
>> in third party applications?
>>
>> Thanks,
>> - Andrew Keller
>>
>>
>> ___
>>
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/ktam%40yvs.eu.com
>>
>> This email sent to k...@yvs.eu.com
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/mdcrawford%40gmail.com
>
> This email sent to mdcrawf...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Human-understandable process name

2015-02-13 Thread Kevin Meaney
Apologies. Having just reread that forum post rather than working from what I 
remembered it is about the relationship between the processes rather than 
process names.

You might still we'll be in luck.

Kevin

Sent from my iPad

> On 13 Feb 2015, at 21:05, Andrew Keller  wrote:
> 
> Hello all,
> 
> I’m not sure if this is the correct list, but I figure I’ll start somewhere.
> 
> I’m writing a program that collects activity statistics on other running 
> programs (in particular, network usage statistics).  I have already 
> successfully harvested the statistics I want, organized by the PID and name 
> of the process, however I’d like to do a better job communicating this 
> information to the user.  I am intrigued by Mac OS 10.10’s ability to report 
> “Apps using significant energy”; it seems to have the ability to get a 
> commonly understood human-readable program name, even when the process in 
> question is a helper app with a different name.  Is this ability replicable 
> in third party applications?
> 
> Thanks,
> - Andrew Keller
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/ktam%40yvs.eu.com
> 
> This email sent to k...@yvs.eu.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Human-understandable process name

2015-02-13 Thread Kevin Meaney
The answer to this question on devforums suggests you might be out of luck. 
https://devforums.apple.com/message/1092608#1092608

Sent from my iPad

> On 13 Feb 2015, at 21:05, Andrew Keller  wrote:
> 
> Hello all,
> 
> I’m not sure if this is the correct list, but I figure I’ll start somewhere.
> 
> I’m writing a program that collects activity statistics on other running 
> programs (in particular, network usage statistics).  I have already 
> successfully harvested the statistics I want, organized by the PID and name 
> of the process, however I’d like to do a better job communicating this 
> information to the user.  I am intrigued by Mac OS 10.10’s ability to report 
> “Apps using significant energy”; it seems to have the ability to get a 
> commonly understood human-readable program name, even when the process in 
> question is a helper app with a different name.  Is this ability replicable 
> in third party applications?
> 
> Thanks,
> - Andrew Keller
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/ktam%40yvs.eu.com
> 
> This email sent to k...@yvs.eu.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Human-understandable process name

2015-02-13 Thread Lee Ann Rucker
Start with [NSRunningApplication 
runningApplicationWithProcessIdentifier:(pid_t)]

On Feb 13, 2015, at 1:05 PM, Andrew Keller  wrote:

> Hello all,
> 
> I’m not sure if this is the correct list, but I figure I’ll start somewhere.
> 
> I’m writing a program that collects activity statistics on other running 
> programs (in particular, network usage statistics).  I have already 
> successfully harvested the statistics I want, organized by the PID and name 
> of the process, however I’d like to do a better job communicating this 
> information to the user.  I am intrigued by Mac OS 10.10’s ability to report 
> “Apps using significant energy”; it seems to have the ability to get a 
> commonly understood human-readable program name, even when the process in 
> question is a helper app with a different name.  Is this ability replicable 
> in third party applications?
> 
> Thanks,
> - Andrew Keller
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com
> 
> This email sent to lruc...@vmware.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Human-understandable process name

2015-02-13 Thread Andrew Keller
Hello all,

I’m not sure if this is the correct list, but I figure I’ll start somewhere.

I’m writing a program that collects activity statistics on other running 
programs (in particular, network usage statistics).  I have already 
successfully harvested the statistics I want, organized by the PID and name of 
the process, however I’d like to do a better job communicating this information 
to the user.  I am intrigued by Mac OS 10.10’s ability to report “Apps using 
significant energy”; it seems to have the ability to get a commonly understood 
human-readable program name, even when the process in question is a helper app 
with a different name.  Is this ability replicable in third party applications?

Thanks,
 - Andrew Keller


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

WKWebView +

2015-02-13 Thread patrick machielse
We're using WKWebView in a OS X application to host a web application.

The web application uses a html element like this to let the user select local 
file paths:



This should display a file dialog. However, it doesn't seem to work with 
WKWebView.


Also, the new WKUIDelegate protocol doesn't seem to have an equivalent to the 
the 'old' WebUIDelegate/WebView method:

- (void)webView:(WebView *)sender 
runOpenPanelForFileButtonWithResultListener:(id)resultListener
 allowMultipleFiles:(BOOL)allowMultipleFiles;


Is there a way to configure WKWebView to make it work correctly with file 
s?

There must be a way, this seems quite basic.

patrick
--
Patrick Machielse
Hieper Software

http://www.hieper.nl
i...@hieper.nl


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Delete empty Core Data entities from to-many relationship

2015-02-13 Thread Steve Mills
My model:

Folder:
attributes:
url
relationships:
Relationship: files, Destination: Asset, Inverse: folder, To 
Many, Deny
Relationship: keywords, Destination: Keyword, Inverse: assets, 
To Many, Nullify

Asset:
attributes:
stuff
relationships:
Relationship: folder, Destination: Folder, Inverse: files, To 
One, Nullify

Keyword:
attributes:
stuff
relationships:
Relationship: assets, Destination: Asset, Inverse: keywords, To 
Many, Nullify

When the last Asset that is a member of its Folder is deleted, I want to delete 
the now empty Folder. I added a prepareForDeletion override in Asset:

if(self.folder && self.folder.files.count == 1) {
Folder* fold = self.folder;

if([fold.files containsObject:self])
[self.managedObjectContext deleteObject:fold];
}

This works if I select one asset and delete it. But if I select multiple 
assets, it doesn't work. The count is never 1. It also spits out this:

2015-02-13 13:17:16.678 Image Chest[60293:9536015] Core Data: annotation: 
repairing missing delete propagation for to-many relationship files on object 
0x618b1400 (0x61830a60 
) with bad fault 
0x618cea80 (0x60033e20 
)
2015-02-13 13:17:16.678 Image Chest[60293:9536015] Core Data: annotation: 
repairing missing delete propagation for to-many relationship assets on object 
0x618a7620 (0x60420c40 
) with bad 
fault 0x618c57f0 (0x6003abc0 
)
2015-02-13 13:17:16.678 Image Chest[60293:9536015] Core Data: annotation: 
repairing missing delete propagation for to-many relationship assets on object 
0x618a7620 (0x60420c40 
) with bad 
fault 0x618cea80 (0x60033e20 
)


Is there a better strategy for deleting empty container entities? At first I 
tried setting the Asset's folder relationship to Cascade, but that threw up all 
over.

--
Steve Mills
Drummer, Mac geek


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Question for StackOverflow or other about not sharing cookie jar per webview

2015-02-13 Thread Juanjo Conti
I have asked in SO:
http://stackoverflow.com/questions/28456789/separate-cookie-jar-per-webview-in-os-x
(it has a bounty of 500)

On Tue, Feb 10, 2015 at 9:24 PM, Jens Alfke  wrote:

> You may be better off asking on the webkit-sdk-dev list on this site. I’ve
> seen WebKit developers from Apple answer questions there, but not on this
> list.
>
> —Jens
>
> > On Feb 10, 2015, at 2:13 PM, Juanjo Conti 
> wrote:
> >
> > How to achieve the goal of having a not shared cookie jar per WebView in
> > Mac Os X
> >
> > I've been trying to achieve the goal of having a unique (not shared)
> cookie
> > jar per WebView in Mac Os X (cookies managment works different for iOS).
> >
> > After reading a lot of StackOverflow question and digging the docs, I
> found
> > the closest solution to my problem in this articles:
> >
> > http://cutecoder.org/programming/implementing-cookie-storage/ (how to
> > handle HTTP cookies)
> >
> > http://cutecoder.org/programming/handling-cookies-javascript-custom-jar/
> > (how to handle JavaScript document.cookie cookies)
> >
> > I have setup an example app using them:
> > https://github.com/jjconti/swift-webview-isolated
> >
> > The basic idea is to implement the necessary methods from
> > the WebResourceLoadDelegate and WebPolicyDelegate protocols and use
> > BSHTTPCookieStorage to store and retrieve cookies. Additionally, my
> example
> > app allows saving the cookieStorage object so it can be reloaded in
> future
> > executions.
> >
> > Unfortunately, the app doesn't work ok in every website (the author of
> the
> > articles was targeting one particular web site). For example gmail and
> > NewRelic you're immediately logged out after login (or after doing some
> > actions). That makes me suspect of a bug in the cookie storage
> > implementation which I wasn't able to find yet.
> >
> > Could someone point me if something is missing?
> >
> > Thanks in advance
> >
> > 
> >
> > What do you think guys? Could the question be improved? I'm sending it
> > tomorrow.
> >
> > --
> >
> > Juanjo Conti http://goog_2023646312>@carouselapps.com
> > >
> >
> > Software Engineer - Carousel Apps 
> >
> > --
> > Carousel Apps Limited, registered in England & Wales with registered
> number
> > 7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket
> > Street, London SE1 3HN. Any communication sent by or on behalf of
> Carousel
> > App Ltd or any of its subsidiary, holding or affiliated companies or
> > entities (together "Watu") is confidential and may be privileged or
> > otherwise protected. If you receive it in error please inform us and then
> > delete it from your system. You should not copy it or disclose its
> contents
> > to anyone. Messages sent to and from Watu may be monitored to ensure
> > compliance with our internal policies and to protect our business. Emails
> > are not secure and cannot be guaranteed to be error free. Anyone who
> > communicates with us by email is taken to accept these risks.
> > ___
> >
> > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> >
> > Please do not post admin requests or moderator comments to the list.
> > Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> >
> > Help/Unsubscribe/Update your Subscription:
> > https://lists.apple.com/mailman/options/cocoa-dev/jens%40mooseyard.com
> >
> > This email sent to j...@mooseyard.com
>
>


-- 

Juanjo Conti http://goog_2023646312>@carouselapps.com
>

Software Engineer - Carousel Apps 

-- 
Carousel Apps Limited, registered in England & Wales with registered number 
7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket 
Street, London SE1 3HN. Any communication sent by or on behalf of Carousel 
App Ltd or any of its subsidiary, holding or affiliated companies or 
entities (together "Watu") is confidential and may be privileged or 
otherwise protected. If you receive it in error please inform us and then 
delete it from your system. You should not copy it or disclose its contents 
to anyone. Messages sent to and from Watu may be monitored to ensure 
compliance with our internal policies and to protect our business. Emails 
are not secure and cannot be guaranteed to be error free. Anyone who 
communicates with us by email is taken to accept these risks.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Connecting a button to MyView zeros integers

2015-02-13 Thread Kyle Sluder
On Fri, Feb 13, 2015, at 10:42 AM, David Duncan wrote:
> Since you elided your header file, this begs a question – is this iOS or
> OS X?
> 
> If I’m not mistaken, subclasses of NSView do not get -initWithCoder:, but
> rather -initWithFrame:, which begs the question of have you confirmed
> that your -initWithCoder: method is being called?

This depends on whether the "prefer coder" checkbox was checked when the
XIB was authored. If that checkbox is checked, instantiation behaves
like iOS, where custom views get -initWithCoder: instead of
-initWithFrame:.

--Kyle Sluder

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Connecting a button to MyView zeros integers

2015-02-13 Thread David Duncan
Since you elided your header file, this begs a question – is this iOS or OS X?

If I’m not mistaken, subclasses of NSView do not get -initWithCoder:, but 
rather -initWithFrame:, which begs the question of have you confirmed that your 
-initWithCoder: method is being called?

> On Feb 6, 2015, at 6:22 PM, N!K  wrote:
> 
> 
> I would like to connect a button to MyView class, but Xcode 6.1.1 only allows 
> control-dragging a button to AppDelegate to create an IBAction. I have not 
> encountered this previously. Looking for a workaround, I found this 
> recommendation in a couple of Stack Overflow and other web pages as well as a 
> YouTube video. It enables the button to work, but unfortunately it zeros all 
> the integers in MyView.
> 
> The recommendation is:
> 1. Drag an empty Object from the IB library to the column of blue icons.
> 2. Set its class to MyView.
> 3. Control-drag from the button to MyView.m
> 4. Fill in the name (“act”) in the popup.
> This puts the IBAction template into MyView, ready to fill in.
> 
> #import "MyView.h"
> 
> @implementation MyView
> 
> - (id)initWithCoder:(NSCoder *)aDecoder
> {
>self = [super initWithCoder:aDecoder];
>if (self) {
>iii=1000;
>k=99;
>}
>return self;
> }
> 
> - (IBAction)act:(id)sender {
>iii=iii+1;
>NSLog(@"  iba i= %i",iii);
> }
> 
> 
> In MyView.m, iii=1000 is initialized in initWithCoder. At the breakpoint 
> after IBAction, iii is seen in both places to have the value 1, not 1001,  by 
> hovering. It was zeroed and then incremented after clicking on Button in the 
> View. Similarly, k is initialized to 99 and then zeroed. Both are ivars in 
> MyView.h.
> 
> Clearly, zeroing all the integers is not acceptable. Can this approach be 
> saved? Having the IBAction in MyView is desirable for directly relating its 
> functions to the rest of MyView, rather than indirectly from AppDelegate. On 
> the other hand, Xcode may have very good reasons – unknown to me – for 
> restricting IBAction to AppDelegate. Maybe timing?
> 
> Thanks in advance,
> 
> Nick
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
> 
> This email sent to david.dun...@apple.com

--
David Duncan


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Connecting a button to MyView zeros integers

2015-02-13 Thread Roland King

>> 
>> Release the Control-drag. The assistant editor displays a Connection menu. 
>> In this menu, type the name of the action method (chooseWarrior in the 
>> screenshot below), and click Connect. 
>> 
>> [picture shows a menu with space to enter name of action]
> 
> This is for adding a new outlet/action. I was under the impression you had an 
> existing one that you just wanted to hook up?

I didn't read it that way. Further on down he says "Insertion of  - 
(IBAction)act:(id)sender { } occurs only in my AppDelegate" which I took to 
mean the drag-to-insert-method-stub bit doesn't work. I suggested just adding 
the IBAction by hand in the .h file. I'm not sure I ever tried the auto-add 
method stuff so I have no idea if it works, but I do know typing the IBAction 
code in by hand does and takes about 2 seconds. 

>> 
>> This Xcode_Overview example uses an implementation file, not AppDelegate. It 
>> does not add an empty object in IB.
>> 
>> Xcode is not allowing connection to my MyView file. Insertion of  - 
>> (IBAction)act:(id)sender { } occurs only in my AppDelegate, which of course 
>> responds to the button. Clicking the button in the View initiates the 
>> IBAction, which indicates that I’m following the instruction correctly.  I 
>> do the same steps when  I try it with my MyView file, which fails.
>> 
>> Might this be a bug? Or a defective copy of Xcode? Has anyone observed the 
>> same behavior?
> 
> I'm not sure what you're trying to do. Can you give us a better description? 
> Your app delegate has an act: method but you're trying to connect to it by 
> dragging to a MyView?

The way I read it is he wants an act: method on his MyView and is trying to add 
the method by dragging to the interface/implementation file and is failing to 
get the code inserted into the file, but when he drags to the Delegate object 
then it works, and it also connects it. I also asked if the view he's dragging 
to has its class set correctly to MyView because if it's not, that would 
probably indicate both why the method isn't added by drag and why it can't be 
connected. 


> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
> )
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
> 
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org 
> 
> 
> This email sent to r...@rols.org 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Connecting a button to MyView zeros integers

2015-02-13 Thread Uli Kusterer
On 12 Feb 2015, at 06:36, N!K  wrote:
> Control-clicking the button in .xib does show the outlet panel but it does 
> not list an IBAction, so it cannot connect to the IBAction entered into the 
> MyView.h and .m files. Also, control-dragging from the button to MyView (in 
> .xib, not in editor) sets up the position constraints. Control-dragging from 
> the button to any icon does nothing.

 You mean to File's Owner? Is the "Custom Class" of File's Owner set to the 
right class? Both right-drag and ctrl-drag still work for me to connect button 
actions in 6.1.1 (which is the latest on the MAS).

> I haven’t needed a control for quite some time, and I found that things have 
> changed in Xcode 6.1.1.  I’m attempting to follow Apple’s current instruction.
> 
> Here’s the instruction from Apple’s Xcode_Overview.pdf, 2014-03-10, pp 64-65. 
> The pictures have to be omitted here due to space constraints of this forum.
> 
> Control-drag from the control in Interface Builder to the implementation 
> file. (In the screenshot, the assistant editor displays the implementation 
> file of the view controller for the Warrior button.) Xcode indicates where 
> you can insert an action method in your code.
> 
> [picture shows a line with a leading circle in a space in .m]
> 
> Release the Control-drag. The assistant editor displays a Connection menu. In 
> this menu, type the name of the action method (chooseWarrior in the 
> screenshot below), and click Connect. 
> 
> [picture shows a menu with space to enter name of action]

 This is for adding a new outlet/action. I was under the impression you had an 
existing one that you just wanted to hook up?

> Connect User Interface Objects to Code
> 
> In the implementation file, Xcode inserts a skeletal definition for the new 
> method, as shown below. The IBAction return type is a special keyword 
> indicating that this instance method can be connected to your storyboard or 
> xib file. Xcode also sets the action selector for the control to this method. 
> As a result, the method gets invoked whenever the control receives an action 
> message. 
> 
> [picture shows - (IBAction)chooseWarrior:(id)sender { }  ]
> 
> 
> This Xcode_Overview example uses an implementation file, not AppDelegate. It 
> does not add an empty object in IB.
> 
> Xcode is not allowing connection to my MyView file. Insertion of  - 
> (IBAction)act:(id)sender { } occurs only in my AppDelegate, which of course 
> responds to the button. Clicking the button in the View initiates the 
> IBAction, which indicates that I’m following the instruction correctly.  I do 
> the same steps when  I try it with my MyView file, which fails.
> 
> Might this be a bug? Or a defective copy of Xcode? Has anyone observed the 
> same behavior?

I'm not sure what you're trying to do. Can you give us a better description? 
Your app delegate has an act: method but you're trying to connect to it by 
dragging to a MyView?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com