Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting text fields



Ooops ...sorry for the confusion here ... i chnaged the variable names to simple letters so as not to break NDA

the code has real variable names in the following format

set the contents of text field "var_X" to "0"

thanks for the help

stimpy


On Jan 2, 2006, at 3:17 PM, Ronald Hofmann wrote:

Hi Andrew,
looks like you are using small letters for text field reference where it works fine. In case of error you are using capitals.


Regards, Ronald
---
Am 02.01.2006 um 20:49 schrieb andrew remuzzi:

I have a simple calculation application i am trying to get working but i cannot seem to "set text fields" to a default value.

I am using Xcode 2.0 with 10.4.3


here is the relevant code

on awake from nib theObject
tell window of theObject
set the contents of text field "X" to "0"
set the contents of text field "y" to "0"
updateDisplay(theObject)
end tell
end awake from nib

the error i get is

"Can't make contents of text field "x" of window of window id 1 into type reference. (-1700)"

if i drop the tell window line i get

"Can't make contents of text field "x" into type reference. (-1700)"

later in the script in response to a button click this line works fine

on clicked theObject
tell window of theObject
try
set the contents of text field "x" to theXvar
on error
set the contents of text field "x" to "error"
end try
end tell
end clicked


anyone have amy insight on what i am doing wrong ?


thanks


stimpy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/prolog% 40jumbosoft.de


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-studio mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >setting text fields (From: andrew remuzzi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.