Javascript indenting in XCode

How do I change indenting rules in XCode?
I have a closure inside a function call, e.g.
myVariable = Class.create((function() {
var that;
and so half the page is used up lining up parameter expression.
I want to make everything in the block indent normally, rather than use the
parameter indent rules.
I have looked in xclangspec files, but can't figure it out.
Thanks
M

There are several ways to call javascript functions from Native XCode to HTML JS.
But for me, I tried these approaches to accomplish this:
1.) You may load/reload the HTML with corresponding URL parameters/arguments and on the JavaScript you may need to add a function like the following:
function getQueryString(){
var mySearch = window.location.search.substr(1).split("&");
   if (mySearch!="")
        for(var x=0;x<mySearch.length;x++) {
           // loop to all your query string here and perform the javascript functions corresponding to your desired parameter(s)/argument(s)
           // on you example you may call you function here
           sendAlert(mySearch[0]);
}//end function
function sendAlert(msg) {
   alert(msg);
2.) You may directly call the JavaScript functions from the UIWebView delegate methods
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType and webViewDidFinishLoad:(UIWebView *)webView
by calling this method:
[webView stringByEvaluatingJavaScriptFromString:(NSString*)]
inside where you may call you local JavaScript like:
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"sendAlert(%@)", myAlertString]];
when called within webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationTypemethod the return must be NO.

Similar Messages

  • Cannot install XCode - error occurred while evaluating Javascript

    Evening all,
    I just tried installing XCode onto my Snow Leopard disk, but I get an error saying:
    Xcode can't be installed on this disk. An error occurred while evaluating JavaScript for this package.
    I've run verify/repair disk permissions and also repair disk and still get the same error.
    Any Ideas?

    I probably can't be of much help here, but since you haven't gotten any responses yet, I'll try. The only thing I can recommend is making sure Xcode is completely uninstalled, and then re-downloading it from Apple's site and try installing it again. If re-downloading it doesn't work, then I don't know what it could be. Hopefully someone else around here will.
    Also, make sure you are installing version 3.2 of Xcode -- it's the only one that runs on Snow Leopard.
    Finally, I'm not sure what you mean when you say "my Snow Leopard disk". Snow Leopard is an operating system, not a hard disk. I'm assuming that you have a Mac (Mac Mini, iMac, Mac Pro, MacBook, MacBook Pro) -- is this correct? And you are running Snow Leopard as your operating system, yes?
    I'm just trying to get as much information as possible, because you never know what info will be helpful in solving your problem, if not for me then for the next guy who comes along and tries to answer your question.
    Anyways, hope your problem gets worked out. Sorry I couldn't be of more help.

  • Xcode indention not working regardless of preference

    hi
    i can't seem to get Xcode to indent a line after a colon : nor will it indent to the position of the previous line.
    my preferences look like this:
    i've tried resetting preferences using
    defaults delete com.apple.dt.Xcode
    ..to no avail.
    i'm trying to type python if that matters.
    thanks for any help

    It looks like a faulty repair. You should take it back to Apple and have it redone.

  • Change Indent behavior on XCode

    I was forced to work on a C project under Windows and Dev-C++ screwed up all of my formatting. I did a select all the Re-indent, but there are certain other things that I wish it would do. I know it's not standard, but I like indenting between glBegin and glEnd statements as well as glPushMatrix and glPopMatrix. I find that for me it makes the code easier to read. Is there a way to have XCode automatically indent those for me? I have the latest XCode (for Leopard)

    Well, you also have the braces technic. You just add braces around the part you want to indent, I usually do that when, for example, I define macros with start and end statements :
    LOOP_START {
    // My code
    } LOOP_END
    So, you could do that :
    glBegin(); {
    gl...();
    } glEnd();
    However, the scripts might be better if you don't want to have tons of useless braces in your code.
    NB : You can edit a post in Apple Discussion only if it has no replies to it. There's a little bubble icon with a pen on it next to the reply button to edit your message.

  • Where can I find a Javascript developer for InDesign scripting?

    Hi
    as
    I apologise in advance for posting on a technical site for InDesign developers, but our company (Dorling Kindersley) is looking for a full-time permanent developer to join our team. I've been looking for some months now and I would really appreciate some advice on where or how InDesign scripters look for work, as our role is quite specialised.
    We can offer an attractive package and although I'm biased as I work there, Dorling Kindersley really is a nice place to work - fun, friendly and super creative. I would welcome advice or for someone to approach me if they're interested.
    It's advertised as full-time and permanent but for the right candidate we can offer flexible working conditions.
    Best
    Heather Hughes
    Publishing Technologies Software Developer (permanent role)
    We’re looking for an enthusiastic individual keen to join our Creative Technical Support team, to create, maintain and enhance software tools for our creative and operations teams around the globe. This is a permanent full-time role.
    Each tool is a script or collection of scripts that allows DK to automate their creative workflows, from checks that spreads and covers have been created correctly to automated deployment of colour settings.
    The ideal candidate will have solid experience of using scripting to command Mac OS and Adobe products, have strong analytical skills and be curious, patient and willing to learn new skills. If you have design, publishing or print experience this will be an asset, but we can help fill in the gaps with training and guidance. You’ll need to be a ‘people’ person as most of the people you’ll come into contact with won’t have a software development background.
    Not only do you get to work next door to Covent Garden, in the heart of London, but  you’ll be welcomed into a small team of  friendly and irreverent geeks, who are experts in Adobe applications and workflows  and helping creative teams overcome their technical problems. Lunchtimes are often spent getting out and sampling the local cuisine in the vast number of restaurants and eateries around the office.
    You’ll get to work in a relaxed, sociable and friendly environment, working alongside our award-winning creative staff to develop their ideas for tools and get satisfaction from freeing them up to be even more creative.
    Skills required:
    Excellent skills and experience in using Javascript
    Experience of working with Macs and Adobe applications preferred
    Other programming skills and experience an advantage, e.g.  Applescript, Adobe InDesign Document Object Model, XML structure, TDD, Shell Script, Obj-C, C++ and Xcode
    Ability to learn new technologies swiftly
    Why work for DK?
    DK is an award-winning global publisher of distinctive, highly visual products for adults and children alike. We have a reputation for producing innovative design and digital products.
    Everything we make from books, eBooks and apps give unrivalled clarity to topics with a unique combination of words and pictures, put together to spectacular effect.
    We produce content for consumers in over 52 countries and 42 languages from offices in Delhi, London, Melbourne, Munich, New York and Toronto. We celebrate our 40th birthday this year, and we are enormously proud to be the world’s leading illustrated reference publisher.
    You’ll  be joining an awesome and highly talented, diverse and creative team, in an environment where everyone is encouraged to learn and coach new skills, as well as having the opportunity to grow and develop with people who are passionate about what they do.

    Hi Heather,
    I think you've found probably the best place possible to post this opening.
    I personally am interested, and would like to pursue this further. My email is admin [at] freelancebookdesign.com
    Thanks,
    Ariel

  • OS X Wide Javascript Problem

    I had everything running fine for over a year with no problems but I decided to reinstall everything just to clean out some stuff. When I reinstalled OS X I had some issues rendering website across many browsers (Firefox 3, Safari, Camino, Opera) with mainly Facebook but also a few others. I searched around some finding different things and trying them out. I updated to the newest version of Java (and also checked to make sure it was enabled in Firefox many times) and reinstalled Xcode. I also tried the Xcode tools from Apple's Developer Connection but none of these things worked.
    So I reinstalled OS X from scratch again and it was rendering everything normally, then I let it install the software updates and afterwards it didn't work again. That led me to believe it had to do with the software update somehow.
    After that I reinstalled everything from scratch again and waited to install the updates. I choose to start with GarageBand Update (4.1.1) and AirPort Utility (5.3.2) thinking neither of those would really impact it. After doing this it did not render properly once again.
    Finally I reinstalled again from scratch and this time again, it does not work before I have even installed any updates, so at the moment I am updating some things (Combined update at the moment) just to see if that makes any difference.
    Each time I installed, it was from scratch, meaning I choose to erase the harddrive and do a new installation (not upgrade) with the discs that come with the macbook. I attached a picture of what Facebook looked like incase you didn't understand what I meant by not rendering correctly. Everything else seems to work normally, just the "rendering" of some webpages. Hopefully this is just something little that I missed somewhere...
    After researching more the browers say that Javascript is not enabled, yet it is turned on in the preferences. Does anybody know what might be impacting this or how to fix it?
    Any help would be much appreciated.
    Thanks!

    I have also experienced problems since I ran an update over the weekend. I just got my macbook this weekend and everything was great until I installed the 2009 security update 1 and some other mac os updates. I have "enable javascript" checked in the security section of Safari preferences, however some pages are denying me access because I have to enable javascript....which I have enabled, at least so it shows. I would love to find a solution to this problem as well.

  • Baffling Problem with Acrobat Javascript

    I'm hoping someone can help me. I've tried for hours and hours to find what the trouble is but just can't find a solution.
    The following code works, however, this is the baffling part. I need to edit / update the code but the problem occurs when I make ANY changes to the code - even indenting a line. You will notice that the code is not indented and poorly formatted - that's because when I had the code indented, I repeatedly got a "SyntaxError: missing } in compound statement"
    I am completely baffled as to why sometimes I get the SyntaxError and sometimes not. I swear there are instances where the code worked one time and then another time causes a SyntaxError.
    Tried using Adobe Javascript Debugger, tried running code through jslint.com, tried creating a new PDF file and placing this code in that file - still getting SyntaxError if I change or indent the code. The only thing I haven't tried yet is trying it out on the Windows version.
    I'm using Acrobat Pro 10.1.3 (Creative cloud) on a Mac OS X Lion 10.7.4
    Any help would be really appreciated!
    var trackErrors = 0;
    var errorMessage = 'Please complete all of the required fields';
    if (this.getField('1A').value.length === 0) { errorMessage += ' A Wall Height '; trackErrors++; }
    if (this.getField('1B').value.length === 0) { if (trackErrors === 1) { errorMessage += ', B Wall Length '; } else { errorMessage += ' B: Wall Length '; trackErrors++; } }
    if (this.getField('1C').value.length === 0) { if (trackErrors === 1) { errorMessage += ', C Spacing '; } else { errorMessage += ' C: Spacing '; trackErrors++; } }
    if (this.getField('1-4-radio').value === 'Off') { if (trackErrors === 1) { errorMessage += ' and Material Type - Fabric or Laminate.'; } else { errorMessage += ' Mat type'; trackErrors++; } }
    if (trackErrors === 0) {
    var x, y, v, z, kits = '';
    var flag = 0;
    this.getField('1D').value = this.getField('1B').value / 2;
    this.getField('1E').value = this.getField('1D').value / this.getField('1C').value;
    this.getField('1F').value = Math.floor(this.getField('1E').value);
    this.getField('1G').value = this.getField('1F').value + (this.getField('1F').value - 1);
    this.getField('1H').value = this.getField('1A').value * this.getField('1G').value;
    var materialType = this.getField('1-4-radio').value;
    switch (materialType)
    case 'F':
    x = this.getField('1H').value / 32;
    y = Math.ceil(x);
    this.getField('bw-kits-required').value = y + " Kit Required";
    break;
    case 'L':
    x = this.getField('1H').value / 128;
    y = this.getField('1H').value / 32;
    if (flag === 0) {
    if (x === Math.round(x)) { kits += x + ' kit '; flag++; }
    if (y === Math.round(y)) { kits += y + ' kit '; flag++; }
    v = Math.floor(x);
    x -= v;
    if (v > 0) { if (x < 0.75) { kits += v + ' kit'; v = Math.ceil((x * 128) / 32); kits += ' and ' + v + ' kit'; } else if (x >= 0.75) { kits += (v + 1) + ' kit '; } } else { kits += Math.ceil(y) + ' kit'; }
    this.getField('bw-kits-required').value = kits;
    break;
    } else { app.alert(errorMessage); }

    I don't get the same thing in Acrobat 9 on Windows XP. It would be interesting to see what happens if you copy what you posted here on the forum and use it.
    I would suggest changing code like:
    if (this.getField('1A').value.length === 0)
    To something like this:
    if (this.getField('1A').valueAsString.length === 0)
    If you use the value property and the field value is numeric (or "true" or "false"), it won't have a length property because the type of the value isn't "string", so it will be undefined. Since the special value of undefined is not equal to zero the code works, but it's a bit misleading. It could be further refined to just:
    if (!getField('1A').valueAsString)

  • [JS,AS,CS3]running javascript in bridge from applescript

    Sorry for the cryptic subject description, and you might think this is a bit off topic, but i hope you could shed some light on this.
    I need to execute a Javascript in Bridge from an applsecript using an Applescript. Bridge only has one AS command: do javascript with arguments.
    My testtude looks like this:
    set myJS to "
    alert(arguments[0].toString());
    alert(arguments[1].toString());
    alert(arguments[2].toString());
    alert(arguments[3].toString());
    alert(arguments[4][0].toString());
    set arg1 to 12
    set arg2 to "some text"
    set arg3 to "'some single quoted text'"
    set arg4 to "\"some double quoted text\""
    set arg5 to {1, 2, 3, "a", "b", "c"}
    tell application "Bridge CS3"
    do javascript myJS with arguments {arg1, arg2, arg3, arg4, arg5}
    end tell
    --tell application "Adobe Photoshop CS3"
    -- do javascript myJS with arguments {arg1,arg2,arg3,arg4,arg5}
    --end tell
    You would expect a series of dialogs to appear with the content of the arguments, but you'll get nothing! If you omit the '[0]', you'll get any numerical value, but all strings, however they are quoted, are ignored.
    Strange.
    Stranger still is, that if do the exact same thing in Photoshop, it works like a charm and you can pass any kind of data as argument.
    Any ideas on what's going on?
    Thanks!

    Here is my AS script from Xcode project:
    Some text is in Russian don't mind it. Most important that this is a
    working example.
    global myBridgeLabel
    on clicked theObject
    if name of theObject is "b1" then
      set processName to (StringToUnicode "Начало работы")
      set myBridgeLabel to "Red"
      set myLabel to 1
    else if name of theObject is "b2" then
      set processName to (StringToUnicode "Сдано на цв-корр")
      set myBridgeLabel to "Green"
      set myLabel to 2
    else if name of theObject is "b3" then
      set processName to (StringToUnicode "Сдано на ДТП")
      set myBridgeLabel to "Yellow"
      set myLabel to 3
    else if name of theObject is "b4" then
      set processName to (StringToUnicode "Забрано")
      set myBridgeLabel to "Blue"
      set myLabel to 4
    else if name of theObject is "b5" then
      set processName to (StringToUnicode "Пересдано")
      set myBridgeLabel to "Purple"
      set myLabel to 5
    end if
    tell application "Adobe InDesign CS2"
      set mydocument to active document
      set myDocumentPath to full name of mydocument
      set workerName to "Сервецкий"
      tell metadata preferences of mydocument
       set theDate to current date
       set myWeekday to weekday of theDate as string
       set myDenNedeli to my convertWeekday(myWeekday)
       set myRecord to (processName & "  " & workerName & "  ") & myDenNedeli & " " & text 1 thru -4 of time string of theDate & "
       set myHistory to get property namespace "http://ns.adobe.com/photoshop/1.0/" path "History"
       set property namespace "http://ns.adobe.com/photoshop/1.0/" path "History" value myHistory & myRecord
      end tell
      set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate(); var bt = new BridgeTalk; bt.target = \"bridge\"; myScript = 'app.displayDialogs = \"none\"; var t = new Thumbnail (File (\"" & myDocumentPath & "\")); var mdata = t.metadata; mdata.namespace = \"http://ns.adobe.com/xap/1.0/\"; mdata.Label = \"' + myLabel + '\";'; bt.body = myScript; bt.send();"
      do script myJavaScript language javascript
      tell mydocument to save
    end tell
    tell application "Finder"
      set myFile to a reference to file myDocumentPath
      set label index of myFile to myLabel
    end tell
    end clicked
    on convertWeekday(myWeekday)
    if myWeekday = "Monday" then
      return "Пн"
    else if myWeekday = "Tuesday," then
      return "Вторник"
    else if myWeekday = "Wednesday" then
      return "Среда"
    else if myWeekday = "Thursday" then
      return "Четверг"
    else if myWeekday = "Friday" then
      return "Пятница"
    else if myWeekday = "Saturday" then
      return "Суббота"
    else if myWeekday = "Sunday" then
      return "Воскресенье"
    else
      return "N/a"
    end if
    end convertWeekday

  • Code Indent in Dreamweaver CS3

    I have just tried out Dreamweaver in CS3 and I was
    disappointed to find that one of the most basic features in any
    code editor remains elusive. I am quite simply talking about the
    indent of code. I have set code to indent with 4 spaces in the Code
    Format preferences window, but when I indent code, it still uses a
    tab. I know it's not a massive deal, but it's such a simple feature
    and it has caused me a good bit of frustration. It would be great
    if Adobe could fix this sometime :)

    I've had the Convert Tabs to Space on... and it appears to be
    just spaces in
    DW... but if you open file in Notepad, then they are in fact
    Tabs... so DW
    is not converting... just in the way it gets displayed.
    "Randy Edmunds" <[email protected]> wrote in
    message
    news:f0apco$p8e$[email protected]..
    > ebow,
    >
    > What kind of "code" are you talking about?
    >
    > The DW pref that uses spaces vs. tabs applies to the
    indenting done for
    > source formatting of HTML "markup" or CSS "rules" (i.e.
    not JavaScript
    > "code").
    >
    > But, if you hit a tab character on the keyboard, that's
    what gets
    > inserted.
    >
    > Note that you can select a block of text, right-click
    and use:
    >
    > Selection > Convert Tabs to Space
    >
    > Hope this helps,
    > Randy
    >
    >
    >> I have just tried out Dreamweaver in CS3 and I was
    disappointed to find
    >> that one of the most basic features in any code
    editor remains elusive. I
    >> am quite simply talking about the indent of code. I
    have set code to
    >> indent with 4 spaces in the Code Format preferences
    window, but when I
    >> indent code, it still uses a tab. I know it's not a
    massive deal, but
    >> it's such a simple feature and it has caused me a
    good bit of
    >> frustration. It would be great if Adobe could fix
    this sometime :)

  • Can I Use Xcode in InDesign?

    I have received xcode to test from an external company to create a viewer for CAD data within our App created with the DPS.  I want to place the Xcode in a InDesgin Article used in a Folio.  Is this Possible?

    As Mobly mentions, no. The extensibility mechanism in DPS is to create HTML5 and drop that into a web overlay. Check with the external company to see if they've developed an HTML5+JavaScript version of the CAD viewer.
    Another option would be to export images of the CAD item and put them in an image sequence to give some level of interactivity. Or to export a few views of the object as PDF and put them on the page. If you look at the Hardi app in the iTunes store they take a few of these approaches to showcase structural elements for the construction industry.
    Neil

  • Javascript in  XSLT?

    in OC4J,I write a XSLT as follows:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.1">
    <xsl:strip-space elements="doc chapter section"/>
    <xsl:output method="xml" encoding="GBK" indent="yes"/>
    <xsl:template match="doc">
    <html>
    <script language="JavaScript">
    for(i=0;i!=3;i++){      //!!!!!,it is "!="
    alert("aa");
    </script>
    <body bgcolor="#f0d0a0" text="#202040">
    <xsl:apply-templates/>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    the run a xml with this xsl is ok;but when I change the
    JavaScript "1!=3" into "i<3",the new xsl is as following:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.1">
    <xsl:strip-space elements="doc chapter section"/>
    <xsl:output method="xml" encoding="GBK" indent="yes"/>
    <xsl:template match="doc">
    <html>
    <script language="JavaScript">
    for(i=0;i<3;i++){      //!!!!!,it is "<"
    alert("aa");
    </script>
    <body bgcolor="#f0d0a0" text="#202040">
    <xsl:apply-templates/>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    when I run with the same xml,it reports:
    java.lang.NullPointerException at
    org.apache.xalan.transformer.TransformerImpl.createResultContentH
    andler(TransformerImpl.java:1059) at
    org.apache.xalan.transformer.TransformerImpl.createResultContentH
    andler(TransformerImpl.java:1000)
         at org.apache.xalan.transformer.TransformerImpl.transform
    (TransformerImpl.java:1115)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for
    J2EE].servlet.XSLServlet.service(XSLServlet.java:290)
         at javax.servlet.http.HttpServlet.service
    (HttpServlet.java:336)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for
    J2EE].server.http.HttpRequestHandler.processRequest
    (HttpRequestHandler.java:647)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for
    J2EE].server.http.HttpRequestHandler.run
    (HttpRequestHandler.java:189)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for
    J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:62).
    how do I write the comparison literal "<"?

    You can escape the "<" symbols within the Javascript with &lt;
    for fairly simple/small sets of code. We're generating a good
    bit of js and editing with all the escapes in place gets a bit
    tedious. We're getting around this by escaping the entire block
    with <xsl:text output-escaping="yes"><[CDATA[ immediately before
    the <script> tag and ]]></xsl:text> after the </script> tag.
    This works fairly well, albeit there are issues whent the js
    needs to access xsl data, but that can usually be overcome by
    placement.
    rob.

  • Java templates gone from XCode for 10.6

    I went back to rework some Java applets I have written and discovered they don't compile anymore in Xcode (at least as before)
    Hmm. I had Java templates, downloaded the latest XCode and the templates are gone. My 'old' applets won't compile complaining 'Jam is deprecated and has been removed; targets that use Jam must be upgraded to native targets. For more information on doing this, consult the Xcode documentation.'
    I found a separate Java SDK download? From
    http://developer.apple.com/java/download/
    has 10.5 version listed only
    Clicking on the link goes to the (old) log-in page for the Developer program and the download/Java link goes to a page with 10.6 Java downloads - Developer previews.
    Still no Java templates (in Xcode). Maybe I should read the documentation (if I can find where it was installed). I was able to 'compile' the Hello World applets in the organizer window but no 'Hello World' in Safari.
    What's happened to the 'old' system for Java development?

    After installing XCode 3.2.1 there were no Java docs or Java templates. I installed the Java files and docs for 10.6 from the developer site. Searching XCode for Java gives a lot of Javascript items but no easy answers for Java. Using the Organizer window instead of the Xcode project window is a big change. I must have missed it but searching this forum, Xcode and now the java-dev mailing list archive hasn't given me good answers. One answer seems to be to put Mac OS X10.5 on a separate volume, install the older XCode (or current??) and develop Java one OS version back.
    The Hello World applet didn't run for me when I tried it. Blank browser window. Java Preferences seem to default for 10.6
    "Create Java projects in Xcode 3.2 using Xcode's Organizer. Choose Window > Organizer to open the Organizer. Click the + button at the bottom of the Organizer. Choose New From Template > Java Templates." > Java Applets. Build
    BUILD SUCCESSFUL
    Total time: 1 second
    The Debugger has exited with status 0.
    gives a new window in Safari but it is empty.

  • Getchar() and putchar() in adobe javascript

    One of the simplest programs that are written in C for newbies is pure input  and output of characters from pressed keys in succession (with some max  repetition allowed by the operating system settings for key pressed for extended  period).
    #include <stdio.h>
    main(){
    int c;
    while ( (c=getchar()) != EOF)
         putchar(c);
    I want to write a similar minimal program in acrobat  javascript.
    The script may be document/application level ... most preferably not attached  to any specific field on any page and listens for the Keystroke ... ie a pressed  key.
    However, if it MUST be attached to a field ... then that field would be a  button field which is on the current page and in focus ... but this will take  away the simplicity I desire and as exhibited in the C program above which  compiles and works.
    I want to print the letter corresponding to the key pressed on the console  using this statement or another ...
    console.println(c);
    [QUESTION] How do I read the key pressed ?
    Thanks,
    Francis Fukuyama
    Re: getchar() and putchar() in adobe  javascript
    as a newbie i did lots of search in the sdk and guide before asking this  question.
    i need acrobat to do events globally irrespective of page based on what key  is pressed in certain contexts so it should not interfere with other normal  operations.
    alternatively, i need three of four modifiers of mouse events but  nothing is more convenient on the fingers than pressing a key like y/n for  yes/no .
    Are there any non-reserved keys or non-reserved clicks events that can be  recorded at the global, application or document level, or else be intercepted by  a button and then recorded in some kind of file or hidden field for that button  and then automatically "recorded or downloaded" into a text file as a data ?
    Thanks again for any help.
    Francis
    George Johnson
    1,505 posts since 
    Aug 11, 2002
    2. Dec 17,  2010 11:03 PM in response to: FrancisFukuyama
    Re: getchar() and putchar() in adobe  javascript
    You would have to create a custom plug-in to have any hope of accomplishing  this. JavaScript cannot do what you describe. You might want to pose this  question in the Acrobat SDK forum here if you haven't already.

    Francis,
    The SDK documentation is sufficient, I learned plugin development just from reading all the relevant documents. The SDK comes with sample plugins that you can use to start your own project.
    However, your development environment will not be sufficient to develop Acrobat plugins: you need Visual Studio on Windows and XCode on the Mac. Which version is necessary depends on which version of the SDK you are using.
    The PDF reference is the document that describes The PDF file format, and is necessary if you want to access information in a PDF, add to, or modify a PDF. Since the PDF format is no longer owned by Adobe, but is now an international standard, that document is available as ISO32000 through ISO, but you can still find the previous version on Adobe's web site.
    Plugin development is complicated, don't expect to learn it in an afternoon or a week or even a month.
    Karl Heinz Kremer
    KHKonsulting LLC
    PDF Acrobatics Without a Net
    [email protected]
    http://khkonsulting.com

  • Altering indents on formatted Word (.doc) files

    I am laying out a legal book which has been formatted in Word. The original has a sub para numbering hierachy of
    1
    1.1
    1.1.1
    1.1.2...
    1.2
    1.2.1
    1.2.2... etc.
    This has been set up in Word as an auto numbering system, to have a fist line indent of 15mm, rest full out. Whenever the text is imported I get a straight 15mm indent with the paragraph number sitting out at -15mm. If I try and override the paragraph style sheet that's been imported, I lose the paragraph numbering.
    Any idea on how can I override the Word document style sheet when imported to lose the indent and to have the second line sit underneath the start of the first line?
    Hope someone can shed some light on the matter.
    Thanks
    Keith
    [email protected]

    >
    http://www.personality.org/spags.htm
    http://www.personality.org/spags/07DissertationGrantForm.doc
    the file isn't there.
    Is it uploaded?
    Is it that exact filename? Case sensitive?
    Note-
    there are three body tags on the page, with repeated
    javascript functions
    after the body tags.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Auto Indent

    Hello,
    Dreamweaver CS4 has a nice auto-indent feature that helps you
    write code. It works great with braces but works terribly awful
    with braces! when I use curly brackets it indents the code up to
    the beginning of the previous line in a new one, but with the
    parenthesis it indents it up to the last letter of the previous
    line in a new line. I rather it happens the same as with braces,
    any idea how this may work out? in CS3 it worked fine but not for
    javascript when you edited it in a .JS document, now everything is
    plagued with this problem in CS4, even .PHP files :(
    this is an example:
    current:
    $(document).ready(
    desired:
    $(document).ready(
    Thanks in advance, I fear it won't be possible to fix, but
    adobe people should be aware that this behaviour of the code indent
    is just plain weird because many libraries in both PHP and
    JavaScript use parenthesis and you may want to indent the code you
    put inside them but not how DreamWeaver does now.

    >>It works great with braces but works terribly awful
    with braces!
    Uh-Huh...
    Walt
    "rene.olivo" <[email protected]> wrote in
    message
    news:gmkdbk$gc4$[email protected]..
    > Hello,
    >
    > Dreamweaver CS4 has a nice auto-indent feature that
    helps you write code.
    > It
    > works great with braces but works terribly awful with
    braces! when I use
    > curly
    > brackets it indents the code up to the beginning of the
    previous line in a
    > new
    > one, but with the parenthesis it indents it up to the
    last letter of the
    > previous line in a new line. I rather it happens the
    same as with braces,
    > any
    > idea how this may work out? in CS3 it worked fine but
    not for javascript
    > when
    > you edited it in a .JS document, now everything is
    plagued with this
    > problem in
    > CS4, even .PHP files :(
    >
    > this is an example:
    >
    > current:
    >
    > $(document).ready(
    > ________________________...
    > ________________________);
    >
    > desired:
    >
    >
    > $(document).ready(
    > ___...
    > );
    >
    >
    > Thanks in advance, I fear it won't be possible to fix,
    but adobe people
    > should
    > be aware that this behaviour of the code indent is just
    plain weird
    > because
    > many libraries in both PHP and JavaScript use
    parenthesis and you may want
    > to
    > indent the code you put inside them but not how
    DreamWeaver does now.
    >

Maybe you are looking for

  • How can two users have separate libraries in iTunes?

    I have a library in iTunes for my 20 GB iPod, and now someone else in the house has an iPod shuffle. How is the shuffle installed into iTunes without overriding my library? Will it become obvious when the shuffle software is downloaded? Will I be for

  • Mac Pro Mountain Lion Kernel Panic Dual Video Cards

    I've been getting constant panics since upgrading to Mountain lion on my 2009 Mac Pro. Worth noting is I have dual GT 120 Video Cards and dual 30" LCDs.  Every panic seems to be caused by com.apple.NVDAResman This computer has been rock solid since 2

  • Down payments in APP

    Hi Gurus, What happens when it takes down payments in Payment program Does it reduce the balance we have to pay? and what happens to the open down payments? pls suggest Regards, Ravi

  • No Registration Using Adobe ID & Password!

         I am in an administrator-priviledged user account in (x32) Win XP SP3, on the Internet.  I have my Adobe ID and password in a spreadsheet that is open in one window.  I open the newly purchased, installed, and activated Adobe Acrobat XI Pro in a

  • Can I place my preferred folders from my machine into Captivate project library?

    Hello everyone. I have created a SWF(it may be of 2.0 or 3.0 versions) file which loads images and audio files dynamically from a source folder using XML and JavaScript. I want that SWF file to play in my captivate project. Is that possible ? Or can