Saturday, October 1, 2022

#1 2022-03-27 06:05:27 am

oudi
Member
Registered: 2019-12-03
Posts: 13

xcode applascript trying muti button with one IBOutlets

hello
first soory for my english and i 'm novice in xcode and applescript.
i' m trying to create like a table view but not really :-) ( the links of tuto of shane  are dead)

my goal/

for some reason i must use applescript (my app protools isn't sciptable....) and i would like to "transpose" all my script to a beautifull interface.
i don't find a solution for use applescript with swift .....it 's works but not easy to make all the script reliables.
i try to create like a table view but with button.
my problem : i can't create an connexion between button and list as property...
like property myList : {}
when i would like to connect them .....impossible.
it's works like i would with property myList : missing value but my app add item to the list.
and my goal is to connect buttonS with this list for set the tiles from the list.
my knowedge with xcode is limited but i'm sur that is possible to connect mutliple buttons to one list
for after do like this....

item 1 of buttonList's setTitle:(item 1 of theList)
item 2 buttonList's setTitle:(item 2 of theList)

i think the table view is my graal but i don't find any clear info on the net.

hope someone will understand my explaination...really sorry about that but i'm on dead end.....


thank you in advance....
best
jf

Offline

 

#2 2022-05-08 11:30:34 pm

technomorph
Member
Registered: 2017-12-14
Posts: 280

Re: xcode applascript trying muti button with one IBOutlets

You should be able to do what you said.
Put you buttons into a list or an array.
Put the titles into a list or an array.
Enumerate anyway you like.

Just make sure you’ve created IBOutlets for
Each button or they won’t update.

In AppleScript create a property for each button and have its values as missing value

IE

property button01 : missing value

Then in IB your script object should now have Outlets to connect them

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)