Mailing Lists: Apple Mailing Lists

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

Panel Ended Problems...



I apologize in advance for this lengthy question. I have been trying to get this simple little script to work for weeks now, and cannot figure out where it is going wrong. I am using FaceSpan, but I don't think there is anything specific to FaceSpan here. Here is what I have and the code:

A window named "main", opened at launch.

A button on "main" window with a script that says:

on clicked theObject
    getSourcePath()
end clicked

A script in "main" that says:

on opened theObject
    tell open panel
        set title to "Select Source Image Folder"
        set prompt to "Select Folder"
        set can choose directories to true
        set can choose files to false
        set allows multiple selection to false
    end tell
end opened

on getSourcePath()
    display (open panel)
end getSourcePath

on panel ended theObject with result theResult
        display dialog "Hello world"
end panel ended

Panel opens up when the button is clicked, the correct parameters for the panel are there, you select a folder, click on the "Select Folder" default button, and nothing. Click on the "Cancel" button, same thing, nothing. I have simply placed a dialog there to test, and I never get the dialog box.

The "panel ended" routine never gets called. I have tried re- arranging the locations of the code and nothing seems to work. Help please! I've been fiddling with this itty bitty script for weeks now, nothing I have tried works. Am I crazy, is it broken, am I stupid? (probably the latter)

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

This email sent to 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.