Re: Changes with El Capitan?
Re: Changes with El Capitan?
- Subject: Re: Changes with El Capitan?
- From: Shane Stanley <email@hidden>
- Date: Thu, 15 Oct 2015 10:24:08 +1100
There's one other bug to look out for in El Capitan: simple testing for equality of pointers fails.
Suppose you have an Xcode project with two table views, which you've connected to the outlets tableView1 and tableView2. And suppose you are using a datasource, which means you need to implement -numberOfRowsInTableView:. So your code might look like this:
property tableView1: missing value
property tableView2: missing value
...
on numberOfRowsInTableView:aTableView
if aTableView = tableView1 then
-- do stuff for one table
else if aTableview = tableView2 then
-- do stuff for the other table
The problem is that "aTableView = tableView1" and "aTableview = tableView2" always return 0 or false. You can log the variables and they are obviously the same item, but the test fails.
The two workarounds I've come up with are:
if aTableView = tableView1() then
or:
if aTableView's isEqualTo:tableView1 then
If you use delegates much in your code, you might want to check it. Hopefully the bug will get fixed...
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden