• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode and text field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode and text field


  • Subject: Re: Xcode and text field
  • From: Dmitry Markman <email@hidden>
  • Date: Sat, 06 Jun 2009 01:10:07 -0400

the following fix the problem


tell path_field set focused to true set value to "//src/CVS/devel" keystroke " " end tell


or


tell path_field set focused to true set value to "//src/CVS/deve" keystroke "l" end tell

I should set focused to true, set value and send some keystroke, odd

I probably create a bug report



On Jun 6, 2009, at 12:37 AM, Dmitry Markman wrote:

I think problem is that text field doesn't have focus
and I have no idea how to set focus to that text field (select doesn't work)


On Jun 6, 2009, at 12:09 AM, Dmitry Markman wrote:

Hi, I'm trying to setup CVS repository with AppleScript

tell application "Xcode"
activate
end tell
tell application "System Events"
tell process "Xcode"
tell menu bar 1
tell menu bar item "Xcode"
tell menu 1
click menu item "Preferences…"
end tell
end tell
end tell
delay 2
click button 12 of radio group 1 of scroll area 1 of window "Xcode Preferences" --SCM
delay 2
set repositories to table 1 of scroll area 1 of tab group 1 of group 1 of group 1 of window "Xcode Preferences"
set my_rows to get every row of repositories
set row_repository to {}
repeat with r in my_rows
set tf to text field 1 of r
if value of tf is "MyRepository" then
set row_repository to r
exit repeat
end if
end repeat
if row_repository is {} then
set add_button to (button 1 of tab group 1 of group 1 of group 1 of window "Xcode Preferences")
tell add_button
click
end tell
delay 2
set value of text field 1 of sheet 1 of window "Xcode Preferences" to "MyRepository"
delay 2
click button "OK" of sheet 1 of window "Xcode Preferences"
delay 2
--path field
set path_field to text field 6 of group 1 of tab group 1 of group 1 of group 1 of window "Xcode Preferences"
tell path_field
delay 2
select
set value to "//src/CVS/devel"
delay 2
end tell
delay 2
delay 2
click button "Apply" of list 1 of window "Xcode Preferences"
end if
end tell
end tell


Everything almost works, I can see value //src/CVS/devel in the Path field
but clicking on the button Apply has no effect and if I quit and restart Xcode Path field is empty
it looks like setting value isn't really working: Xcode didn't get that value - it's only visual
I tried to use select, but it didn't help
is it known problem?


if I manually type "//src/CVS/devel" in the Path text field and click on the "Apply" button everything does work

it is similar to the setting values for the field in the Xcode target properties dialogs


thanks





Dmitry Markman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden )
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

Dmitry Markman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

Dmitry Markman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Xcode and text field
      • From: Dmitry Markman <email@hidden>
References: 
 >Xcode and text field (From: Dmitry Markman <email@hidden>)
 >Re: Xcode and text field (From: Dmitry Markman <email@hidden>)

  • Prev by Date: Re: AppleScript After Launchd Job
  • Next by Date: Re: Xcode and text field
  • Previous by thread: Re: Xcode and text field
  • Next by thread: Re: Xcode and text field
  • Index(es):
    • Date
    • Thread