Path to Resource

I am trying to load a script saved in the Resources folder of an app that I created using the following command:
set enclosedList to load script ((path to resource) as text) & "enclosedList.scpt"
When I do this I get the following error: "Can’t make current application into type string."
I'm guessing I have something wrong with the syntax here but I'm not sure what. If anyone can help out I would appreciate it. Thanks.

Thanks, I think I understand how it works now.
Something weird happens when I try to run it though. If I do:
set enclosedList to load script (path to resource "enclosedList.scpt" in directory "Scripts")
display dialog enclosedList's enclosedList(sendA, sendB, sendC)
It displays the correct output text from enclosedList.
But if I try to set a variable to the the output:
set enclosedList to load script (path to resource "enclosedList.scpt" in directory "Scripts")
set enclosed to enclosedList's enclosedList(sendA, sendB, sendC)
I get an error <script> doesn't understand the enclosedList message.
It is clearly loading the script so I'm not sure what is going wrong here.

Similar Messages

  • Bnoir i need your help! Folder path itunes.resources invalid character

    Hey all,
    I am trying to update a previous install of itunes, and get an error (with no error number) that says: "The folder path Itunes.resources contains an invalid character" followed by another popup error: "Problem with shortcut: fatal error during installation". I get the same error when trying to remove itunes in the control panel add/remove utility. Any ideas on how to fix this problem?
    thanks in advance.

    "Invalid character" messages usually seem to indicate that some of your registry entries are pointing to a different disk location than the files/folders referenced in the message are actually on.
    I've got a link to specific instructions for these messages when they reference the "My Pictures" directory. However, rather than initially trying to adapt those to the itunes.resources case, let's see if we can instead get past this using the Windows Installer CleanUp utility.
    let's try the following procedure.
    First, head into your Add/Remove programs and uninstall your QuickTime. If it goes, good. If it doesn't, we'll just attend to it when we attend to iTunes.
    Next, download and install the Windows Installer CleanUp utility:
    Description of the Windows Installer CleanUp Utility
    Now launch Windows Installer CleanUp ("Start > All Programs > Windows Install Clean Up"), find any iTunes and/or QuickTime entries in the list of programs in CleanUp, select those entries, and click “remove”.
    Next, we'll manually remove any leftover iTunes or QuickTime program files:
    (1) Open Local Disk (C:) in Computer or whichever disk programs are installed on.
    (2) Open the Program Files folder.
    (3) Right-click the iTunes folder and select Delete and choose Yes when asked to confirm the deletion.
    (4) Right-click the QuickTime folder and select Delete and choose Yes when asked to confirm the deletion. (Note: This folder may have already been deleted if QuickTime was successfully removed using Add/Remove Programs earlier.)
    (5) Delete the QuickTime and QuicktimeVR files located in the C:\Windows\system32\ folder. Click Continue if Windows needs confirmation or permission to continue. (Note: These files may have already been deleted if QuickTime was successfully removed using Add/Remove Programs earlier.)
    (6) Right-click on the Recycle Bin and on the shortcut menu, click Empty Recycle Bin.
    (7) Restart your computer.
    Now try another iTunes install. Does it go through properly now?

  • JAAS LoginModule - how do I get path, port, resource accessed, etc

    Hi,
    I checked everywhere including the forums, but could not get any info on this. I'm writing a custom JAAS LoginModule for the WebAS 6.40 server. I'm trying to figure out how to get the following out of the request from within login() or initialize() or any other method:
    1. Name of the webserver (i.e. the WebAS server being accessed like www.mycompany.com)
    2. Resource (e.g. /QuickCarRental)
    3. Port through which the request comes in (e.g. 50000)
    The URL being accessed in the above case is http://www.mycompany.com:50000/QuickCarRental
    Appreciate your help, and points will be awarded. Have a nice day
    R Abraham

    This is only available for NetWeaver Portal, not NetWeaver Application Server(WebAS). host and port can be obtained using the following code:
                   Callback[] callbacks = new Callback[3];
                   callbacks[0] = new NameCallback("UserId: ");
                   callbacks[1] = new PasswordCallback("Password: ", false);
                   // get host name and port
                   HttpGetterCallback getterCallback = new HttpGetterCallback();
                   getterCallback.setType(HttpCallback.HEADER);
                   getterCallback.setName("Host");
                   callbacks[2] = getterCallback;
                   try {
                        callbackHandler.handle(callbacks);
                   } catch (Exception ex) {
                        throw new LoginException(ex + "");
                   Object retValue = ((HttpGetterCallback)callbacks[2]).getValue(); //get host
    host and port will be returned in the following format SERVER.COMPANY.COM:50000
    Currently WebAS is not able to return the resource as per SAP development.

  • How to get the path of resource

    I have folowing structure
    FoderProjetct
    ------> images/ok.gif
    FoderProjetct
    ----------------src/app/MyMainClass.hava
    URL url= MyMainClass.class.getResource(File.separatorChar+"ok.gif");
    url = null ????what is wrong !!!!
    thanks

    "/images/ok.gif".
    url = null ????
    another idea ??
    thanks

  • Resource path

    First I checked it was all OK without POSIX and it works:
    display dialog "Open last saved or choose file" buttons {"Open last", "Open other"} default button 2
    if button returned of result is "Open last" then
    set val1 to alias (read file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt")
    --Read pref file to find out path of last edited file.
    if val1 is "Default" then
    EditFile("no")
    else
    EditFile(val1)
    end if
    else
    EditFile("no")
    end if
    on EditFile(val2)
    if val2 is "no" then
    set val3 to (choose file with prompt "Please select a .txt file:
    To save a text file as .txt in TextEdit, click 'Make Plain Text' in the Format menu and save the file.")
    --Get file path.
    else
    set val3 to val2
    end if
    if (get eof val3) is 0 then --Read doesn't like eof (end of file) to be 0 bytes.
    set val4 to ""
    else
    set val4 to read val3 --Read file before it gets erased.
    end if
    open for access val3 with write permission --Open file.
    repeat
    set eof val3 to 0 --Erase file.
    display dialog "Edit your text." default answer val4 buttons {"Revert", "Save"}
    set {val5, val6} to {text returned of result, button returned of result}
    if val6 is "Save" then
    write val5 to val3
    exit repeat
    else
    write val4 to val3
    end if
    end repeat
    --Write to file giving old data as default (to give the same affect as as read and edit).
    close access val3
    open for access file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt" with write permission
    set eof file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt" to 0
    write (val3 as string) to file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt" as text
    close access file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt"
    --Save path of edited file to pref file.
    end EditFile
    But change that 3rd line to:
    set val1 to alias (read file (path to resource "Save Location Pref.txt"))
    gets the error:
    Can’t make file (alias "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt") into type file.

    Use the following as the third line:
    set val1 to alias (read file ((path to resource "Save Location Pref.txt") as string))
    (47286)

  • Running a shell script in a Cocoa-Applescript, from the Resources folder?

    Hello!
    I need to use a bash script, but the script must be IN the application. I placed them in the "Supporting files", but i am not able to find them using "do shell script"
    Thanks!

    If you stick the script in the Resources folder you can get it by
    path to resource "Bash Script"
    If you want to put it in the folder Supporting files you need to construct the path
    (path to me as string) & "Contents:Resources:Supporting files:Bash Script"
    (where Bash Script is the name of your script)
    Don;t know if there is a shorter way for the second case.

  • How to build a jar file so the program can access its resources folder?

    I have a java program written by someone else in which I have made a trivial change (I changed the background color). The jar file runs but it does not find one of the resources file.
    Here is the project folder's structure
    mainClass.txt (manifest text file)
    folder resources (includes file Java does not find: order.txt, a text file)
    folder CFPT ( includes .class files)
    folder cpl (includes .class files)
    folder results
    I tried
    jar cvmf mainClass.txt CFPT0.jar CFPT/*.class cpl/*.class resources results
    I get a lot of "adding: resources/..."
    including the one pertaining to the files which is later not found
    adding: resources/order.txt(in = 411) (out= 169)(deflated 58%)
    the code that chokes right now is the following,
    Object i = new Object();
    InputStream is = i.getClass().getResourceAsStream("/resources/" + resourceName);
    when I run java -jar CFPT0.jar the program runs
    but it soon gives an error, cannot find resourceName order.txt (is == null)
    I have Core Java Volume 1 page 498 but it does not help me figure out what I am doing wrong.
    Can somone help me build the jar file correctly so the program can find its resources?
    Is this a classpath issue? What do I need to do?

    My last mainClass.txt file content:
    Main-Class: CFPT.CFPTRunner
    Class-Path: ./resources ./results
    I also tried
    Class-Path: resources results
    Initially I only had the first line.
    I put back /resources in the java file as the / is necessary to indicate absolute path.
    Otherwise it looks relative to calling class.
    I tried adding the path on the second line of the manifest file per Wikipedia example
    http://en.wikipedia.org/wiki/Classpath
    I looked at
    http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
    If you use the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path both for class files and source files.
    http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
    resources
    I took out the -d classes and compiled the .class files right with the java files in case that was the problem
    javac -classpath . CFPT/CFPTRunner.java
    jar cvmf mainClass.txt CFPT0.jar CFPT/*.class cpl/*.class resources results
    java -jar CFPT0.jar
    Still no go

  • Can't see /Resource[SchemaElement in RES.GETCLOBVAL()

    Hello
    I try to make a simple example like purchaseorder in XML DB Doc.
    I can see the attribute /Resource[SchemaElement in RESOURCE_VIEW
    XML doc is (compagnieRepository.xml)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <compagnie
    xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
    xsi:NamespaceSchemaLocation="http://www.soutou.net/compagnies.xsd">
         <comp>EA</comp>
         <pilotes>
              <pilote brevet="PL-9">
                 <nom>J. Nouveau</nom>
                 <salaire>9000</salaire>
              </pilote>
         </pilotes>
         <nomComp>EuralaiR</nomComp>
    </compagnie>
    XML Schema is (compagniesannote.xsd)
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns:xdb="http://xmlns.oracle.com/xdb"
                xdb:storeVarrayAsTable="true" version="1.0"
                xdb:schemaURL="http://www.soutou.net/compagnies.xsd"
                xdb:schemaOwner="SOUTOU">
      <xsd:element name="compagnie" type="compagnieType" xdb:defaultTable="COMPAGNIE"/>
      <xsd:complexType name="compagnieType" xdb:SQLType="COMPAGNIE_TYPE">
        <xsd:sequence>
          <xsd:element name="comp"    type="compType" minOccurs="1" xdb:SQLName="COMP"/>
          <xsd:element name="pilotes" type="pilotesType" xdb:SQLName="PILOTES"/>
          <xsd:element name="nomComp" type="nomCompType" minOccurs="1" xdb:SQLName="NOMCOMP"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="pilotesType" xdb:SQLType="PILOTES_TYPE">
        <xsd:sequence>
          <xsd:element minOccurs="1" maxOccurs="unbounded"
                       name="pilote" type="piloteType"
                       xdb:SQLName="PILOTE" xdb:SQLCollType="PILOTE_VRY"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="piloteType" xdb:SQLType="PILOTE_TYPE">
        <xsd:sequence>
          <xsd:element name="nom"     type="nomType" xdb:SQLName="NOM" xdb:SQLType="VARCHAR2"/>
          <xsd:element name="salaire" type="salaireType" minOccurs="0"
                    xdb:SQLName="SALAIRE" xdb:SQLType="NUMBER"/>
        </xsd:sequence>
        <xsd:attribute name="brevet" xdb:SQLName="BREVET" xdb:SQLType="VARCHAR2">
             <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:minLength value="1"/>
              <xsd:maxLength value="4"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
      </xsd:complexType>
      <xsd:simpleType name="compType">
        <xsd:restriction base="xsd:string">
          <xsd:minLength value="1"/>
          <xsd:maxLength value="6"/>
        </xsd:restriction>
      </xsd:simpleType>
    <xsd:simpleType name="nomCompType">
        <xsd:restriction base="xsd:string">
          <xsd:minLength value="1"/>
          <xsd:maxLength value="40"/>
        </xsd:restriction>
      </xsd:simpleType>
    <xsd:simpleType name="nomType">
        <xsd:restriction base="xsd:string">
          <xsd:minLength value="1"/>
          <xsd:maxLength value="30"/>
        </xsd:restriction>
      </xsd:simpleType>
    <xsd:simpleType name="salaireType">
        <xsd:restriction      base="xsd:decimal">
          <xsd:fractionDigits value="2"/>
          <xsd:totalDigits    value="6"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:schema>
    XML schema registration is
    BEGIN
      DBMS_XMLSCHEMA.REGISTERSCHEMA(
        SCHEMAURL => 'http://www.soutou.net/compagnies.xsd',
        SCHEMADOC => BFILENAME('REPXML','compagniesannote.xsd'),
        LOCAL => TRUE,
        GENTYPES => TRUE,
        GENTABLES => TRUE,
        CSID =>      NLS_CHARSET_ID('AL32UTF8'));
    END;
    loading OK xml file in DB repository
    DECLARE
      v_resultat BOOLEAN;
    BEGIN
      IF (DBMS_XDB.EXISTSRESOURCE('/home/SOUTOU/general/compagnieRepository.xml')) THEN DBMS_XDB.DELETERESOURCE('/home/SOUTOU/general/compagnieRepository.xml',4);
      END IF;
      v_resultat := DBMS_XDB.CREATERESOURCE('/home/SOUTOU/general/compagnieRepository.xml',
       BFILENAME('REPXML','compagnieRepository.xml'),NLS_CHARSET_ID('AL32UTF8'));
      COMMIT;
    END;
    --resource_view does not contain /Resource[SchemaElement...
    R.RES.GETCLOBVAL()
    <Resource xmlns="http://xmlns.oracle.com/xdb/XDBResource.xsd" Hidden="false" Invalid="false" Container="false" CustomRslv="false" VersionHistory="false" StickyRef="true">
      <CreationDate>2007-12-17T10:24:09.515000</CreationDate>
      <ModificationDate>2007-12-17T10:24:09.515000</ModificationDate>
      <DisplayName>compagnieRepository.xml</DisplayName>
      <Language>en-US</Language>
      <CharacterSet>UTF-8</CharacterSet>
      <ContentType>text/xml</ContentType>
      <RefCount>1</RefCount>
      <ACL>
        <acl description="Protected:Readable by PUBLIC and all privileges to OWNER"
    xmlns="http://xmlns.oracle.com/xdb/acl.xsd" xmlns:dav="DAV:" xmlns:xsi="http://w
    ww.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/x
    db/acl.xsd   http://xmlns.oracle.com/xdb/acl.xsd" shared="false">
          <ace>
            <grant>true</grant>
            <principal>dav:owner</principal>
            <privilege>
              <all/>
            </privilege>
          </ace>
          <ace>
            <grant>true</grant>
            <principal>XDBADMIN</principal>
            <privilege>
              <all/>
            </privilege>
          </ace>
          <ace>
            <grant>true</grant>
            <principal>PUBLIC</principal>
            <privilege>
              <read-properties/>
              <read-contents/>
              <read-acl/>
              <resolve/>
            </privilege>
          </ace>
          <ace>
            <grant>true</grant>
            <principal>ANONYMOUS</principal>
            <privilege>
              <read-properties/>
              <resolve/>
            </privilege>
          </ace>
        </acl>
      </ACL>
      <Owner>SOUTOU</Owner>
      <Creator>SOUTOU</Creator>
      <LastModifier>SOUTOU</LastModifier>
      <Contents>
        <compagnie xmlns="" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
    xsi:NamespaceSchemaLocation="http://www.soutou.net/compagnies.xsd">
          <comp>EA</comp>
          <pilotes>
            <pilote brevet="PL-9">
              <nom>J. Nouveau</nom>
              <salaire>9000</salaire>
            </pilote>
          </pilotes>
          <nomComp>EuralaiR</nomComp>
        </compagnie>
      </Contents>
    </Resource>
    Many SQL queries ar OK except
    SELECT ANY_PATH  FROM RESOURCE_VIEW
      WHERE EXISTSNODE(RES,      '/Resource[SchemaElement="http://www.soutou.net/compagnies.xsd#compagnie"]')=1;

    Thanks Ants
    Your query returns to me 6021 rows. I talk about the example 3-65 and 3-70 of XML DB doc
    Accessing Resources Using EQUALS_PATH and RESOURCE_VIEW
    SELECT r.RES.getCLOBVal() FROM RESOURCE_VIEW r
    WHERE equals_path(res, '/home/QUINE/NurseryRhyme.txt') = 1;
    R.RES.GETCLOBVAL()
    <Resource xmlns="http://xmlns.oracle.com/xdb/XDBResource.xsd"
    Hidden="false"
    Invalid="false"
    Container="false"
    CustomRslv="false"
    VersionHistory="false"
    StickyRef="true">
    <CreationDate>2005-06-13T13:19:20.566623</CreationDate>
    <ModificationDate>2005-06-13T13:19:22.997831</ModificationDate>
    <DisplayName>NurseryRhyme.txt</DisplayName>
    <Language>en-US</Language>
    <CharacterSet>UTF-8</CharacterSet>
    <ContentType>text/plain</ContentType>
    <RefCount>1</RefCount>
    <ACL>
    <acl description=
    "Private:All privileges to OWNER only and not accessible to others"
    xmlns="http://xmlns.oracle.com/xdb/acl.xsd" xmlns:dav="DAV:"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/xdb/acl.xsd
    http://xmlns.oracle.com/xdb/acl.xsd"
    shared="true">
    <ace>
    <grant>true</grant>
    <principal>dav:owner</principal>
    <privilege>
    <all/>
    </privilege>
    </ace>
    </acl>
    </ACL>
    <Owner>QUINE</Owner>
    <Creator>QUINE</Creator>
    <LastModifier>QUINE</LastModifier>
    <SchemaElement>http://xmlns.oracle.com/xdb/XDBSchema.xsd#text</SchemaElement>
    <Contents>
    example 3-70 : Finding Paths to Resources that Contain Purchase-Order XML Documents.
    SELECT ANY_PATH FROM RESOURCE_VIEW
    WHERE existsNode(RES, '/Resource[SchemaElement="...]')= 1;

  • Error writing path into a text file

    Latest edit to my text edit script is trying to remember the last opened file using a .txt "preference" file in a script bundle.
    Before I click run I edit the Pref file and put Default. I then click Open last. It then does what it should (alot like my other post) but gets an error at the last write in the script, writing the file path to the pref file. This is taken from the event viewer:
    write alias "Macintosh HD:Users:Richard:Documents:Other Text Files:Untitled.txt" to file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Prefs:Save Location Pref.txt" as text
    Result:
    error "Can’t make alias \"Macintosh HD:Users:Richard:Documents:Other Text Files:Untitled.txt\" into type string." number -1700 from alias "Macintosh HD:Users:Richard:Documents:Other Text Files:Untitled.txt" to string
    Script here:
    display dialog "Open last saved or choose file" buttons {"Open last", "Open other"} default button 2
    if button returned of result is "Open last" then
    set val1 to (read POSIX file "/Users/Richard/Library/Scripts/Richard's Text Editor 3.scptd/Contents/Resources/Prefs/Save Location Pref.txt")
    if val1 is "Default" then
    EditFile("no")
    else
    EditFile(val1)
    end if
    else
    EditFile("no")
    end if
    on EditFile(val2)
    if val2 is "no" then
    set val3 to (choose file with prompt "Please select a .txt file:
    To save a text file as .txt in TextEdit, click 'Make Plain Text' in the Format menu and save the file.")
    --Get file path.
    else
    set val3 to val2
    end if
    if (get eof val3) is 0 then --Read doesn't like eof (end of file) to be 0 bytes.
    set val4 to ""
    else
    set val4 to read val3 --Read file before it gets erased.
    end if
    open for access val3 with write permission --Open file.
    set eof val3 to 0 --Erase file.
    repeat
    display dialog "Edit your text." default answer val4 buttons {"Revert", "Save"}
    set {val5, val6} to {text returned of result, button returned of result}
    if val6 is "Save" then
    write val5 to val3
    exit repeat
    else
    write val4 to val3
    end if
    end repeat
    --Write to file giving old data as default (to give the same affect as as read and edit).
    close access val3
    open for access POSIX file "/Users/Richard/Library/Scripts/Richard's Text Editor 3.scptd/Contents/Resources/Prefs/Save Location Pref.txt" with write permission
    set eof POSIX file "/Users/Richard/Library/Scripts/Richard's Text Editor 3.scptd/Contents/Resources/Prefs/Save Location Pref.txt" to 0
    write val3 to POSIX file "/Users/Richard/Library/Scripts/Richard's Text Editor 3.scptd/Contents/Resources/Prefs/Save Location Pref.txt" as text
    close access POSIX file "/Users/Richard/Library/Scripts/Richard's Text Editor 3.scptd/Contents/Resources/Prefs/Save Location Pref.txt"
    end EditFile
    Thanks, I can guess this is a simple fix like the others.

    Hmmm.
    First I checked it was all OK without POSIX and it works:
    display dialog "Open last saved or choose file" buttons {"Open last", "Open other"} default button 2
    if button returned of result is "Open last" then
    set val1 to alias (read file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt")
    --Read pref file to find out path of last edited file.
    if val1 is "Default" then
    EditFile("no")
    else
    EditFile(val1)
    end if
    else
    EditFile("no")
    end if
    on EditFile(val2)
    if val2 is "no" then
    set val3 to (choose file with prompt "Please select a .txt file:
    To save a text file as .txt in TextEdit, click 'Make Plain Text' in the Format menu and save the file.")
    --Get file path.
    else
    set val3 to val2
    end if
    if (get eof val3) is 0 then --Read doesn't like eof (end of file) to be 0 bytes.
    set val4 to ""
    else
    set val4 to read val3 --Read file before it gets erased.
    end if
    open for access val3 with write permission --Open file.
    repeat
    set eof val3 to 0 --Erase file.
    display dialog "Edit your text." default answer val4 buttons {"Revert", "Save"}
    set {val5, val6} to {text returned of result, button returned of result}
    if val6 is "Save" then
    write val5 to val3
    exit repeat
    else
    write val4 to val3
    end if
    end repeat
    --Write to file giving old data as default (to give the same affect as as read and edit).
    close access val3
    open for access file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt" with write permission
    set eof file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt" to 0
    write (val3 as string) to file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt" as text
    close access file "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt"
    --Save path of edited file to pref file.
    end EditFile
    But change that 3rd line to:
    set val1 to alias (read file (path to resource "Save Location Pref.txt"))
    gets:
    Can’t make file (alias "Macintosh HD:Users:Richard:Library:Scripts:Richard's Text Editor 3.scptd:Contents:Resources:Save Location Pref.txt") into type file.
    P.S. Sorry bout question in answered post again.

  • How to update xml content based on resource_view path?

    I am using resource db to store xml documents. I can ftp xml documents into a specific path within resource db. I have a xml schema registered and setup with a xml table. I would like to update a xml document based on a specific resource_view path.
    For example:
    /some/path/mydocument.xml
    I would like to upddate this document using the path "/some/path/mydocument.xml"
    How can this be done using SQL?

    Typically the best way is if you know the name of the default table that contains your document. You do the update on the default table as follows
    update yourTable  t
         set object_value = updateXML(...)
    where ref(t) = (
                     select extractValue(res,'/Resource/XMLRef')
                       from resource_view
                      where equals_path(res,'/some/path/mydocument.xml') = 1
                          )

  • Where to keep the Resource files in Jdeveloper ADF Applicatoin

    Hi
    our ADF application required set of XML file, i created a Folder called Resources and kept them under it.
    DataModel
    --------------> Application Sources
    ------------------------------->Packages
    ------------------------------------------------>java Classes
    --------------> Resources
    -------------------------------> XML files
    i am trying to access the XML file from Java Classes.
    for Testing perpose i created sample java class, and access the XML file like "Resources/XMLFile.xml", it was working file.
    So i refered the XML file path as "Resource/XMLFile.xml" in my classes and created datacontrol and placed them into jspx file. i ran the jspx file but i am getting file not found Exception.
    please suggest me how to deplay to XML file along with my application
    Thanks

    knidhi
    Please state your Jdeveloper version when you post. It can make a difference.
    What are the XML files? I assume they are not the XML files that the entity, view object etc are, but external XML files that you use for what? You need to read them for what purpose?
    This is a design decision, but perhaps they should instead be moved into the database, and you create an entity object that references that data, then use the entity as you would any normal entity.
    Otherwise, have you tried putting the XML files in the same package as the java classes, and does that work?
    Stuart

  • Cannot create resource instance (Works on NetBeans/Tomcat)

    I have a project that works just fine in NetBeans w/ Tomcat but when I deploy it to Sun One Web Server 6.1 SP5 I get the following error:
    StandardWrapperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception
    javax.servlet.ServletException: Cannot create resource instance
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
         at jsps.index_jsp._jspService(_index_jsp.java:91)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:687)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:459)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
    ----- Root Cause -----
    javax.naming.NamingException: Cannot create resource instance
         at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
         at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at jsps.index_jsp._jspService(_index_jsp.java:79)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:687)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:459)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
    I have the following in my in context.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/BOEnterpriseTest1">
    <Resource name="jdbc/dev10g" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev" username="userid" password="pwd" maxActive="20" maxIdle="10" maxWait="-1"/>
    </Context>
    I have the following in my web.xml:
    <resource-ref>
    <description>jdbc:oracle:thin:@10..10.10.10:1521:dev</description>
    <res-ref-name>jdbc/dev10g</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    What�s missing on the Sun One server?

    I am trying to do a refresh of a Crystal Reports report in a JSP.
    Using the web.xml looking like:
    <resource-ref>
    <description>jdbc:oracle:thin:@10.10.
    10.10:1521:dev10g</description>
    <res-ref-name>jdbc/dev10g</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    and code in my JSP:
    <%
    InitialContext initContext = new InitialContext();
    DataSource source = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    try{
    DataSource ds = (DataSource)initCtx.lookup("Data");
    catch ( NamingException e ){
    DataSource ds = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
    initCtx.bind("Data", ds);     
    I get the following error:
    WEB2720: Error initializing naming context for context /BOEnterpriseTest1
         javax.naming.NameNotFoundException: WEB3885: Name Data is not bound in this Context
              at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
              at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
              at com.iplanet.ias.web.WebModule.verifyResType(WebModule.java:510)
              at com.iplanet.ias.web.WebModule.bindResources(WebModule.java:410)
              at com.iplanet.ias.web.WebModule.bindGlobalResourceRefs(WebModule.java:352)
              at com.iplanet.ias.web.WebModule.createNamingContext(WebModule.java:323)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3718)
              at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
              at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
              at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
              at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
              at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    What steps do I need to do on the Server side or in my code?

  • How to read path data?

    Hello, I'm new to photoshop plugin development, and wondering how to read the path data in plugin? That is, the data generated by the pen tool.
    Thanks.

    From PIProperties.h
    * Contents of the indexed path in the format described
    * in the path resources documentation; (Complex, read-only).
    * The paths are indexed starting with zero. The data is stored in big
    * endian form. Refer to chapter 10 for more information on path data.
    #define propPathContents      'path'
    From the file formats document I get this. Hopefully that gets the answer for you!
    Path resource format
    Photoshop stores the paths saved with an image in an image resource block. These resource blocks consist of a series of 26-byte path point records, so the resource length should always be a multiple of 26.
    Photoshop stores its paths as resources of type 8BIM , with IDs in the range 2000 through 2999. These numbers should be reserved for Photoshop. The name of the resource is the name given to the path when it was saved.
    If the file contains a resource of type 8BIM with an ID of 2999, then this resource contains a Pascal-style string containing the name of the clipping path to use with this image when saving it as an EPS file.
    The path format returned by GetProperty() call is identical to what is described below. Refer to the IllustratorExport sample plug-in code to see how this resource data is constructed.
    Path points
    All points used in defining a path are stored in eight bytes as a pair of 32-bit components, vertical component first.
    The two components are signed, fixed point numbers with 8 bits before the binary point and 24 bits after the binary point. Three guard bits are reserved in the points to eliminate most concerns over arithmetic overflow. Hence, the range for each component is 0xF0000000 to 0x0FFFFFFF representing a range of -16 to 16. The lower bound is included, but not the upper bound.
    This limited range is used because the points are expressed relative to the image size. The vertical component is given with respect to the image height, and the horizontal component is given with respect to the image width. [ 0,0 ] represents the top-left corner of the image; [ 1,1 ] ([ 0x01000000,0x01000000 ]) represents the bottom-right.
    In Windows, the byte order of the path point components are reversed; you should swap the bytes when accessing each 32-bit value.
    Path records
    The data in a path resource consists of one or more 26-byte records. The first two bytes of each record is a selector to indicate what kind of path it is. For Windows, you should swap the bytes before accessing it as a short.
    Path data record types
    Selector
    Description
    0
    Closed subpath length record
    1
    Closed subpath Bezier knot, linked
    2
    Closed subpath Bezier knot, unlinked
    3
    Open subpath length record
    4
    Open subpath Bezier knot, linked
    5
    Open subpath Bezier knot, unlinked
    6
    Path fill rule record
    7
    Clipboard record
    8
    Initial fill rule record
    The first 26-byte path record contains a selector value of 6, path fill rule record. The remaining 24 bytes of the first record are zeroes. Paths use even/odd ruling. Subpath length records, selector value 0 or 3, contain the number of Bezier knot records in bytes 2 and 3. The remaining 22 bytes are unused, and should be zeroes. Each length record is then immediately followed by the Bezier knot records describing the knots of the subpath.
    In Bezier knot records, the 24 bytes following the selector field contain three path points (described above) for:
    the control point for the Bezier segment preceding the knot,
    the anchor point for the knot, and
    the control point for the Bezier segment leaving the knot.
    Linked knots have their control points linked. Editing one point modifies the other to preserve collinearity. Knots should only be marked as having linked controls if their control points are collinear with their anchor. The control points on unlinked knots are independent of each other. Refer to the Adobe Photoshop User Guide for more information.
    Clipboard records, selector=7 , contain four fixed-point numbers for the bounding rectangle (top, left, bottom, right), and a single fixed-point number indicating the resolution.
    Initial fill records, selector=8 , contain one two byte record. A value of 1 means that the fill starts with all pixels. The value will be either 0 or 1.

  • Resource Bundle loading in Java

    Hi,
    I want to know how to load resource bundle in java? I have a requirement of reading xml files by looking the path in resource bundle.
    Any help would be highly appreciated.

    FacesContext context = FacesContext.getCurrentInstance();
    ResourceBundle bundle = ResourceBundle.getBundle(properties_file);
    bundle.getString(properties_name);

  • Error: Unable to resolve resource bundle "fiber" for locale "en_US".

    Hi all,
    Im trying to create a resources.swf file for the purpose of dynamic localization of our application. However, I keep getting this error thrown when I try to run the ant script.
    Im running Flash Builder 4, the sdk is Flex 4.5.1 with AIR 3.0 and a Windows 7-64 bit machine (just mentioning as a few posts associated it with the OS).
    After searching some of the forum posts, ( http://forums.adobe.com/thread/606383)
    1> I checked the eclipse.ini file and found the following lines already in there.
         -nl
         en_US
    2> My compiler options already has -locale en_US specified.
    3> I tried including the swc files as suggested in the referenced thread, both as a referenced library and by manually copying the swcs to the project, but neither of them helped.
         "import 2 swc folders (Under Properties -> Flex Build Path -> Library Path):
         /Applications/Adobe Flash Builder 4/plugins/com.adobe.flexbuilder.dcrad_4.0.0.272416/dcradSwcs/4.0/libs
         and
         /Applications/Adobe Flash Builder 4/plugins/com.adobe.flexbuilder.dcrad_4.0.0.272416/dcradSwcs/4.0/loca le"
    Thanks in advance for your help.
    My build.xml file looks as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <project name="appName" basedir="." default="main">
              <taskdef resource="flexTasks.tasks" classpath="${basedir}/lib/flexTasks.jar"/>
              <!-- CHANGE TO YOUR FLEX DIRECTORY //-->
              <property name="FLEX_HOME" value="C:/Users/abc/Documents/flex_sdk_4.5.1.21328_AIR3.0"/>
              <property name="APP_ROOT" value="appName"/>
              <target name="main">
                        <antcall target="en_US"></antcall>
    <!--                    <antcall target="de_DE"></antcall>-->
              </target>
              <target name="en_US">
                        <mxmlc>
                                  <locale>en_US</locale>
                                  <source-path>locale/{locale}</source-path>
                                  <include-resource-bundles>appResource</include-resource-bundles>
                                  <include-resource-bundles>SharedResources</include-resource-bundles>
                                  <include-resource-bundles>collections</include-resource-bundles>
                                  <include-resource-bundles>components</include-resource-bundles>
                                  <include-resource-bundles>containers</include-resource-bundles>
                                  <include-resource-bundles>controls</include-resource-bundles>
                                  <include-resource-bundles>core</include-resource-bundles>
                                  <include-resource-bundles>effects</include-resource-bundles>
                                  <include-resource-bundles>formatters</include-resource-bundles>
                                  <include-resource-bundles>layout</include-resource-bundles>
                                  <include-resource-bundles>logging</include-resource-bundles>
                                  <include-resource-bundles>messaging</include-resource-bundles>
                                  <include-resource-bundles>rpc</include-resource-bundles>
                                  <include-resource-bundles>skins</include-resource-bundles>
                                  <include-resource-bundles>sparkEffects</include-resource-bundles>
                                  <include-resource-bundles>styles</include-resource-bundles>
                                  <include-resource-bundles>textLayout</include-resource-bundles>
                                  <include-resource-bundles>utils</include-resource-bundles>
                                  <include-resource-bundles>validators</include-resource-bundles>
                                  <include-resource-bundles>fiber</include-resource-bundles>
                                  <output>locale/en_US/appName.swf</output>
                        </mxmlc>
              </target>
    </project>
    Thanks & Regards,
    AJ

    I did import the swcs first as a referenced library, by
    Project-> Properties -> Flex Build Path -> Library Path -> add swc folder.
    Secondly, I manually copied the swcs from the folders at
    1>
    C:\Program Files (x86)\Adobe\Adobe Flash Builder 4 Plug-in\eclipse\plugins\com.adobe.flexbuilder.dcrad_4.0.0.272416\dcradSwcs\4.0\libs
    files present: fds.swc, fiber.swc and serializers.swc
    2>
    C:\Program Files (x86)\Adobe\Adobe Flash Builder 4 Plug-in\eclipse\plugins\com.adobe.flexbuilder.dcrad_4.0.0.272416\dcradSwcs\4.0\locale
    files present: fds_rb.swc, fiber_rb.swc and serializers_rb.swc
    into the libs folder of my project .

Maybe you are looking for

  • Sharing Music with the rest of the family over iTunes

    I have an MBP, with all of my family's music on it. My husband has a PC laptop. I have enabled sharing, so that he can see our music and use his computer with AirTunes to play music over our speakers. However, he is not able to make his own playlists

  • Songs greyed out after hard disk failure

    Hi, I've been looking though the many, many () posts on here regarding songs greyed out and unplayable but none seem to match my exact problem. I recent had the hard-disk fail on my macbook so, as a temporary mesasure I had to use a smaller, spare ha

  • Problem installing 9i on XP

    I have got ORacle 9i for WIN-NT/2000. I have now reformatted my computer and installed WIN-XP. But now I am unable to install Oracle 9i. Is there any patch available or any way out?

  • Supplier list clarification

    Hello Guys I came to know that in Supplier list creation, we can display backend ECC contracts. And this is possible only with Classic scenario. If we activate extended, the SAP documentation says itu2019s not possible to do that. I want to know why?

  • Valuted Sales Order Stock

    Dear all, We are in a situation at our customer where valuated Sales Order stock is needed. SAP documentation explicitly mentions that this is possible. Sofar I have done the following: -an Item Category that includes the E. -I have modified the mate