Problems using ActionDescriptor class on PS Flash panel

I'm making a PS CS5 panel with Flash Builder 4. I want to handle 'New document' event from PS in my panel.
With  'Adobe Photoshop Panel Developer's Guide' I found all I need to install  and handle the event..... but I receive a callback for all classes with  'New' event. I known I'ts possible to get the class of the  descID in the callback parameter using the 'ActionDescriptor' class, but  I can't compile:
var desc:ActionDescriptor = new ActionDescriptor();
I have a 4 errors as:
1046: Type was not found or was not a compile-time constant: File.     MyPanel          Unknown     Flex Problem
I'm using this libs in Flash:
csawlib.swc
apedelta.swc
CSXSLibrary-2.0-sdk-3.4.swc
csaw_photoshop.swc and this is a part of my code: <mx:Script>
<![CDATA[
import com.adobe.csawlib.photoshop.Photoshop;
import com.adobe.csxs.core.CSXSInterface;
import com.adobe.csxs.events.*;
import com.adobe.csxs.types.*;
import com.adobe.photoshop.*;
public function init():void{
CSXSInterface.instance.evalScript("PhotoshopPersistent");
CSXSInterface.instance.evalScript("PhotoshopRegisterEvent", charToInteger("Mk  ").toString());
ExternalInterface.addCallback("PhotoshopCallback" + CSXSInterface.getInstance().getExtensionId(), PhotoshopCallback);
public function PhotoshopCallback(eventID:Number, descID:Number):void{
if(eventID == charToInteger("Mk  ")){
var desc:ActionDescriptor = new ActionDescriptor();
]]>
</mx:Script> Any idea? T.I.A.

I wonder if
http://forums.adobe.com/community/flex/flex4beta
might not be abetter place for the question.
Or maybe 
Photoshop Scripting
or
Photoshop SDK

Similar Messages

  • Problem Using Custom Classes in UCCX8.5.1 SU3

    Dear All,
    My team is facing problem in using Java custom classes for UCCX 8.5.1 SU3
    The problem is that we have created some conditional prompts for currency in different languages, our custom java class contains two mathods GetEnglishString(parameter set) and GetUrduString(parameter set). We are able to use/call both methods one by one and both at same time in CCX Editor and validate the script successfully but when we set the script as application it failed.
    We tried to use both methods one by one and found that script with GetEnglishString is working ok but when we place GetUrduString (alone as well) MIVR logs say that method is unknown altough CCX Editor does not give us any error. We triend to restard Administration and Engine Services several time but to no avail. If somebody know the reason and solution kindly share it ASAP.
    Regards
    Kashif Surhio

    Hi
    In that case I would double check you have uploaded the file, and restart the server completely. In testing we found that restarting the engine didn't always reload the classes.
    Aaron

  • Problem using captivate file in a flash file

    Hi,
    I am using a captivate file inside a flashfile.
    I am experiencing the following problem.
    I have a button in a layer above the captivate file. But when
    I click that button the button and the captivate file react.
    How is this possible, and how can I resolve this?

    I don't understand your question.
    You 'click a button and the button and the captivate file
    react'.
    What does that mean?
    A bit more clarity in exactly what is happening may help
    diagnose the
    problem (no promises!).
    Erik
    moglidroop wrote:
    > Hi,
    >
    > I am using a captivate file inside a flashfile.
    > I am experiencing the following problem.
    > I have a button in a layer above the captivate file. But
    when I click that
    > button the button and the captivate file react.
    > How is this possible, and how can I resolve this?
    >
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - Authorware
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    samples, tips, products, faqs, and links!
    *Search the A'ware newsgroup archives*
    http://groups.google.com/group/macromedia.authorware

  • Regex problem using Pattern class

    Hi everybody,
    I am using the Pattern class to create a pattern which has to match "Sanofi-Aventis" (without the quotes). The pattern is created like this:
    Pattern p = Pattern.compile("(?i)(" + Pattern.quote(match) + ")");It is then matched as follows:
    Matcher m = p.matcher(retval);
    String retval = m.replaceAll("<font color=\"#CCCCCC\"><strong>$1</strong></font>");I have printend the value of "match" and of "Pattern.quote(match)", and they look like this:
    >
    match: Sanofi-Aventis
    Pattern.quote(): \QSanofi-Aventis\E
    However, "Sanofi-Aventis" does not get matches in the text. Words / Strings without a "-" work fine, so I guess I am doing something wrong with respect to the dash. Can anybody help me out?
    Best regards,
    Jethro

    Hi there,
    I now sort the p_matches ArrayList on String length to make sure I find the longest possible match. Besides that I am now using the CASE_INSENSITIVE flag instead of "(?i)". This is my final code:
    public static String colorOccurences(String p_text, ArrayList<String> p_matches, String p_HTMLColorCode)
         String retval = p_text;
            // Sort the matches ArrayList on String length, starting with the longest String.
            Collections.sort(p_matches, new StringLengthComparator());
            // Color the matches.
            for (String match : p_matches)
                Pattern p = Pattern.compile("(" + Pattern.quote(match) + ")", Pattern.CASE_INSENSITIVE);
                Matcher m = p.matcher(retval);
                retval = m.replaceAll("<font color=\"" + p_HTMLColorCode + "\"><strong>$1</strong></font>");
         return retval;
    * Comparator object for Strings. Orders by length of String from large to small,
    * then alphabetically.
    private static class StringLengthComparator implements Comparator
         public int compare(Object x,Object y)
              if(x instanceof String && y instanceof String)
                   String xstr = (String) x, ystr = (String) y;
                   if(xstr.length() == ystr.length()) return xstr.compareTo(ystr);
                   else if(xstr.length() < ystr.length()) return 1;
                   else return -1;
              else return 0;
    }Best regards,
    Jethro

  • Problem using XMLNode class with schema registered XML

    Hello,
    I'm working on an XML document management system that currently uses CLOB storage of XML data. I'm trying to switch over to a schema registered/object-relational approach to increase performance.
    However, the code (which I didn't write) uses the XMLNode class and its methods such as selectSingleNode which work when used against unregisterd xml, but breaks when used against registered xml. I don't know if this is a namespace issue or what.
    Here's a sample.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true); // don't know if this is neccessary
    newICD = (XMLDocument) dbf.newDocumentBuilder().parse(icdFile);
    docNode = (XMLNode) newICD.getDocumentElement();
    //this works with CLOB storage, but returns null with registered schema/O-R storage
    tempNode = docNode.selectSingleNode("/sw_icd/TITLEPAGE/DocNum");
    Any ideas would be greatly appreciated.
    Thanks

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--W3C Schema generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:element name="AffectedComponents">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="COMPONENT" maxOccurs="unbounded" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="CHANGE" type="xs:string" />
         <xs:element name="COMPONENT">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="SectionString" />
                        <xs:element ref="RevisionType" />
                        <xs:element ref="SectionType" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="Change">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="CHANGE" />
                        <xs:element ref="SSCN" />
                        <xs:element ref="PIRNS" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="DESCRIPTION" type="xs:string" />
         <xs:element name="PIRN">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="PIRN_NUMBER" />
                        <xs:element ref="AffectedComponents" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="PIRNS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="PIRN" maxOccurs="unbounded" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="PIRN_NUMBER" type="xs:string" />
         <xs:element name="PUBDATE" type="xs:string" />
         <xs:element name="REV" type="xs:string" />
         <xs:element name="RevItem">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="REV" />
                        <xs:element ref="DESCRIPTION" />
                        <xs:element ref="PUBDATE" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="RevisionType" type="xs:string" />
         <xs:element name="SSCN" type="xs:string" />
         <xs:element name="SectNum">
              <xs:complexType>
                   <xs:choice maxOccurs="unbounded">
                        <xs:element ref="SectNumTitle" />
                        <xs:element ref="t" />
                        <xs:element ref="list" />
                        <xs:element ref="figure" />
                        <xs:element ref="tbl" />
                   </xs:choice>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="SectNumTitle" type="xs:string" />
         <xs:element name="SectionString" type="xs:string" />
         <xs:element name="SectionType" type="xs:string" />
         <xs:element name="SigDate" type="xs:string" />
         <xs:element name="SigElectronic" type="xs:string" />
         <xs:element name="SigName" type="xs:string" />
         <xs:element name="SigOrganization" type="xs:string" />
         <xs:element name="SigType" type="xs:string" />
         <xs:element name="Signature">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="SigType" />
                        <xs:element ref="SigName" />
                        <xs:element ref="SigElectronic" minOccurs="0" />
                        <xs:element ref="SigOrganization" />
                        <xs:element ref="SigDate" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" />
              </xs:complexType>
         </xs:element>
         <xs:element name="Signatures">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="colspec" maxOccurs="unbounded" />
                        <xs:element ref="Signature" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="type" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="TblHdg">
              <xs:complexType mixed="true">
                   <xs:attribute name="num" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="bindata">
              <xs:complexType>
                   <xs:attribute name="src" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="caption" type="xs:string" />
         <xs:element name="cell">
              <xs:complexType mixed="true">
                   <xs:attribute name="name" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="colspec">
              <xs:complexType>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="name" type="xs:string" use="required" />
                   <xs:attribute name="width" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="figure">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="width" />
                        <xs:element ref="height" />
                        <xs:element ref="caption" />
                        <xs:element ref="bindata" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="height" type="xs:string" />
         <xs:element name="list">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="list1" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="list1">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="t" />
                        <xs:element ref="list2" minOccurs="0" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="list2">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="t" />
                        <xs:element name="list3" minOccurs="0">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element ref="t" />
                                  </xs:sequence>
                                  <xs:attribute name="id" type="xs:string" use="required" />
                                  <xs:attribute name="val" type="xs:string" use="required" />
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="pui" type="xs:string" />
         <xs:element name="sect">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="SectNum" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="sw_icd">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="TITLEPAGE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="Title1" type="xs:string" />
                                       <xs:element name="Title2" type="xs:string" />
                                       <xs:element name="Group" type="xs:string" />
                                       <xs:element name="Rev" type="xs:string" />
                                       <xs:element name="DrafDate" type="xs:string" />
                                       <xs:element name="DocumentType" type="xs:string" />
                                       <xs:element name="Org1" type="xs:string" />
                                       <xs:element name="Org2" type="xs:string" />
                                       <xs:element name="Org3" type="xs:string" />
                                       <xs:element name="Location" type="xs:string" />
                                       <xs:element name="ContractNo" type="xs:string" />
                                       <xs:element name="DocNum" type="xs:string" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="REVHISTPAGE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="RevItems">
                                            <xs:complexType>
                                                 <xs:sequence>
                                                      <xs:element ref="colspec" maxOccurs="unbounded" />
                                                      <xs:element ref="RevItem" maxOccurs="unbounded" />
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                       <xs:element ref="t" />
                                       <xs:element name="ERU" type="xs:string" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="PREFACE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element ref="t" />
                                       <xs:element ref="Signature" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="CONCURRENCE">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element ref="Signatures" maxOccurs="unbounded" />
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="CHANGES">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="ChangeItems">
                                            <xs:complexType>
                                                 <xs:sequence>
                                                      <xs:element ref="colspec" maxOccurs="unbounded" />
                                                      <xs:element ref="Change" maxOccurs="unbounded" />
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:sequence>
                                  <xs:attribute name="id" type="xs:string" use="required" />
                             </xs:complexType>
                        </xs:element>
                        <xs:element ref="sect" maxOccurs="unbounded" />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="t">
              <xs:complexType mixed="true">
                   <xs:attribute name="id" type="xs:string" />
              </xs:complexType>
         </xs:element>
         <xs:element name="tbl">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="pui" minOccurs="0" />
                        <xs:element ref="TblHdg" maxOccurs="unbounded" />
                        <xs:element ref="colspec" maxOccurs="unbounded" />
                        <xs:element ref="tr" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
                   <xs:attribute name="val" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="tr">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="cell" maxOccurs="unbounded" />
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:string" use="required" />
              </xs:complexType>
         </xs:element>
         <xs:element name="width" type="xs:string" />
    </xs:schema>

  • Using Adobe Reader and Adobe Flash player with Yosemite

    Has anyone had a problem using Adobe Reader or Adobe Flash Player with Yosemite 10.10.1

    Adobe Reader X can only save reader-enabled forms. Adobe Reader XI can save all forms.

  • Problems using WatchService

    Hello everyone,
    I've got a few problems using WatchService.class:
    public void watch() throws IOException, InterruptedException{
         WatchService watchService = FileSystems.getDefault().newWatchService();
         Paths.get(desktopDirPath).register(watchService,
                   StandardWatchEventKinds.ENTRY_CREATE,
                   StandardWatchEventKinds.ENTRY_DELETE,
                   StandardWatchEventKinds.ENTRY_MODIFY);
         while(true){
              WatchKey key = watchService.take();
              for(WatchEvent<?> event : key.pollEvents()){
                   WatchEvent.Kind<?> kind = event.kind();
                   switch(kind.name()){
                        case KIND_ENTRY_CREATE:
                             // ... do something
                             break;
                             // ... more cases ...
                        default:
                             break;
              key.reset();
    So, there is my code snippet. First things first:
    1.) Is a new thread started automatically when calling watchService's call method? I've been wondering because the method throws an InterruptedException.
    2.) I've got problems dealing with the watch events. For example let's imagine we want to move or delete one or more files when created in a specified directory. It seems to work for one file or even a few more. But it fails to handle new files which are created rapidly for example by a service in the watched directory. It seems that the occurring events aren't recognized fast enough, but that's just my theory. I've tried logging the paths to the files in a hashtable and deleting them asynchronous in another thread but it seems that I'll have to deal with concurrency then, won't I?
    Best regards!
    Edited by: 958296 on 11.09.2012 01:28

    958296 wrote:
    Hello everyone,
    I've got a few problems using WatchService.class:
    public void watch() throws IOException, InterruptedException{
         WatchService watchService = FileSystems.getDefault().newWatchService();
         Paths.get(desktopDirPath).register(watchService,
                   StandardWatchEventKinds.ENTRY_CREATE,
                   StandardWatchEventKinds.ENTRY_DELETE,
                   StandardWatchEventKinds.ENTRY_MODIFY);
         while(true){
              WatchKey key = watchService.take();
              for(WatchEvent<?> event : key.pollEvents()){
                   WatchEvent.Kind<?> kind = event.kind();
                   switch(kind.name()){
                        case KIND_ENTRY_CREATE:
                             // ... do something
                             break;
                             // ... more cases ...
                        default:
                             break;
              key.reset();
    So, there is my code snippet. First things first:
    1.) Is a new thread started automatically when calling watchService's call method? I've been wondering because the method throws an InterruptedException.Without actually checking the implementation, my understanding is that you have a thread created for he WatchService.
    2.) I've got problems dealing with the watch events. For example let's imagine we want to move or delete one or more files when created in a specified directory. It seems to work for one file or even a few more. But it fails to handle new files which are created rapidly for example by a service in the watched directory. It seems that the occurring events aren't recognized fast enough, but that's just my theory. I've tried logging the paths to the files in a hashtable and deleting them asynchronous in another thread but it seems that I'll have to deal with concurrency then, won't I?Yes. As stated in the WatchService Doc, actual functionality of the WatchService is highly platfom implementation specific, and the problem you list is one listed. Any time you have a file that may be visible by others, you have to deal with a potential concurrency issue.

  • Creating a triangle using polygon class problem, URGENT??

    Hi i am creating a triangle using polygon class which will eventually be used in a game where by a user clicks on the screen and triangles appear.
    class MainWindow extends Frame
         private Polygon[] m_polyTriangleArr;
                       MainWindow()
                              m_nTrianglesToDraw = 0;
             m_nTrianglesDrawn = 0;
                             m_polyTriangleArr = new Polygon[15];
                             addMouseListener(new MouseCatcher() );
            setVisible(true);
                         class MouseCatcher extends MouseAdapter
                             public void mousePressed(MouseEvent evt)
                  Point ptMouse = new Point();
                  ptMouse = evt.getPoint();
                if(m_nTrianglesDrawn < m_nTrianglesToDraw)
                                int npoints = 3;
                        m_polyTriangleArr[m_nTrianglesDrawn]
                      = new Polygon( ptMouse[].x, ptMouse[].y, npoints);
    }When i compile my code i get the following error message:
    Class Expected
    ')' expectedThe two error messages are refering to the section new Polygon(....)
    line. Please help

    Cannot find symbol constructor Polygon(int, int, int)
    Can some one tell me where this needs to go and what i should generally
    look like pleaseI don't think it is a good idea to try and add the constructor that the compiler
    can't find. Instead you should use the constructor that already exists
    in the Polygon class: ie the one that looks like Polygon(int[], int[], int).
    But this requires you to pass two int arrays and not two ints as you
    are doing at the moment. As you have seen, evt.getPoint() only supplies
    you with a single pair of ints: the x- and y-coordinates of where the mouse
    button was pressed.
    And this is the root of the problem. To draw a triangle you need three
    points. From these three points you can build up two arrays: one containing
    the x-coordinates and one containing the y-coordinates. It is these two
    arrays that will be used as the first two arguments to the Polygon constructor.
    So your task is to figure out how you can respond to mouse presses
    correctly, and only try and add a new triangle when you have all three of its
    vertices.
    [Edit] This assumes that you expect the user to specify all three vertices of the
    triangle. If this isn't the case, say what you do expect.

  • Problem with constructors and using public classes

    Hi, I'm totally new to Java and I'm having a lot of problems with my program :(
    I have to create constructor which creates bool's array of adequate size to create a sieve of Eratosthenes (for 2 ->n).
    Then it has to create public method boolean prime(m) which returs true if the given number is prime and false if it's not prime.
    And then I have to create class with main function which chooses from the given arguments the maximum and creates for it the sieve
    (using the class which was created before) and returns if the arguments are prime or not.
    This is what I've written but of course it's messy and it doesn't work. Can anyone help with that?
    //part with a constructor
    public class ESieve {
      ESieve(int n) {
    boolean[] isPrime = new boolean[n+1];
    for (int i=2; i<=n; i++)
    isPrime=true;
    for(int i=2;i*i<n;i++){
    if(isPrime[i]){
    for(int j=i;i*j<=n;j++){
    isPrime[i*j]=false;}}}
    public static boolean Prime(int m)
    for(int i=0; i<=m; i++)
    if (isPrime[i]<2) return false;
    try
    m=Integer.parseInt(args[i]);
    catch (NumberFormatException ex)
    System.out.println(args[i] + " is not an integer");
    continue;
    if (isPrime[i]=true)
    System.out.println (isPrime[i] + " is prime");
    else
    System.out.println (isPrime[i] + " is not prime");
    //main
    public class ESieveTest{
    public static void main (String args[])
    public static int max(int[] args) {
    int maximum = args[0];
    for (int i=1; i<args.length; i++) {
    if (args[i] > maximum) {
    maximum = args[i];
    return maximum;
    new ESieve(maximum);
    for(int i=0; i<args.length; i++)
    Prime(i);}

    I've made changes and now my code looks like this:
    public class ESieve {
      ESieve(int n) {
       sieve(n);
    public static boolean sieve(int n)
         boolean[] s = new boolean[n+1];
         for (int i=2; i<=n; i++)
    s=true;
    for(int i=2;i*i<n;i++){
    if(s[i]){
    for(int j=i;i*j<=n;j++){
    s[i*j]=false;}}}
    return s[n];}
    public static boolean prime(int m)
    if (m<2) return false;
    boolean x = sieve(m);
    if (x=true)
    System.out.println (m + " is prime");
    else
    System.out.println (m + " is not prime");
    return x;}
    //main
    public class ESieveTest{
    public static int max(int[] args) {
    int maximum = args[0];
    for (int i=1; i<args.length; i++) {
    if (args[i] > maximum) {
    maximum = args[i];
    return maximum;
    public static void main (String[] args)
    int n; int i, j;
    for(i=0;i<=args.length;i++)
    n=Integer.parseInt(args[i]);
    int maximum=max(args[]);
    ESieve S = new ESieve(maximum);
    for(i=0; i<args.length; i++)
    S.prime(i);}
    It shows an error for main:
    {quote} ESieveTest.java:21: '.class' expected
    int maximum=max(args[]); {quote}
    Any suggestions how to fix it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is anyone else having email problems such as apps exiting in the middle of an email? It may be a wireless issue. I use First Class for work and yahoo email for personal. I will be in the middle of typing a long email and the app just quits, all data lost.

    Is anyone else having email problems such as apps exiting in the middle of an email? It may be a wireless issue. I use First Class for work and yahoo email for personal. I will be in the middle of typing a long email and the app just quits, all data lost.

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds). Ignore the "Slide to power off"

  • Problem in database fields creation using default class of B1DE Wizard

    Hi Experts
    In an AddOn I am creating database fields in default class "Project_DB'. It does not give any message weather it creates fields or not. My code for database creation is given below
    Namespace FormARE
        Public Class FormARE_Db
            Inherits B1Db
            Public Sub New()
                MyBase.New
                B1Connections.theAppl.StatusBar.SetText("Please wait. AddOn is updating database", BoMessageTime.bmt_Long, BoStatusBarMessageType.smt_None)
                Columns = New B1DbColumn() {New B1DbColumn("OCRD", "BondNo", "Bond No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OCRD", "BFrDate", "Bond From Date", BoFieldTypes.db_Date, BoFldSubTypes.st_None, 10, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OCRD", "BTDate", "Bond To Date", BoFieldTypes.db_Date, BoFldSubTypes.st_None, 10, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cntner_no", "Container No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cntnr_Seal", "Container Seal No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cust_Seal", "Custom Seal No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "ctryOrgn", "Country of Origin", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1)}
                GC.Collect()
                B1Connections.theAppl.StatusBar.SetText("Successfully updated database", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success)
            End Sub
        End Class
    End Namespace
    It does not give first message. and second message come properly and immediately when I start the AddOn. I checked it makes all fields accuratly. But when I open the related form it gives error message "Data Source not found". I checked fields name are same as used in form and database .What can the reason? Should I use a simple function for creation of database fields which will run when a button is pressed? Is it fine to using default class for database fields creation?
    Thanks
    Best Regards
    Jitender

    I solved the problem.
    Procedure I followed :
    UNINSTALL ORACLE WRAEHOUSE BUILDER SOFTAWARE.
    'GLOBAL_NAMES = FALSE' in init.ora file.
    RESTARTED MY MACHINE.
    INSTALL THE ORACLE WRAEHOUSE BUILDER SOFTAWARE.

  • Problem using standard libraries in C++ class

    Hi
    I am new to JNI. I am having problems using standard C++ library.
    My java code looks like
    public class JavaSide {
    public native void sayHello();
    static {
    System.loadLibrary("NativeSideImpl");
    public static void main(String[] args) {
    JavaSide app = new JavaSide();
    app.sayHello();
    and My NativeSideImpl.cpp code is
    #include <stdio.h>
    #include "JavaSide.h"
    JNIEXPORT void JNICALL Java_JavaSide_sayHello
    (JNIEnv *env, jobject obj)
    cout<<" Hello";
    I am compiling this on solaris 5.8 using the following command
    CC -G -Kpic -I/usr/java/include -I/usr/java/include/solaris NativeSideImpl.cpp -o libNativeSideImpl.so
    when I run my java program using
    java JavaSide
    I get the following exception
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/oracle/temp/libhello.so: ld.so.1: java: fatal: relocation error: file /home/oracle/temp/libhello.so: symbol __1cDstdEcout_: referenced symbol not found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:832)
    at HelloWorld.<clinit>(HelloWorld.java:6)
    The program works if I replace cout with printf() .
    My LD_LIBRARY_PATH does include the path where of the C++ standard libraries.
    Any help would be much appreciated
    Thanks in advance..

    Well, cout was just a a simple example. I was having problems with using the std C++ libraries, e.g ostringstream . and likes .
    I tried using the -lCstd in the compile option and it worked.

  • How to use a class in Flash

    I'm trying to use a class (LoadSwf.as) in Flash. The code is
    listed at the bottom. Here's my code in Flash:
    import LoadSwf
    var myLoader:LoadSwf=new LoadSwf()
    addChild(myLoader)
    The file being imported (Login1.swf) contains a very simple
    ComboBox. When it is loaded into Flash the ComboBox fails. Why is
    this happening? Thanks!

    I think you have to add the loader to the display list after
    the loader completes:

  • Flash Panel Problem

    Hi,
    ich habe ein Flash Panel bekommen (swf und jsx), welches auch super funktioniert.
    Ich muss aber etwas am Panel ändern, kann ich aber nicht, da ich nur die swf habe. Also will ich mithilfe von Flash Builder ein neues Panel kreieren und die alte jsx verwenden.
    Aber natürlich funktioniert es nicht...
    Das Skript macht folgendes:
    - System aussuchen aus einer dropdownliste, bzw. ich musste eine combo box nehmen...
    - Spielnamen eingeben
    - system + spielnamen an einen vorher definierten pfad anhängen und dort einen Ordner erstellen mit dem Spielnamen. ( Beispielsweise ist der vordefinierte Teil "D:\Test", dahinter dann das System + Spielnamen -> "D:\test\supernintendo\tetris")
    - dann werden Dateien in den Ordner kopiert und ebenfalls umbenannt.
    Mein erstes Problem war, dass ich die exportierte swf öffnen konnte und auch die Combo Cox funktioniert hat. Sobald ich in Photoshop öffne, geht die Combo Box nichtmehr auf, bzw ich sehe nur den ersten Eintrag.
    Ich habe es jetzt hinbekommen, die Werte der Combobox und des Textfeldes, in einer Variablen zu speichern (path). Allerdings muss ich diese Variable beim Funktionsaufruf von CreateFolder(), mit übergeben. Das bekomme ich nicht hin...
    Hier mal der Code der mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    width="418" height="232" layout="absolute">
        <mx:Script>
            <![CDATA[
                import com.adobe.csxs.core.CSXSInterface;
                import mx.controls.Alert;
                import mx.events.ListEvent;
                import flash.external.ExternalInterface;
                public function callAddDocument():void{
                    CSXSInterface.instance.evalScript("addDocument");
                public function callCloseDocument():void{
                    CSXSInterface.instance.evalScript("closeDocument");
                public function init():String{
                    var path:String;
                    path = String(sys.value);
                    path += "=" + game.text;
                    //Alert.show(path);
                    return path;
                public function callCreateFolder(path:String):void{                              
                    CSXSInterface.instance.evalScript("createFolder");
                public function callCopyRenameFile():void{
                    CSXSInterface.instance.evalScript("copyRenameFile");
                public function callCopyAllFolder():void{
                    CSXSInterface.instance.evalScript("copyAllFolder");
                protected function sys_changeHandler(event:ListEvent):void
                    // TODO Auto-generated method stub
            ]]>
        </mx:Script>
        <mx:Label id="yoyo" x="20" y="81" fontSize="16" fontWeight="bold" text="System:"/>
        <mx:Label x="20" y="120" fontSize="16" fontWeight="bold" text="Gamename:"/>
        <mx:Image x="118" y="10" width="175" height="43"
                  source="file:xxx.png"/>
        <mx:TextInput id="game" x="171" y="119"/>
        <mx:ComboBox id="sys" x="171" y="81" change="sys_changeHandler(event)" editable="false"
                     enabled="true" name="systemo">
            <mx:String>xxx</mx:String>
            <mx:String>yyy</mx:String>
            <mx:String>zzz</mx:String>
        </mx:ComboBox>
       <mx:Button  x="171" y="178" label="Button" click="init();callCreateFolder(document.path)"/>               
    </mx:Application>
    Und die dazugehörige jsx:
    // JavaScript Document
    function addDocument() {
        app.documents.add();
    function closeDocument() {
        app.activeDocument.close();
    function createFolder(path) {
        var osSpecificPrePath = "";
        if ($.os.search(/windows/i) != -1) {
            fileLineFeed = "Windows";
            osSpecificPrePath = "E:/";  //M:/
        } else {
            fileLineFeed = "Macintosh";
            osSpecificPrePath = "";  //yyy/xxx/ccc/
        var arguments = path.split("=");
        var type = arguments[0];
        var gameName = arguments[1];
        gameName = gameName.replace(/\s/g, "");
        gameName = gameName.replace(/\,/g, "");
        gameName = gameName.replace(/\&/g, "");
        gameName = gameName.replace(/\-/g, "");
        gameName = gameName.replace(/\´/g, "");
        gameName = gameName.replace(/\_/g, "");
        gameName = gameName.replace(/\./g, "");
        // Templates
        var commonDesignTemplatesPath = osSpecificPrePath
                + "xxx/yyy";
        //Target
        var gameDesignPagePath = osSpecificPrePath + "xxx/yyy" + type + "/" + gameName;
        copyAllFolder(commonDesignTemplatesPath, gameDesignPagePath, type, gameName);
        remSign(gameName);
    Wie gesagt, die jsx war so und hat auch so funktioniert. Ich muss also nur die mxml dazu anpassen.
    Wenn mir jemand helfen könnte, wäre das traumhaft
    Vielen Dank im Voraus
    uebeL

    Dies ist ein Englisch-sprachiges Forum.
    Außerdem solltest Du vielleicht auf
    http://forums.adobe.com/community/flash_builder
    posten.
    Edit: Du scheinst von dort hierher verwiesen worden zu sein.
    This is an English-language Forum.
    Moreover you may want to post over at 
    http://forums.adobe.com/community/flash_builder
    Edit: You seem to have been directed here from there.

  • Problem using Implementing Remote Panel Security with a Login Example Guide

    I'm having issues implementing a Remote Panel protected by username and password using this NI guide:
    Implementing Remote Panel Security with a Login Example
    Remotepanellogin.zip
    After login process using Login.vi, if the user has the right password, his IP will be included in the Webserver allowed access list and the user can open the web site which hosts the Main.vi. Ok.
    But if the user doesn't have the password, his IP will be denied!
    Here is the problem: Will his IP be denied at all including Login.vi? 
    I can't block access to Login.vi because even if the user entered a wrong password, he can still try login again....
    How can I configure a type of Allowed and Denied table using Webserver properties? For example:
    IP: 10.0.0.2 - Login.vi (allowed) - Main.vi (allowed) -> User entered a right password
    IP: 10.0.0.3 - Login.vi (allowed) - Main.vi (denied) -> User entered a wrong password
    Note: Login.vi must be visible and accessible always.
    These are the Implementing Remote Panel Security with a Login Example instructions:
    After you configure the VIs with the Web Publishing Tool, browse to the Remote Panel Login VI and run it. When this VI runs, LabVIEW gives remote panel access to all users, but they can view and control only this VI.
    If a user successfully logs in by supplying the Username of NI and password of labview (both are case sensitive) then LabVIEW gives remote panel access to the IP address specified in the Remote Panel Login VI only. That user can then browse to and run the Main VI.
    Thanks in advance!
    APrado
    Message Edited by APrado on 04-01-2009 08:21 AM

    I'm thinking about using the option Reentrant Execution (VI property > Category > Execution).
    Could anyone help me?
    Thanks.

Maybe you are looking for