Facing difficulties in dragdrop event handler while moving images from tilelist to canvas

1) my tile list contains images which are coming from
database.
2) i have to drag and drop those images from tile list to
canvas.
3) In tile list we don't have to write mouseMove event
handler where we can define dragInitiator . (if dragEnabled = true)
4) my dragEnter and dragOver is working properly . Problem is
in dragDrop .
5 ) how can i collect there dragged image
(event.draggedsource.....what must be write)
ERROR : Cannot access a property or method of a null object
reference

import java.util.Timer;
import java.util.TimerTask;
public class Test {
    public static void main (String[] args) {
        final Timer timer = new Timer ();
        System.out.println ("I'm gonna do something in 5 seconds.");
        timer.schedule (new TimerTask () {
            public void run () {
                System.out.println ("Time's up !");
                timer.cancel ();
        }, 5000);
}if you want to display the time left it's better to make your own Thread that updates a "timeleft variable:
{code}
public class Test {
//set the time Left to 3 mins.
private long secondsLeft = 3 * 60;
public Test () {
new Thread (new Runnable () {
public void run () {
try {
while (secondsLeft > 0) {
//Let's update the timer every second.
Thread.sleep (1000);
secondsLeft = secondsLeft - 1;
System.out.println ("Time left: " + (secondsLeft / 60) + ":" + (secondsLeft % 60));
System.out.println ("Grats !");
} catch (InterruptedException e) {}
}).start ();
public static void main (String[] args) {
new Test ();
{code}

Similar Messages

  • Tree's DragSource changes at DragDrop event handler?

    I try to drag a node A into node B. When the DragDrop event
    handler is called, the dragSource is changed to the drop source?
    I have declared the following:
    <mx:Tree ......... dragDrop="OnDragDrop(event)"....../>
    In the function:
    private function OnDragDrop( event:DragEvent ):void
    var ds:DragSource = event.dragSource;
    items = new XML( ds.dataForFormat("treeItems")[0] );
    I was expecting the "items" has a copy of the dragged item
    (node A). However, it has all the drop node's info (node B). How do
    I get teh drag and drop nodes in this event?
    P.S. I am trying to drag and drop at the same tree control.
    Could that be why? Is it suppose to be like this? Or, its a bug?
    -Alan

    Regarding your button look and feel issue, the easiest thing to do would be to copy the button template you are using for the template-based buttons and modify that to add in your onClick handlers.
    The builtin button template for the theme I am using (Theme 12) looks like this
    <table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="">
        <tr>
            <td class="t10L"><img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /></td>
            <td class="t10C">#LABEL#</td>
            <td class="t10R"><img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /></td>
        </tr>
    </table>In other words, each button is rendered in its own HTML table.
    Copy this button template, call it mybutton and have it look like
    <table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="">
        <tr>
            <td class="t10L"><img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /></td>
            <td class="t10C">#LABEL#</td>
            <td class="t10R"><img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /></td>
        </tr>
    </table>Notice that I put a no-op in the href tag for the button and added a onClick handler that will do the real work. In your case, you would use the URL Redirect on the Button attributes page to call your SavePage() function. Since the onClick is called before the href, it should (hopefully) do what you are looking for.
    I put up these changes at
    http://htmldb.oracle.com/pls/otn/f?p=24317:26
    Do let us know.
    Thanks

  • Steps required while moving employees from one organisational

    Can any one explain and write down steps required while moving employees from one organisational unit to other organisational unit.
    regards

    Hi ganesh,
    Firstly create the new position for the employee if it is not already existing.
    Then goto SPRO : Personnel Man. -> Pers. Adm-> Customizing procedures -> Actions -> Define infogroups -> infogroup.
    Only Copy 0001 is enough.
    Then Setup personnel actions with this infogroup.
    Then go to PA40 and execute this action for that specific employee.
    You will only need to change the position assignment, org unit, job, vs all come from position info.
    Regards,
    Dilek
    Edited by: Dilek Ersoz on Oct 14, 2008 9:41 AM

  • Error while getting  image from database in SUP using ios?

    Hi All,
      Im developing native iOS application using sup 2.1.3 . Im getting error While retrieving  image from SUP database. Here i'm trying to get image from database and show in imageView.can any one help me how to fix this issue?
    In database image datatype is  'LONG Binary' .
    My table Schema:
    CREATE TABLE dba.ImagesTable (
    RowID INT NOT NULL,
    ImageName VARCHAR(20) NOT NULL,
    PhotoData LONG BINARY NOT NULL,
    IN SYSTEM
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA137 PRIMARY KEY CLUSTERED (RowID)
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA138 UNIQUE NONCLUSTERED (RowID)
    in Xcode:
                [SUP107SUP107DB synchronize];
                SUP107ImagesTable *imgTable =[[SUP107ImagesTable alloc]init];
                SUP107ImagesTableList *list =[SUP107ImagesTable findAll];
                SUP107ImagesTable * oneRecord =[list objectAtIndex:0];
                NSLog(@"rowId:%d---imageName:%@---photoData:%@---photoLenght:%d",oneRecord.rowID,oneRecord.imageName,oneRecord.photoData,oneRecord.photoDataLength);
                NSData *tempData =[[NSData alloc]init];
                SUPBigBinary *responseBinaryData = (SUPBigBinary *)oneRecord.photoData.value;
                @try {
                    [responseBinaryData openForWrite:[oneRecord.photoData length]];
                    [responseBinaryData write:tempData];
                @catch (NSException *exception) {
                    NSLog(@"exception: %@",[exception description]);
                UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(50,50,100,100)];
                [self.window addSubview:imgView];
                UIImage * tempImage =[UIImage imageWithData:tempData];
                imgView.image = tempImage;
                [responseBinaryData close];
    Error Log:
    2014-04-02 18:42:15.150 SUP102[2873:70b] rowId:1---imageName:Apple---photoData:SUPBigBinary: column=c pending=1 allow_pending_state=1 table=sup107_1_0_imagestable mbo=0x0 key=(null) ---photoLenght:90656
    Printing description of responseBinaryData:
    <OS_dispatch_data: data[0xc891b40] = { leaf, size = 90656, buf = 0x1213a000 }>
    2014-04-02 18:42:33.304 SUP102[2873:70b] -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] exception: -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.306 SUP102[2873:70b] [ERROR] [AppDelegate.m:497] NSInvalidArgumentException: -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40

    This thread talks about uploading image to SAP from a IOS device,Sending Image to SAP via iOS Native app (SUP 2.1.3)
    Midhun VP

  • My RGB colors are turning to cmyk while bringing image from illustrator or photoshop. Why?  Removing the image from that page bright RGB colors are back.. hmm

    My RGB colors are turning to cmyk while bringing image from illustrator or photoshop. Why? 
    Removing the image from that page bright RGB colors are back.. hmm

    Edit > Transparency Blend Space > Document RGB

  • Run Time Error ASSERTION_FAILED while moving Transformation from Quality to Prodcution

    Hi All,
    Need your urgent Help here !
    we had moved 4 transformations into prodcution from Quality out of which 3 were succesful adn one Transformation has failed due to RC12 "ASSERTION_FAILED" . In the attached screenshot , you can find few more details.
    The transformation we are moving is a new one and after the transport failure we can still see that in Prodcution , but when we double click on it , it is throwing dump of "ASSERTION_FAILED"(I can see only T versions of routines and formula exisitng in RSTRANSTEPROUT Table in Production)
    we are currently in SAP 7.3 and with SP 8 . I have seen so many solutions with lot of SAP note recommendations but we are not sure of the exact solution .
    Please let know the correct solution .

    Hi Vinod,
    while moving to quality you didn't face any problem?
    Again try to import same request at bw prod and see.
    if its failed again then again collect into transport request at dev system and move to qua/prod.
    While collecting transformations you need to collect all routines.
    Best way to collect transformations is RSA1-->transport connection, expand middle pane, transforamtions-->select object-->find your transformations and drag to rigth side screen.
    at right side screen, expand your transformations and select all routines which are exist.
    After that you can released and import at target systems.
    Thanks

  • Determine event handler for swing components from the API browser

    Is there a way to determine what event handlers are assocaited with the different swing classes. For example JTextField is associated to ActionListener, and JCheckbox uses the event handle ItemListener. Is there a way to determine this by looking at the class via the Java API?

    Yes, there is. You'll observe that JTextField has an "addActionListener(ActionListener)" method, for a start. And JTextField is a subclass of JTextComponent, which has "addCaretListener(CaretListener)" and "addInputMethodListener(InputMethodListener)" methods. And JTextComponent is a subclass of JComponent, which has an "addAncestorListener(AncestorListener)" method. And so on... there are more. All of this can be found in the API documentation by looking for methods whose names start with "add".

  • Moving images from one library to another; or how to have 2 libraries open at the same time in Aperture 2

    This may be something easy but for some reason I am having a hard time figuring this out. Basically this is the situation: I have a library on my MBP hd that I import pictures to when I am not hooked up to my external hd for the time being. The main library is of course on the external 2tb drive. How do I have 2 libraries open so that I can essentially drag and drop the pictures from one library to another? It would basically be like moving files from one project to another. Thanks for any help!

    Always keep a backup of your original images, before you delete them. I make a backup right form the card, before I even import them to Aperture.
    How are your images stored right now? Are the referenced or managed? On your big volume I'd consolidate the newly imported images, to be sure they are really inside the Aperture library before I delete any images outside the library.
    but they have the little yellow triangle caution symbol on them and I can see them but not really edit them
    That is a very typical problem, when you imported your images as referenced images then somehow delete or move the original master image files, that are stored outside the Aperture library.
    Do you still have the original masters of the images with the yellow triangle that you cannot edit? In Aperture 3 you can point Aperture to the location of the master image file "File >Locate referenced image" - probably Aperture 2 has a similar command to let you reconnect your masters, if you still have them. Look into the manual.

  • Moving Image from one Review to Another?

    I attempted to upload an image (open in Photoshop) to a specific review. However, I could not see the desired review in the Photoshop CS Review panel. Out of frustration - after attempting to "find" the desired review for several minutes - I uploaded the image to another review and then went online, using Safari, to Acrobat.com.
    There is no visible means of moving an image from one review to another. There is a way of dragging one review (with all sub-images) to another location. But I can't see a way of moving a sub-image from one review to another review.
    IF there is some "magic" that someone knows I would sure appreciate some education.

    This works quite well for a single image review. I've moved them from one workspace to another. The issue is when a review has multiple images and you want to take only one of them from that review and move it to another review in another workspace; I can't seem to get that to work at all.
    When I open a review and navigate to the desired image, then click in the lower left corner and select a new workspace to move the image to, it moves the entire review - not the single image - to the new workspace.
    I guess I could delete the "part" from the workspace it currently exists in and then create it as a stand alone review, but then I won't be able to imbed it into another review as I want to do.
    The source frustration here is that I can't get CS Review in CSPS5 to navigate to the desired workspace/review. I get "ALL REVIEWS" displayed but not the workspaces... Any ideas on how to display workspaces instead of reviews?

  • Moving images from project to project

    Every time I try to MOVE an image from one project to another project, it COPIES it instead. That's not what the manual says should happen. Am I doing something wrong?
    Thanks, Fran

    Welcome to the list. Have you read the [Help & Terms of Use|http://discussions.apple.com/help.jspa] section yet?
    The only way you would be coping from project to project is if you were holding down the option key while you dragged the image.
    If that's not the case then it really sounds like either the source or destination (or both) are other than projects. Remember projects are the yellow file box looking things.
    regards

  • Moving images from external HD to internal - lost metadata (mac)

    got myself in a bit of a pickle here...
    got a new imac - and upgraded from LR2 to LR4
    all images are stored on an external hard drive - i *want* all of my pictures on the internal HD
    so i copied the pictures folder to the internal HD - opened LR4, updated the catalog file (moved it from the extHD - pointed it to the new location on the internalHD)
    apparently the lrcat file didn't get informed though - i had blank spaces in grid-view where there used to be pictures
    so.. jiggered around with it until it found all the pictures (they appeared in grid view) - except, now there were alternating picture/blank-spaces
    i discovered a way to "find" all the missing pictures - then "removed" them
    unfortunately, when we checked our work, we found that the meta-data didn't come with the pictures that remained - so, no stars, tags, flags, etc.......
    good thing is.. i still have the original files and LRCAT file on the extHD
    can somebody help me right this ship??
    (i think i want to just uninstall LR4 and start all over)

    Obviously you can just use the Finder to copy the external iPhoto Library to your new Mac Pro. You should change the name of it first so you don't get the two mixed up or accidentally replace one with the other.
    If you want the old and new photos in a single library you have a couple of choices. The free choice would be to import the "several images" from the MacPro's current library into the external library.
    An easy way to merge two libraries is to use iPhoto Library Manager. It's available here: http://www.fatcatsoftware.com/iplm/
    It has some functions in the free download version but more advanced functions require the US$19.95 shareware fee.

  • Event handling while changing the value or clicking the button

    Hi All,
    I am working on Jdeveloper 11.1.1.5.
    I have a must requirement where i have a textbox and a button.
    Now if a user changes the value of the textbox then i need to show a dialog to the user for the confirmation that whether he wants to continue or not.
    And on click of button i execute my business logic and commit in the database.
    NOTE :- I am opening that dialog on the valueChangeEvent of the textbox.
    Case 1 :-
    User enter a value in the textbox and tab out the field , value change occurs and dialog displayed onto the page. -> CORRECT
    Case 2 :-
    User enter a value in the textbox and does not tab out the field and directly click on the button.In that case , actually valueChange and button code both executes at the same time.I mean to say , the user click on the button , i get the dialog , but my business logic also gets executed. -> INCORRECT(ISSUE)
    How should i restrict the button logic to be executed till the dialog has been shown and user has confirmed.
    Kindly suggest!!!
    Regards,
    Shah

    Hi Shah,
    You can try something like this:
    <af:inputText autoSubmit="true" id="it1" ...>
      <af:setPropertyListener from="true" to="#{viewScope.uncommittedData}" type="valueChange"/>
    </af:inputText>
    <af:commandButton partialTriggers="it1" disabled="#{viewScope.uncommittedData ne 'true'}" .../>AP

  • Error while moving Data from fs to its corresponding Structure

    Hi Gurus,
    I am getting a run time error  (Operands are not Convertible) while executing the below statement:
    MOVE <fs> TO  ls_struc.
    [ Over here: ls_struc is TYPE XYZ (a custom structure containg 7 fields, out of which one field is type Packed decimal, which is why I get a run time error)  AND
                         <fs> is a field symbol which is containing the data for all fields in the structure XYZ ]
    If I change the data type of packed decimal field in the structure: 'LS_STRUC' to 'char ' type, then the above query works.
    Could anyone help in resolving this issue.
    Thanks
    Gaurav Verma

    Hi Gverma09,
    Good!
    you can do a bit simpler without structdescr and without handle:
    CREATE DATA e_dref TYPE (im_stru_name).
    or even
    CREATE DATA e_dref like <fs>.
    Access  as you do now, eventually need second field-symbol.
    ASSIGN lv_dataref->* TO <fs2>
    The ABAP RTTS Run Time Type Services CL_ABAB_xyzDESCR are especially useful if you need to know all field properties of a structure or if you want to create structures and tables dynamically. In this case, CREATE DATA has the required features.
    Regards,
    Clemens

  • Facing prolem  in Dashboard 4.1, while fetching data from Bex Query

    Hi Exports,
    I am facing an error message  " Failed to (de-)serialise data. (Xsl 000004)"  while fetching data in Dashboard from Bex Query.
    The query is getting connect. while drag n drop some dimensions and measures then going for Refesh or Run Query, geting this error.
    The same query is working fine with other comp like webi n crystal.
    Anybody having solution for this please let me know. I am stuck somewhere.
    Thank You

    Hi,
    Check the data in the infoProvider.Reduce the  Bex query Characteristics & Key figure fields.Try to identify due to which characteristsic adding in Bex Query ,are you facing the issue.Check that characteristic data in the infoProvider.
    Regards,
    Venkat

  • Error while moving objects from BMM to Presentation layer: 46036

    Hi,
    I created some aggregate logical columns in a logical fact table in BMM .
    Next, I created a branch to already existing Dimensional hierarchy and used those aggregate columns in the branch hierarchy.
    The Original Hierarchy was using columns from 2 Physical Dimensional tables.
    While checked for global consistency , got the following error:
    46036] Internal Assertion: Condition i + 1 < numKeys, file .\Src\SQLogicalRqtGenerator.cpp, line 645.
    Where am I going wrong ?
    Regards

    Hi,
    check if you presentation folder refers to the correct Business Model in the General Tab of the properties.
    Regards,
    Gianluca

Maybe you are looking for

  • Export video from multiple iOS devices to a Mac without using iTunes

    I am tasked with importing video files from multiple iPads to a single Mac to aggregate for editing. The file sizes on each device are many gigs large. I don't want to use iMovie on the Mac or iOS. I don't want to use iTunes (since there are many iPa

  • Can't play any CD's or burn any either

    I have looked for a similar question to mine but nothing fits exactly so here goes. I have had a problem burning cd's for some time and have turned the burn speed to the slowest. It starts to do the job, stops, spits my cd out which is then unusable

  • Did anyone notice that scroll bar is not working properly in Dictionary.app?

    after upgrading to Mountain Lion, I noticed that for dictionary.app 1) space/shift+space cannot be used to scroll the page 2) when I use arrow keys to do so, they are the opposite in direction to whatever works in other apps does this happen to other

  • Retention in Purchase Order

    Hi expert, I want to know retention in Purchase Order. Please tell me. Thanks,

  • 3.1 WAS Clustering

    We are upgrading to 3.1 and are evaluating our architecture.  We have hardware F5 load balancer and two webshpere application servers.  Obviously our goal is two have seemless failover in the web tier, should a WAS go down.  The load balancer is set