Setting the name of a Workstation

Hello,
I am currently playing around with Java and Bluetooth, is it possible to set the name of the computer workstation so when the dongle is connecting to a device it does not show the actual name of the workstation.
Cheers
Mark

Using:
var this[newTxt]:TextField = new TextField()
is the right approach.
You can either incrment an instance variable so that the name
is unique:
newTxt = "MyName" + _globalCounter;
var this[newTxt]:TextField = new TextField();
globalCounter ++;
Or store the references in an array:
_globalArray.push(new TextField());
Tracy

Similar Messages

  • Setting the name of a new object from a string

    Is there anyway I can set the object name of a newly created
    object from a string?
    eg.
    (the code below generates a compile time error on the
    variable declaration)
    public function addText(newTxt:String, txt:String,
    format:TextFormat):void {
    var
    this[newTxt]:TextField = new TextField();
    this[newTxt].autoSize = TextFieldAutoSize.LEFT;
    this[newTxt].background = true;
    this[newTxt].border = true;
    this[newTxt].defaultTextFormat = format;
    this[newTxt].text = txt;
    addChild(this[newTxt]);
    called using>
    addText("mytxt", "test text", format);
    I could then reference the object later on without using
    array notation using mytxt.border = false; for example
    There are many a time when I want to set the name of a new
    object from a string.
    In this example I have a function that adds a new text object
    to a sprite.
    The problem is, if I call the function more than once then
    two textfield objects will exist, both with the same name. (either
    that or the old one will be overwritten).
    I need a way of setting the name of the textfield object from
    a string.
    using
    var this[newTxt]:TextField = new TextField()
    does not work, If I take the "var" keyword away it thinks it
    a property of the class not an object.
    resulting in >
    ReferenceError: Error #1056: Cannot create property newTxt on
    Box.
    There must be a way somehow to declare a variable that has
    the name that it will take represented in a string.
    Any help would be most welcome
    Thanks

    Using:
    var this[newTxt]:TextField = new TextField()
    is the right approach.
    You can either incrment an instance variable so that the name
    is unique:
    newTxt = "MyName" + _globalCounter;
    var this[newTxt]:TextField = new TextField();
    globalCounter ++;
    Or store the references in an array:
    _globalArray.push(new TextField());
    Tracy

  • How to dynamically set the name of the generated PDF file sent by email

    Hello,
    I am using Reports 10g and I managed to send PDF reports by email, specifying the recipient, subject, format etc, using the reports servlet URL.
    But there is one thing that I cannot find a way to do: I want to dynamically set the name of the attached file. It defaults to the name of the RDF file (eg monthly_sales.pdf). I would like it to be something more meaningful (eg monthly_sales_072010.pdf, where 072010 is the month and year passed by parameters).
    Is it possible to do it?
    Thanks
    Luis

    Use System.load(...) instead of System.loadLibrary(...).

  • Set the name of cell or cells' range for a report and when export it to excel the names will be defined.

    Hello,
    I have an C# application that exports report from Reporting Services to Excel files.
    I would like to know if there is a possibility to set the name of the cell or range of cells in the report (via Report Builder or somewhere else) and when open the Excel the names are set. Similar functinality when you open the Excel and go Formulas/Define
    Name and set the name for a unique cell or range.
    Regards,

    Hi there,
    I don't believe this is possible in Reporting Services.  One workaround, if you don't know the exact range at runtime, might be to put hidden characters (white?) in your sheet at start and end of range, then do some postprocessing on the file using
    VSTO or perhaps a 3rd-party tool like this one.  
    http://www.aspose.com/reporting-services/excel-component.aspx
    If you do know the range it should be much easier.
    cheers,
    Andrew
    Andrew Sears, T4G Limited, http://www.performancepointing.com

  • Java mapping - Setting the name of the file dinamically

    Hi all,
    Problem: I know how to set the name of the file in an Idoc to file interface if I'm using a message mapping, but not if I'm using a Java mapping.
    I'm using this code inside a user-defined function of the message mapping so that I can set the name of the file dinamically:
    public String GetFileName(String  inboundParameter,String IdocNumber,Container container){
    String filename;
    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );
    filename = "cikk_" + dateformat.format( new java.util.Date() ) "_" IdocNumber + ".txt";
    DynamicConfiguration conf = (DynamicConfiguration) container
           .getTransformationParameters()
           .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, filename);
    return inboundParameter;
    (See also: /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14)
    But how can I do that if I'm using a Java mapping??
    I don't have the class Container there. How can I retrieve the DynamicConfiguration object without that class?
    Thank you very much.

    Thank you Jin,
    I knew that it had to be related with the Map object got in setParameter, but in this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
    you can't find the constant DYNAMIC_CONFIGURATION.
    I think it's not up to date.

  • Setting the name of streamed zip file

    Hi,
    I have a servlet which creates a zip file with documents retrieved from a database. To create the zip file I am using the ZipOutputStream class and adding the documents one at a time to this object. This is all working fine.
    The problem I have is pretty simple, in that I can't seem to find a way in which to set the name of the zip file. This must be possible! At the moment it appears to be setting the name of the zip file to the name of the class that created it. In this case my class is called DocumentPacker and what comes back from the servlet is a zip file called DocumentPacker.zip. This wouldn't be so bad, but if you're creating the zip file for a user that does not have cookies enabled, it appends the session id to the end of the zip file name which i don't want.
    I am creating my ZipOutputStream like this:
    ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
    and then adding the documents one at a time using a BufferedInputStream.).
    Any help on how to set the name would be much appreciated
    Thanks
    Claire

    Your servlet must set some headers on the HTTP response (Content-Type as "application/zip", Content-Disposition as "attachment; filename=yourfilename.zip")
    Read the RFC1806 document.
    Content-Type: application/zip
    Content-Disposition: attachment; filename=genome.jpeg

  • Setting the name of a file to be uploaded

    I'm having trouble setting the name that my uploaded files get when they are saved on my server. I upload the files useing the following:
    <html>
    <head>
    <title>File Upload</title>
    </head>
    <body>
    <%@ page import="java.io.*" %>
    <% if (request.getContentLength() <= 1)
    { %>
         <form method=post enctype="multipart/form-data">
         <input type=file name="file">
    <input type=submit value="Submit" name="Submit">
    <input type="text" name="fileName">
    </form>
    <%
    if (request.getParameter("Submit") != null)
    out.println(request.getParameter("file"));
    else
    String contentType = request.getContentType();
    String tempFieldType = request.getParameter("fileValue");
    if ((contentType != null)&&(contentType.indexOf("multipart/form-data") != -1))
    try
    ServletInputStream sis = request.getInputStream();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int length = request.getContentLength();
    int read = 0;
    if (length != -1)
    for(int i = 0; i < length; i++)
    read = sis.read();
    baos.write(read);
    sis.close();
    String data = baos.toString();
    String origData = data;
    int boundaryStart = contentType.indexOf("boundary=");
    String boundary = contentType.substring(boundaryStart,contentType.length());
    boundary = boundary.substring((boundary.indexOf("=")+1),boundary.length());
    int gifStart = data.indexOf("\r\n\r\n")+4;
    int gifEnd = data.indexOf("--"+boundary,gifStart);
    File file;
    String filename = request.getParameter("fileName");
    out.print(filename);
    while(true)
    if (data.indexOf("image/gif") != -1) filename = filename+".gif";
    if (data.indexOf("jp") != -1) filename = filename+".jpeg";
    file = new File("C:\\"+filename);
    if(!file.exists())
    break;
    PrintStream pr = new PrintStream(new FileOutputStream(file));
    pr.write(baos.toByteArray(), gifStart, gifEnd-gifStart);
    pr.close();
    baos.close();
    catch(Exception exp)
    { out.println(exp); }
    %>
    </body>
    </html>
    I think my problem is in the <form method=post enctype="multipart/form-data"> this method is not letting me get the updated values of the text box fileName.
    Does somebody know how do get these values?
    thanks for you help,
    snnkmtt

    try to use jspsmartupload and see this post
    http://forum.java.sun.com/thread.jsp?forum=45&thread=81638&start=0&range=100
    thank you
    looking for ur solution
    all the best
    yours
    rajesh
    [email protected]

  • How to set the name for an 'unknown' file extension?

    Specifics:
    I have various file extensions that are recognized by my mac. I would like to know how to create a list of applications that can open it so I do not get a 'There is no Default Application to open this file' error. I would also like to be able to give these file extensions names recognized by the mac.
    Just like .txt is a "Textedit Document" and .html is a "HTML Document," I'd like to be able to change the name and assosication of a file and give it its own .icns if possible.
    As for the default applications, I know how to set a default application. However, if a mac does not recognize a file extension, adding a new default application to run the file wil actually erase the old one, which is a big pain, especially when your file can be opened with ANY text editor.
    I understand that this may involve hacking into the operating system's databases, but if anyone can help, it would be greatly appreciated.

    Hi Timo,
    My jdev version is 10.1.3.3.0, this is for R12. By PR i mean to say process request and PFR process form request in the controller.
    In the Process request of the controller, i am finding the checkbox bean and assigning the firepartialaction for it.
    Later in the process form request for the fired event, i am trying to handle the rendered property of the messagetextinput. Is this a right approach?
    my code below
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean)oawebbean.findChildRecursive("X_FLAG");
    if(oamessagecheckboxbean != null)
    oapagecontext.writeDiagnostics(this, "Message check box Bean found:", 1);
    FirePartialAction firepartialaction = new FirePartialAction("change");
    oamessagecheckboxbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, firepartialaction);
    oamessagecheckboxbean.setFireActionForSubmit("change", null, null, true);
    oapagecontext.writeDiagnostics(this, "setting fire event", 1);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processFormRequest(oapagecontext, oawebbean);
    oapagecontext.writeDiagnostics(this, "Inside Process Form Request", 1);
    if("change".equals(oapagecontext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    OAMessageTextInputBean bean = (OAMessageTextInputBean)oawebbean.findChildRecursive("X_NUMBER");
    if(bean!=null){
    bean.setRendered(Boolean.TRUE);}
    Thanks,
    Malar

  • How to set the "Name" Column in EM

    I am wondering how I can get the "Name" Column to be a set to a custom text of my choosing when it is set during runtime in my SOA composite.
    Here is a link to a pic of the field I am trying to set
    http://img13.imageshack.us/img13/1491/16823609.png
    Edited by: 960635 on Nov 19, 2012 12:31 PM

    Are you referring to having a checkmark symbol, or an actual checkbox that the user can change its state. If it's the former, then that's done by making symbols visible and writing to the Item Symbols property. If it's the latter, then that's something you have to program yourself. You may want to take a look at this thread, which points to an example on LAVA. There is also this example. All found using a search...

  • How to set the name of the spool's record in report

    Hello everyone:
        I have just met a problem in setting a  name  of a spool record in report.
       Does anyone have an idea?
      Thanks for your help...

    Hello everyone:
        I have just met a problem in setting a  name  of a spool record in report.
       Does anyone have an idea?
      Thanks for your help...

  • [web] how can i set the name of an exported html file

    Hi,  I'm writing a plugin to export galleries for my homepage (standard html stuff). My current solution works and it creates a file named "index.html" and some additional stuff. Now I want to change the name of the created html file in the plugin (for example create a file galleryX.html with X being a number that is entered by the user). Is there a way to do this?  Thank you in advance, Sebastian

    I think the names of the files come from the plugin manifest. So you would create a file used as a template, and the name of that file would be the name of the resulting file.
    AddPhotoPages and AddGridPages take options to control the target HTML filename that might give you what you want, as well.

  • ARD 3.3 and Windows 7 clients running "UltraVNC" -- how to set the "Name"?

    Maybe you just can't do this, but if you can, I'd like to know how...
    I have UltraVNC installed on my Windows 7 machine. I can happily connect to it with ARD Admin 3.3.2
    However, the "Name" of the VNC client only shows as it's full hostname (which is how I added it).
    The "Manage --> Rename Computers" menu option doesn't seem to work with my VNC connections.
    Is there some way to configure the ARD admin program to give a "real name" for VNC clients?
    Like manually editing a .plist file or something?
    Thanks!

    the "Manage --> Rename Computers" menu option doesn't seem to work with my VNC connections.
    None of the commands in ARD will work with Windows clients, only with Macs. The only thing you can do with a Windows client is observe and control the system.
    Is there some way to configure the ARD admin program to give a "real name" for VNC clients? ''
    To the best of my knowledge, no, ARD will only show the domain name of the VNC client.

  • Setting the name of a JTextField in a variable

    Hi,
    I'm new to Java programming and have recently come across a problem where I need to store the name of a JTextField in a variable.
    Currently I have a String variable named "selectedBox" and the value of it will be the name of the selected JTextField such as "txtFirstName"
    I want to be able to use the "selectedBox" variable with getText() so I have tried selectedBox.getText() however this returns the following error message:
    "The method getText() is undefined for the type String"
    After a lot of searching I haven't been able to find out how to do this correctly and was wondering if anyone might be able to point me in the right direction.
    Thanks.

    KheeseKake wrote:
    Well basically I'm trying to create copy/paste menu items and so currently I have the name of the JTextFields write to the "selectedBox" variable when they become focussed using the following code...
    txtFirstName.addFocusListener(new FocusAdapter() {
         public void focusGained(FocusEvent fe) { selectedBox = "txtFirstName"; }
    txtLastName.addFocusListener(new FocusAdapter() {
         public void focusGained(FocusEvent fe) { selectedBox = "txtLastName"; }
    });...and then when the user selects an action such as Copy from the Edit menu I have it perform the following...
    Clipboard clipboard = getToolkit().getSystemClipboard();
    StringSelection data = new StringSelection(selectedBox.getText());
    clipboard.setContents(data, data);But this obviously doesn't work as stated above and this is the only way that I could think of with the small knowledge that I have so far with Java programming but I'm guessing there's a more logical way that I don't know of ;)Ok,
    change as following
    //create a reference object of JTextBox on the class level
    JTextBox selectedBox1 = null;
    txtFirstName.addFocusListener(new FocusAdapter() {
         public void focusGained(FocusEvent fe) { selectedBox1 = txtFirstName; }
    txtLastName.addFocusListener(new FocusAdapter() {
         public void focusGained(FocusEvent fe) { selectedBox1 = txtLastName; }
    Clipboard clipboard = getToolkit().getSystemClipboard();
    StringSelection data = new StringSelection(selectedBox1.getText());
    clipboard.setContents(data, data);
    The problem itself is clearing almost everything.
    You are calling a method (getText()) on an object of String which does not have any method defined with this name.
    Regards
    Aakash Agarwal

  • How can i target a movie of which i set the name based on a variable?

    Hi.
    I have the attached code:
    And i want to target the imgHolder
    ; that i have just created through the while function. I mean I
    attach a movieclip from the library to which I give a name composed
    from "imgHolder"+i where i is the number of the node from the xml.
    After that i want to succesfully target the newly created
    movieclip and get it's _x so i can attach the next movieclip next
    to the previous one. After that i will have a set of function based
    on the "imgHolder"+i movieclip.
    But i need to know how to succesfully target the movieclip.
    Thanks a lot.

    use the attach code option to display code in this forum.
    otherwise, your code is altered and difficult to read.

  • How to set dynamic name of the mail attachment according to source file ?

    Hi,gurus:
    Our scenario is like below:
    Sending files from an FTP server to another FTP server without using the integraiton repositary,and the file name is not changed .Now, we want to also send the file to some with by mail adapter.The scenario  now works by using two business services in receiver determination.But the name of the attachment is "untitled.xml".We know how to set the file name staticly,but how to set the name dynamicly according to the source file name ?
    I have checked miachel's blog "XI: Dynamic name in the mail attachment - pseudo "variable substitution"(/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution),but how can I get the source file name?
    And another question:Must we restart the adapter or j2ee engine to make the user defined module work?

    Hi,
    >>>but how can I get the source file name?
    form dynamicconfiguration (ASMA)
    >>>And another question:Must we restart the adapter or j2ee engine to make the user defined module work?
    no need for a restart
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • IMac - slow to boot, bluetooth not found.

    System: iMac 24" (Early 2009) 2.66GHz 8 GB 1067 MHz DDR3 memory (upgraded from original 4GB with 3rd party memory about 4 years ago) Seagate Barracuda ST1000DM003 1TB Disk (upgraded from original 640GB about 2 years ago) NVIDIA GeForge 9400 OS X: 10.

  • Started movie download and its got stuck, think its cos i did a firmware

    I started movie download and at the same time did a firmware upgrade, the movie has stopped downloading and wont restart. A new download is working fine. How do I delete the stuck movie, and restart it as a new download Thanks

  • Can't lock the system from making changes...

    MacBook PRO with 10.4.9 and the system will not remain locked upon restart. For example, in System Preferences->Sharing, I change the name of the computer, lock it and then do a restart. Once back in OS X the computer is in a unlocked position. I can

  • Passing  a set of records

    hello I have a doubt , i have a stored procedure that make a transformation of data and insert in another table .Ok that works ok, but only works to a single row . Now I want to modify my proc , now i want to receive a set of rows , How can I do this

  • Sharing and permission issue of folders thru different accounts

    Hello, After installing Lightroom 5 I've lost permission to write on some sub-folders located on an external drive. On the screen shot (attached) the main user called "Alfredo1" is not my user account name and as far as I know is not a reall user on