Save position awesome
halo, i'm using awesome3 and i'm searching if there's the possibility to save the window's position with the floating layout, do you know anything anout this? thanks
I don't think Awesome can remember precise placement on a per-app basis. You can use a session manager, plus the "rules" section of rc.lua to assign apps to specific tags and assign default layouts to each tag. You'll still need to rearrange individual clients, but it'll take some of the tedium out of it. I'd be willing to bet you could write some lua scripts to get more precise placement, but probably not to remember exactly where each client was on reboot.
Similar Messages
-
JScrollPane : save positions
I am working on file browser. I have a table in JScrollPane. I want to save position of JScrollPane vertical bar when I select a folder. I realized a class that save value when I select a folder. When I move up it loads these values and sets these properties back. But I have a problem. If I move from a folder with big number of files (maximum is big) to a folder with a few files all works fine.
JScrollPane s =...
s.getVerticalScrollBar().setValue (400);
assert s.getVerticalScrollBar().getValue() == 400;
But if I move from a folder with a few files (maximum is small) t oa folder with a lot of files it doesn't work.
JScrollPane s =...
s.getVerticalScrollBar().setValue (400);
assert s.getVerticalScrollBar().getValue() != 400; //s.getVerticalScrollBar().getValue() == 152 for example
What should I do?Try something like this:
SELECT substring(I.ItemCode+'XXXXXXXXXXXXXXXXXXXXX',1,18) from OITM I -
Library gone, ipod freezes with sync, and won't save positions in videos
Wow. Three major issues with iTunes/my iPod in three days. Have I set some kind of a record here?
Well, first off... I went to charge my iPod with the usb cable as I always do. iTunes is configured to pop up and sync with the ipod each time it sees that the device is connected. All seemed well, until I saw a message telling me the library on my computer did not match the one on my iPod. Basically asked me if I wanted to wipe out the music/video collection on the iPod and replace it with, well, NOTHING which is what appears to be in my iTunes library right now. That's right, my library is all gone. No big deal, right? Just point iTunes back to my media folders! Not cool. I've pruned SO MANY horrible songs within itunes without deleting the actual song files. my iPod will be getting at least 250+ songs I do NOT want to bring to work, or on my commute. I don't have my library backed up. Why would I? This should not happen. I did nothing to cause it, there's no "iTunes virus" which wipes our your library, is there?
Next problem... This morning when I gave my iPod a quick charge before work... Hold switch on "hold," iTunes hadn't popped up during the 30 mins I left it in.. Guess what? The iPod is frozen. Reset it. This'll be the third or fourth time this has happened to me.
Lastly, I've noticed that the iPod simply WILL NOT save the position I was at before shutting down the iPod after a viewing "session." No, that's not true. It will revert to some random spot in the video I was watching, perhaps the first "bookmark" I'd made, the first time I'd quit in the middle of a video. Every time after that it won't continue where I'd left off, but rather at that first spot in the video. This isn't a problem for ALL of my videos, just some.
And a fourth bonus problem:: When am I going to be able to categorize my non-purchased videos properly? I complained about this like 2 months ago and iTunes still hasn't been "fixed." I'm limited to keeping non-purchased videos under "music videos" which is just stupid.
Homemade Windows XP ProFirst off, you have to search the system for your purchased songs. There usually in the My Music/iTunes/iTUnes Music/(Artist name)/(Album Name)
If you can not find them there then search the system by going to start button>Search and type in the search m4p for audio and m4v for video. more on this here http://docs.info.apple.com/article.html?artnum=301749
Its true apple doesn't offer redownloads BUT alot of people including me, have had success in emailing the music store, telling them what has happened, and getting an offer to "Redownload" all the songs paid for
Far as the malware goes, you have some type of malware on the system, if you didn't ewido wouldn't of sent off an alarm with a sound and you wouldn't have been removeing things with it. malware comes in many forms, sometimes installed by that "Free" program you get off the net, sometimes installed in the background when you goto a certain site. In some cases simply rolling the mouse pointer over an ad on a web page (Which is easy to do when its beside the scroll bar to the right) will have it install. I have 3 different adware scanners and still get one or 2 that gets thru now and then -
[iOS][Playlists] Save Position when you are offline
Hello, I am using the Spotify App on my iPhone 4s. With the newest IOS Update my Phone can use only a smal main memory for other Apps. So the Problem is that the IOS automatily closes Apps which are not used in a while. That means, when I am using my Spotify-App offline and then have to study, the App has to reload when I want to use it again. The actually Position is then lost and I have to "re-shuffel" my Playlist. The thing is, that I am hearing then the same music I already heared again. Is there a possibility to save the position an maybe the already played songs from the Playlist? Maybe you can also add the funktion how often you played the song already, so you can improve the shuffle option to play the rarely-played songs. I hope you can use this Idea on your next Update, and i am sorry for the bad English! Rugata
Updated: 2015-07-13Hello and thanks for the feedback!
Any news regarding this request will be announced in the original idea topic here:
https://community.spotify.com/t5/Live-Ideas/quot-Smart-quot-shuffle-function/idi-p/806817
Please add your kudos and comments there, if you haven't already. ;) -
Save position of right hand as "home"-position
When the Kinect has tracked my right hand (JointType.HandRight), I want it to save the current position of the hand as a "home"-position which later can be referred to when for example my right hand moves to the right from the "home"-position.
I'm a novice in programming and would highly appreciate code for show and an explanation (and note if there's anything in the existing code that's wrong or missing)! Thanks!
// Find the right hand joint
IList<Microsoft.Kinect.Body> bodies;
void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
var reference = e.FrameReference.AcquireFrame();
using (var frame = reference.BodyFrameReference.AcquireFrame())
if (frame != null)
bodies = new Microsoft.Kinect.Body[frame.BodyFrameSource.BodyCount];
frame.GetAndRefreshBodyData(bodies);
foreach (var body in bodies)
if (body != null)
if (body.IsTracked)
// Find the joint
Joint handRight = body.Joints[Microsoft.Kinect.JointType.HandRight];
// Around here maybe having the code which saves the current position as "home"I could make an IF code line where if I close my hand, the kinect will respond to that action as saving that position as "home" and while I have my hand closed the robot will respond when I move my hand from that positioned home. How do I perform
what you said in the following: "Then you could compute for each body frame, what is the position vector from the home point and make your robot move depending on than vector"? I suppose you'r talking about making the work space in x, y, z work as
the robot will perform the same movement as my hand? I'm right now a little of a novice in programming as I've gotten a little rusty while I haven't programmed that much during the years. I've checked the Kinect v2 documentation but I don't know what information
nor code I could use.
I have watched the jump start videos and they gave me a better understanding in the kinect but didn'tfeel that
they were helpful for the coding and
for my specific work, but I could be wrong.
Once again I've haven't got a good understanding of the differences yet so if you say body frame is enough
you'r probably right, could you tell me the differences?
And do I change
thus only the multisource for the body frame in the code?
Thank you for the help and sorry for my late response! -
HELP!!! save position of the components!!!
Hi!
I have a JLayeredPane where I insert some images. I move this images. BUT when I press a button (that invoke a ActionListener) all the images return at initial position!!!
THE PROGRAM:
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import javax.swing.text.*; //per StyledDocument
import javax.swing.BorderFactory;
import javax.imageio.*;
public class mio implements ActionListener,MouseMotionListener,MouseListener{
JTextArea statusInfo; //info da passare a PROGRAMMA TODO
JTextArea PASpar; // PARAMETRI X TODO
JTextArea PASimage; //IMMAGINI X TODO
Color whitex = new Color(255,255,255);
Color bluex = new Color(100,105,170);
Color bluexx = new Color(100,150,170);
Color redx = new Color(255,0,0);
JFrame frame; //contiene tutto
JFrame frameP;
JMenuBar menu;
JMenu fileMenu;
JMenuItem nuovo;
JMenuItem apriimgf;
JMenuItem aprimosf;
JMenuItem salva;
JMenuItem stampa;
JMenuItem esci;
JMenu modMenu;
JMenuItem annulla;
JMenu helpMenu;
JMenuItem help;
JPanel panel; //contiene oggetti entro menu
JPanel panel2;
JPanel panel3; //xbottoni
JLayeredPane pane;
JTextArea spiega;
JTextArea dico2;
JLayeredPane panelpane; //dove carico img
JButton apriimg;
JButton chiudi;
JButton aprimos;
JButton ok;
JButton mosaica;
JButton superR;
JButton salvab;
JButton migliora;
JButton nuovob;
int _dragFromX = 0; // pressed this far inside ball's
int _dragFromY = 0;
boolean _canDrag = false;
int i;
int px;
int py;
int mousex;
int mousey;
int rifno;//x img d riferimento
int scelta; //1 = immagini 2=mosaico
int Nimg; // NUMERO IMG KE INSERISCO <= 12
JLabel image;
ImageIcon icon;
int ximg, yimg; //posizione img in panel
int xgrid,ygrid; //griglia panel
int[] ximgs,yimgs; //x,y img
JLabel[] images;
int hicon,wicon; //h w img
int[] wimgs,himgs;
int muovi; //img da muovere nell'array
public final static int ONE_SECOND = 500; ////
private JProgressBar progressBar;
private javax.swing.Timer timer;
private JButton startButton;
private LongTask task;
private JTextArea taskOutput;
static private String newline = "\n";
// =================== MAIN
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
mio m = new mio();
/*public static void main(String argv[]){
mio m = new mio();
// ================ COSTRUTTORE
public mio(){
rifno = 0;//no img d rif
Nimg = 0;
frame = new JFrame("interfaccia");
PASpar = new JTextArea();
PASimage = new JTextArea();
menu = new JMenuBar();
menu.setOpaque(true);
menu.setBackground(bluex);
// ********* Menu file *********
fileMenu = new JMenu("File");
fileMenu.setMnemonic(KeyEvent.VK_F);
nuovo = new JMenuItem("Nuovo");
nuovo.setMnemonic(KeyEvent.VK_N);
apriimgf = new JMenuItem("Apri immagini");
apriimgf.setAccelerator(KeyStroke.getKeyStroke(
KeyEvent.VK_1, ActionEvent.ALT_MASK)); //alt+1
aprimosf = new JMenuItem("Apri mosaico");
salva = new JMenuItem("Salva");
salva.setMnemonic(KeyEvent.VK_S);
esci = new JMenuItem("Esci");
esci.setMnemonic(KeyEvent.VK_E);
//********* Menu Modifica ***********
modMenu = new JMenu("Modifica");
modMenu.setMnemonic(KeyEvent.VK_M);
annulla = new JMenuItem("Annulla");
annulla.setMnemonic(KeyEvent.VK_A);
// ********* Help Menu *************
helpMenu = new JMenu("HELP");
help = new JMenuItem("Help");
menu.add(fileMenu);
fileMenu.add(nuovo);
fileMenu.add(apriimgf);
fileMenu.add(aprimosf);
fileMenu.add(salva);
fileMenu.addSeparator();
fileMenu.addSeparator();
fileMenu.add(esci);
menu.add(modMenu);
modMenu.add(annulla);
menu.add(helpMenu);
helpMenu.add(help);
// ActionListener x ogni voce d menu
nuovo.addActionListener(this);
apriimgf.addActionListener(this);
aprimosf.addActionListener(this);
salva.addActionListener(this);
esci.addActionListener(this);
annulla.addActionListener(this);
help.addActionListener(this);
frame.setJMenuBar(menu);//in frame menu
panel=new JPanel(new BorderLayout(2,2));
frame.getContentPane().add(panel);
spiega = new JTextArea(" 1. Aprire TUTTE le immagini da mosaicare"+ newline +" Oppure il mosaico da migliorare"+newline,3,40);
spiega.setEditable(false);
spiega.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
spiega.setBackground(bluex);
panelpane = new JLayeredPane();
panelpane.setPreferredSize(new Dimension(900,550));
panelpane.setBackground(whitex);
panelpane.setLayout(new GridLayout(0,4)); //max 12 img e occupano tutto subito
panelpane.setBorder(BorderFactory.createLineBorder(Color.black));
panelpane.addMouseListener(this);
panelpane.addMouseMotionListener(this);
xgrid = 225;
ygrid =183;
ximg = 0;
yimg = 0;
images = new JLabel[12];//immagini
ximgs = new int[12];
yimgs = new int[12];
wimgs = new int[12];
himgs = new int[12];
panel3= new JPanel();
panel3.setBackground(bluex);
panel3.setLayout(new BoxLayout(panel3, BoxLayout.Y_AXIS));
panel3.setBorder(BorderFactory.createLineBorder(Color.black));
chiudi = new JButton("Chiudi applicazione");
chiudi.addActionListener(this);
chiudi.setBackground(bluex);
// ******* 1 FRAME
apriimg = new JButton("Apri immagine");
apriimg.addActionListener(this);
apriimg.setBackground(bluex);
aprimos = new JButton("Apri mosaico");
aprimos.addActionListener(this);
aprimos.setBackground(bluex);
ok = new JButton("Prosegui");
ok.addActionListener(this);
ok.setBackground(bluex);
ok.setEnabled(false); //disabilito
//****** 2 frame
mosaica = new JButton(" Mosaica ");
mosaica.addActionListener(this);
mosaica.setBackground(bluex);
mosaica.setVisible(false);
superR = new JButton("Super-Risoluzione");
superR.addActionListener(this);
superR.setBackground(bluex);
superR.setVisible(false);
// ********* 3 frame
salvab = new JButton(" Salva mosaico ");
salvab.addActionListener(this);
salvab.setBackground(bluex);
salvab.setVisible(false);
migliora = new JButton(" Migliora mosaico ");
migliora.addActionListener(this);
migliora.setBackground(bluex);
migliora.setVisible(false);
nuovob = new JButton(" Nuovo progetto ");
nuovob.addActionListener(this);
nuovob.setBackground(bluex);
nuovob.setVisible(false);
statusInfo = new JTextArea(3,40);
statusInfo.setBorder(BorderFactory.createLineBorder(Color.black));
statusInfo.setBackground(bluex);
JScrollPane scrollArea = new JScrollPane(statusInfo);
panel.add((spiega), BorderLayout.NORTH);
panel.add((panelpane), BorderLayout.CENTER);
panel.add((panel3), BorderLayout.EAST);
panel.add((scrollArea), BorderLayout.SOUTH);
panel3.add(apriimg);
panel3.add(salvab);//3 frame
panel3.add(new JSeparator(JSeparator.HORIZONTAL));
panel3.add(aprimos);
panel3.add(mosaica); // 2 frame
panel3.add(migliora);
panel3.add(new JSeparator(JSeparator.HORIZONTAL));
panel3.add(ok);
panel3.add(superR); // 2 frame
panel3.add(nuovob); // 3 frame
panel3.add(new JSeparator(JSeparator.HORIZONTAL));
panel3.add(chiudi);
frame.pack();
frame.setVisible(true);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}// chiude costruttore
// ================ metti mosaico
public void mettiMosaico(){
panelpane.removeAll();
ImageIcon img1 = new ImageIcon("mosaico.jpg");
Image imgesize1 = resize2Icon("mosaico.jpg"); // resize
img1 = new ImageIcon(imgesize1);
JLabel image1 = new JLabel(img1);
image1.setLocation(200,10);
panelpane.add(image1);
panelpane.repaint();
// ================= RESIZE MOSAICO
public Image resize2Icon(String image){
Image img;
Image inImage = new ImageIcon(image).getImage();
int maxDim = 500;
double scale = (double) maxDim / (double) inImage.getHeight(null);
if (inImage.getWidth(null) > inImage.getHeight(null))
scale = (double) maxDim / (double) inImage.getWidth(null);
// Determine size of new image.
//One of them
// should equal maxDim.
int scaledW = (int) (scale * inImage.getWidth(null));
int scaledH = (int) (scale * inImage.getHeight(null));
System.out.println(">> "
+ inImage.getSource().getClass()
+ " aspect ratio = "
+ scaledW + " , " + scaledH);
img = inImage.getScaledInstance(scaledW , scaledH, Image.SCALE_SMOOTH);
return img;
// ================= RESIZE IMAGES
public Image resizeIcon(String image){
Image img;
Image inImage = new ImageIcon(image).getImage();
int maxDim = 180;
double scale = (double) maxDim / (double) inImage.getHeight(null);
if (inImage.getWidth(null) > inImage.getHeight(null))
scale = (double) maxDim / (double) inImage.getWidth(null);
// Determine size of new image.
//One of them
// should equal maxDim.
int scaledW = (int) (scale * inImage.getWidth(null));
int scaledH = (int) (scale * inImage.getHeight(null));
System.out.println(">> "
+ inImage.getSource().getClass()
+ " aspect ratio = "
+ scaledW + " , " + scaledH);
img = inImage.getScaledInstance(scaledW , scaledH, Image.SCALE_SMOOTH);
return img;
// ================== img RIFERIMENTO
public void imgRif(){
frameP.setVisible(false);//tolgo frame
rifno=1;
spiega.setText (" Con il mouse indicare l'immagine di riferimento"+newline);
}//fine imgRif
// ================== BARRA PROGRESS
public void barraP(){
final JFrame framePb = new JFrame("ELABORAZIONE in corso");
framePb.setSize(300,1000);
framePb.setBackground(bluex);
statusInfo.append(" Elaborazione in corso... "+newline);
JPanel panelPb=new JPanel(new BorderLayout());
panelPb.setBackground(bluex);
panelPb.setBorder(BorderFactory.createLineBorder(Color.black));
panelPb.setPreferredSize(new Dimension(300,100));
framePb.getContentPane().add(panelPb);
task = new LongTask();
progressBar = new JProgressBar(0, task.getLengthOfTask());
progressBar.setValue(0);
progressBar.setStringPainted(true);
panelPb.add(progressBar);
//Create a timer.
timer = new javax.swing.Timer(ONE_SECOND, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
progressBar.setValue(task.getCurrent());
String s = task.getMessage();
if (task.isDone()) {
Toolkit.getDefaultToolkit().beep();
timer.stop();
statusInfo.append(" Eseguita elaborazione "+newline);
spiega.setText (" 4. Migliora, Salva, Nuovo progetto o Esci"+newline);
superR.setVisible(false);
mosaica.setVisible(false);
salvab.setVisible(true);
migliora.setVisible(true);
nuovob.setVisible(true);
framePb.setVisible(false);
framePb.setCursor(null); //turn off the wait cursor
progressBar.setValue(progressBar.getMinimum());
//panelpane.removeAll();
//inserisco mosaico creato
framePb.pack();
framePb.setVisible(true);
framePb.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
task.go();
timer.start();
framePb.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
// ===================================================================================== EVENTI
public void actionPerformed(ActionEvent e) {
Object source = e.getSource(); //chi ha invocato evento
// ====================================================================================== NUOVO
if((source == nuovo)||(source == nuovob)){
System.out.println("Nuovo");
mio m = new mio();
// ====================================================================================== HELP
if(source == help){
System.out.println("Help");
final JFrame framePh = new JFrame(" - H E L P - ");
framePh.setSize(300,1000);
JTextArea help=new JTextArea(" Help per utente! "+newline,5,40);
help.setEditable(false);
help.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
//help.setBackground(bluex);
JButton escih = new JButton(" Esci ");
escih.setBackground(bluex);
escih.addActionListener(new ActionListener(){ //quando premo esci
public void actionPerformed(ActionEvent e){
framePh.setVisible(false); // SQUALLIDO! esci meglio!
framePh.getContentPane().add(help);
framePh.pack();
framePh.setVisible(true);
// ======================================================================================== APRI
if((source == apriimgf) || (source == apriimg)){ //apri + img
System.out.println("Apri");
scelta=1; //immagini
Image imgresize;
JFileChooser fileChooser = new JFileChooser();
fileChooser.addChoosableFileFilter(new ImageFilter());//filtro
fileChooser.setAcceptAllFileFilterUsed(false);
fileChooser.setAccessory(new ImagePreview(fileChooser));//anteprima
fileChooser.setCurrentDirectory(new File("."));
fileChooser.setMultiSelectionEnabled(true);
int status = fileChooser.showOpenDialog(null);
if (status == JFileChooser.APPROVE_OPTION) {
File selectedFiles[] = fileChooser.getSelectedFiles();
if (selectedFiles.length>12){
System.out.println("selezionati piu' di 12 img");
return;
if (Nimg>12){
System.out.println("Ho piu' di 12 img");
return;
//int imgora = Nimg + selectedFiles.length; //immagini totali caricate fin'ora
int imgPrima = Nimg; //img prima di inserire le selezionate
int imgIns = selectedFiles.length; //immagini inserite ora.
for (int im=0,n=selectedFiles.length; im<n; im++) {
icon = new ImageIcon(selectedFiles[im].getAbsolutePath());
statusInfo.append(" Inserito: " + selectedFiles[im].getName() + newline);
int hicon = icon.getIconHeight();
int wicon = icon.getIconWidth();
if ((hicon>183)||(wicon>225)){
imgresize = resizeIcon(selectedFiles[im].getAbsolutePath()); // resize
icon = new ImageIcon(imgresize);
if (ximg>675){
if (yimg>366){
System.out.println(" TROPPE IMG!!! ");
else{
ximg=0;
yimg=yimg+ygrid;
image = new JLabel(icon);
image.setBounds(ximg,yimg,hicon,wicon);
//aggiorno dati IMMAGINI
yimgs[im+imgPrima]=yimg;
ximgs[im+imgPrima]=ximg;
images[im+imgPrima] = image;
himgs[im+imgPrima] = hicon;
wimgs[im+imgPrima] = wicon;
statusInfo.append("");
panelpane.add(images[im+imgPrima], new Integer(0),12-(im+imgPrima)); //ULTIMA SOPRA
//images[im+imgPrima].setLocation(ximgs[im+imgPrima],yimgs[im+imgPrima]);
ximg = ximg + xgrid;
Nimg=Nimg+1; //n img totale
ok.setEnabled(true); //abilito
aprimos.setEnabled(false); //abilito
spiega.setText (" 2.Con il mouse spostare le immagini creando un 'mosaico'"+newline);
// ============================================================================= apri mosaico
if((source == aprimos)||(source == aprimosf)){
System.out.println("Apri mosaico");
scelta=2; //mosaico
JFileChooser fileChooser = new JFileChooser();
fileChooser.addChoosableFileFilter(new ImageFilter());//filtro
fileChooser.setAcceptAllFileFilterUsed(false);
fileChooser.setAccessory(new ImagePreview(fileChooser));//anteprima
fileChooser.setCurrentDirectory(new File("."));
fileChooser.setMultiSelectionEnabled(false);
int status = fileChooser.showOpenDialog(null);
if (status == JFileChooser.APPROVE_OPTION) {
File selectedFile = fileChooser.getSelectedFile();
icon = new ImageIcon(selectedFile.getAbsolutePath());
int hicon = icon.getIconHeight();
int wicon = icon.getIconWidth();
image = new JLabel(icon);
image.setBounds(ximg,yimg,hicon,wicon);
statusInfo.append("");
panelpane.add(image,new Integer(1),1);//dopo sopra
ok.setEnabled(true); //abilito
apriimg.setEnabled(false); //abilito
aprimos.setEnabled(false); //abilito
spiega.setText (" 2. Proseguire"+newline);
// =============================================================================== SALVA
if(source == salva){
System.out.println("Salva");
try {
FileOutputStream fos = new FileOutputStream ("info.doc"); //doc.ser
ObjectOutputStream oos = new ObjectOutputStream (fos);
String infoo = statusInfo.getText(); // NON E' GIUSTO!!!
oos.writeObject(infoo);
oos.flush();
oos.close();
statusInfo.append(" Salvato il progetto in: info.doc"+newline);
} catch (IOException e1) {
statusInfo.setText (" Unable to save");
e1.printStackTrace(); //scrivo eccezione
// =============================================================================== PROSEGUI
if(source == ok){
System.out.println("Prosegui");
apriimg.setVisible(false);
aprimos.setVisible(false);
ok.setVisible(false);
mosaica.setVisible(true);
panelpane.removeMouseMotionListener(this);
if (scelta==1){
superR.setVisible(true);
panelpane.revalidate ();
spiega.setText (" 3. Scegliere Mosaicatura o Super-Risoluzione"+newline);
}else{
panelpane.revalidate ();
spiega.setText (" 3. Eseguire Mosaicatura"+newline);
// ================================================================================= ESCI
if((source == esci)||(source==chiudi)){
System.out.println("Esci");
System.exit(0);
// =================================================================================== ANNULLA
if(source == annulla){
System.out.println("Annulla");
// ======================================================================================== MOSAICA
if(source == mosaica){
System.out.println("Mosaica");
frameP = new JFrame("Parametri di Mosaicatura");
frameP.setSize(800,800);
frameP.setBackground(bluex);
JPanel panelP=new JPanel(new GridLayout(1,0));
panelP.setBackground(bluex);
panelP.setBorder(BorderFactory.createLineBorder(Color.black));
panelP.setPreferredSize(new Dimension(500,500));
frameP.getContentPane().add(panelP);
JPanel panelP0 = new JPanel(new FlowLayout()); //avvia
panelP0.setBackground(bluex);
panelP0.setBorder(BorderFactory.createLineBorder(Color.black));
panelP.add(panelP0);
JPanel panelP1 = new JPanel(new FlowLayout());//parametri
panelP1.setBackground(bluex);
//panelP1.setLayout(new BoxLayout(panelP1, BoxLayout.Y_AXIS));
panelP1.setBorder(BorderFactory.createLineBorder(Color.black));
panelP.add(panelP1);
JPanel panelP2=new JPanel(new FlowLayout());
panelP2.setBackground(bluex);
panelP2.setBorder(BorderFactory.createLineBorder(Color.black));
panelP.add(panelP2);
//**************** panel 1 : PARAMETRI
JTextArea dico3 = new JTextArea(" Parametri di miscelazione",10,40);
dico3.setEditable(false);
dico3.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
JRadioButton primo = new JRadioButton("First frame");
primo.setActionCommand("first");
primo.setSelected(true);
primo.setBackground(bluex);
JRadioButton secondo = new JRadioButton("Last frame");
secondo.setActionCommand("last");
secondo.setBackground(bluex);
JRadioButton terzo = new JRadioButton("Average");
terzo.setActionCommand("average");
terzo.setBackground(bluex);
JRadioButton quarto = new JRadioButton("Median");
quarto.setActionCommand("median");
quarto.setBackground(bluex);
JRadioButton quinto = new JRadioButton("Feathering");
quinto.setActionCommand("feathering");
quinto.setBackground(bluex);
final ButtonGroup group = new ButtonGroup(); //raggruppo x fare esclusione
group.add(primo);
group.add(secondo);
group.add(terzo);
group.add(quarto);
group.add(quinto);
// ******** panel 0 : avvia
JTextArea dico = new JTextArea(" Se si vuole avviare la mosaicatura premere 'Avvia'" newline" in tal caso se non sono stati settati parametri verranno utilizzati quelli di default",10,40);
dico.setEditable(false);
dico.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
JButton ok1 = new JButton("Avvia");
ok1.setBackground(bluex);
ok1.addActionListener(new ActionListener(){ //quando premo ok ...
public void actionPerformed(ActionEvent e){
String command = group.getSelection().getActionCommand();
statusInfo.append(" Parametri di mosaicatura, miscelazione: "+command + newline);
frameP.setVisible(false); // SQUALLIDO! esci meglio!
barraP();
mettiMosaico();
// ******** panel 2 : IMG RIFERIMENTO
dico2 = new JTextArea(" Per impostare l'immagine di riferimento" newline " premere 'Imposta' e selezionare l'immagine "+newline,10,40);
dico2.setEditable(false);
dico2.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
JButton imposta = new JButton("Imposta");
imposta.setBackground(bluex);
imposta.addActionListener(new ActionListener(){ //quando premo ok ...
public void actionPerformed(ActionEvent e){
String command = group.getSelection().getActionCommand();
imgRif();
panelP1.add(dico3);
panelP1.add(primo);
panelP1.add(secondo);
panelP1.add(terzo);
panelP1.add(quarto);
panelP1.add(quinto);
panelP0.add(dico);
panelP0.add(ok1);
panelP2.add(dico2);
panelP2.add(imposta);
primo.addActionListener(this);
secondo.addActionListener(this);
JTabbedPane tabbedPane = new JTabbedPane(); //a schedario
tabbedPane.setBackground(bluex);
tabbedPane.addTab("Avvia Mosaicatura", null, panelP0, null);
tabbedPane.addTab("Parametri", null, panelP1, null);
tabbedPane.addTab("Img Riferimento", null, panelP2, null);
tabbedPane.setSelectedIndex(0);
panelP.add(tabbedPane);
frameP.pack();
frameP.setVisible(true);
// ========================================================================== super risoluzione
if(source == superR){
System.out.println("Super-risoluzione");
final JFrame frameP = new JFrame("Parametri di Super-risoluzione");
frameP.setSize(800,800);
frameP.setBackground(bluex);
JPanel panelP = new JPanel(new GridLayout(1,0));
panelP.setBackground(bluex);
panelP.setBorder(BorderFactory.createLineBorder(Color.black));
panelP.setPreferredSize(new Dimension(500,500));
frameP.getContentPane().add(panelP);
JPanel panelP0 = new JPanel(new FlowLayout()); //avvia
panelP0.setBackground(bluex);
panelP0.setBorder(BorderFactory.createLineBorder(Color.black));
panelP.add(panelP0);
JPanel panelP1 = new JPanel(new FlowLayout());//parametri
panelP1.setBackground(bluex);
panelP1.setBorder(BorderFactory.createLineBorder(Color.black));
panelP.add(panelP1);
//**************** panel 1 : PARAMETRI
JTextArea dico3 = new JTextArea(" Parametri di super-risoluzione",10,40);
dico3.setEditable(false);
dico3.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
JRadioButton primo = new JRadioButton("Nearest");
primo.setActionCommand("nearest");
primo.setSelected(true);
primo.setBackground(bluex);
JRadioButton secondo = new JRadioButton("Weighted");
secondo.setActionCommand("weighted");
secondo.setBackground(bluex);
final ButtonGroup group = new ButtonGroup(); //raggruppo x fare esclusione
group.add(primo);
group.add(secondo);
// ******** panel 0 : avvia
JTextArea dico = new JTextArea(" Se si vuole avviare la super-risoluzione premere 'Avvia'" newline" in tal caso se non sono stati settati parametri verranno utilizzati quelli di default",10,40);
dico.setEditable(false);
dico.setBorder(BorderFactory.createLineBorder(Color.black));//bordo
JButton ok1 = new JButton("Avvia");
ok1.setBackground(bluex);
ok1.addActionListener(new ActionListener(){ //quando premo ok ...
public void actionPerformed(ActionEvent e){
String command = group.getSelection().getActionCommand();
statusInfo.append(" Parametri super-risoluzione: "+command + newline);
frameP.setVisible(false); // SQUALLIDO! esci meglio!
barraP();
panelP1.add(dico3);
panelP1.add(primo);
panelP1.add(secondo);
panelP0.add(dico);
panelP0.add(ok1);
primo.addActionListener(this);
secondo.addActionListener(this);
JTabbedPane tabbedPane = new JTabbedPane(); //a schedario
tabbedPane.setBackground(bluex);
tabbedPane.addTab(" Avvia super-risoluzione", null, panelP0, null);
tabbedPane.addTab(" Parametri", null, panelP1, null);
tabbedPane.setSelectedIndex(0);
panelP.add(tabbedPane);
frameP.pack();
frameP.setVisible(true);
mettiMosaico();
// ===================================================== Mouse Event
public void mousePressed(MouseEvent e) {
mousex = e.getX(); // Save the x coord of the click
mousey = e.getY(); // Save the y coord of the click
for (int m=0; m<Nimg; m++){
Point p = images[m].getLocation(); //posizione img[m] in panel
px = (int)p.getX();
py = (int)p.getY();
if (mousex >= px && mousex <= (px+images[muovi].getWidth())
&& mousey >= py && mousey <= (py+images[muovi].getHeight())) {//se mouse dentro img
_canDrag = true;
_dragFromX = mousex-px; // how far from left
_dragFromY = mousey-py; // how far from top
muovi = m; //setto immagine da muovere!!!!
if (rifno==0){panelpane.moveToFront(images[muovi]);}//davanti img ke muovo
//se =1 nn mi muove img
}//chiudo FOR
if (rifno==1){
statusInfo.append(" Immagine di riferimento: "+ muovi + newline);
frameP.setVisible(true);
dico2.append(" Immagine di riferimento impostata :"+muovi + newline);
rifno=0;
public void mouseDragged(MouseEvent e) {
if (_canDrag) { // True only if button was pressed inside ball.
//--- Ball pos from mouse and original click displacement
int ballX = e.getX() - dragFromX;
int ballY = e.getY() - dragFromY;
images[muovi].setLocation(_ballX,_ballY);
//--- Don't move the ball off the screen sides
ballX = Math.max(ballX, 0);
ballX = Math.min(ballX, panelpane.getWidth() - images[muovi].getWidth());
//--- Don't move the ball off top or bottom
ballY = Math.max(ballY, 0);
ballY = Math.min(ballY, panelpane.getHeight() - images[muovi].getHeight());
Point p = images[muovi].getLocationOnScreen();
int px = (int)p.getX();
int py = (int)p.getY();
//panelpane.repaint(); // Repaint because position changed.
public void mouseExited(MouseEvent e) {
_canDrag = false;
}//end mouseExited
public void mouseEntered (MouseEvent e) {} // ignore these events
public void mouseClicked (MouseEvent e) {
public void mouseReleased(MouseEvent e) {
//e.consume();
} // ignore these events
public void mouseMoved(MouseEvent e) {}
}// chiude classeplease reuse the threads you've already started on this topic
http://forum.java.sun.com/thread.jspa?threadID=573384&tstart=50
and also, use the [url http://forum.java.sun.com/help.jspa?sec=formatting]formatting tags when posting code.
keep in mind, this is an awful lot of code, and few will have the time to read through all of it, so if at all possible, make a smaller example case for your problem when you can so that we don't have to try to sort through hundreds of lines of code to find what you want to do. -
SAVE POSITIONS OF THE COMPONENTS!!! HELP!!!
HI!!!
I don't understand!!!
I insert images in JLayeredPane, I move this images, BUT when i press a button (invoke ActioListener) the images become in initial position!!!
HELP ME!!!!!!!Don't clutter the forum by posting the [url
http://forum.java.sun.com/thread.jspa?threadID=573772]
same question three times.Why did you change your userid from this [url
http://forum.java.sun.com/thread.jspa?threadID=573384]
posting. If you are not the same person then
you are both working on the same assignment and
should get together to solve your problem.
When I replied to the above posting I tried to
explain what the problem was. If you didn't
understand the explanation they ask a follow up
question. Creating a new posting does not allow for
continuity of the problem. New people reading this
posting don't know what has already been suggested.
Maybe myself or someone else will explain it better.
I also asked you to:
a) post a "small" example showing your problem. 200
lines of code is not small.
b) use the code tags when posting code. You couldn't
even manage to do that.
Have you read the code from the Swing tutorial on
[url
http://java.sun.com/docs/books/tutorial/uiswing/compon
ents/layeredpane.html]Using Layered Panes for
an example of this type of behaviour?
A bit off topic but I have to say I truly admire your patience. -
Back button in Photoshop's CS4 and CS5 Save as dialog is grayed
Whenever I open several photos and save them after job is done I have to manually locate save folder. Photoshop always opens default folder where picture is originally located, and doesn't offer back button where I saved last photo.
This is very frustrating, because when I open several photos from different locations I want to save them on same new location. Back button is always greyed, and recent places often doesn't serve the purpose because sometimes all subdirectories have the same filename-PHOTOS, so in recent places I have 5 places with same name.
I have this problem since CS4. This was major problem for me and I sticked to CS3. I thought it was 10.5.x problem. Later I upgraded to CS5, but problem remained. I uninstall it, upgrade to 10.6.3 SL, and reinstall CS5 but still no changes. I would really like to uninstal CS3, but cant afford to loose this functionality.
Anyone had the same problem? I tried to google it, but couldn't find anything.
Thnx
My specs (but probably doesn't matter)
Imac 2.8 Core 2 duo
4Gb RAM
10.6.3 SL
CS5 extended, v 12.0Thanks, almost perfect!
Well basically it does change things, but this is still not functionality as in CS3. Back button is still gray, and save as opens last save position. It does help, because I don't have to scrub trough recent places, but in CS3 I could go back as far as I want. Like in web browsing, back is meant to be for getting back. Back, back, back. In fact, only time I can press back button is when I am browsing trough folders searching for new save position. When I press save, back is always gray and totally useless. Is like this to everyone? Did maybe Adobe loose that functionality?
I tried now to compare functionality from both, and CS3 even remembers position from last photo I saved minutes ago in CS5?!
My English is not so good, so I hope I am explaining clearly enough. -
HELP: How can I save page state on UIX page...
I have a fallowing situation:
1. I create UIX application with Wizard based on one ViewObject
2. When I get a page with ViewObject in table style I travers up and down through records and make some updates and create new records
3. But when I go back from update and create pages I always get initial browesing page.
My question is: how can I save state of browsing page when I return to it from update and create or any other page (save position look hide/show mode or anything else)?
I try to use StateManager class but I faild.
Can anybody help me or describe how can I do it on one example?
Thanks!Attila,
Sounds as though you want to remember the interactive state of your pages across requests.
That means you'll need to store the interactive state of your pages in something like the HttpSession that has a lifecycle spanning across multiple requests.
If you make your pages interactive using the HttpSession, then, when you navigate back from another page, they should still be in the state you left them.
The built-in data provider name for the HttpSession in uiXML is ctrl:httpSession. Use this to data bind the interactive attributes of your page, such as the disclosed attribute of HideShow.
In your event handlers, update the HttpSession to make your page interactive.
Be careful to use different keys to store information in the HttpSession for different pages. -
Dear All,
As per my client requirement, position text (Infotype 1000) should be save in a two language, English and Russian with a same validity ,i tried to copy infotype 1000 for the position,and rename object in Russian language,but in this case other record (English Language) is being deleted,i know it can be done through changing time constraint for IT1000,but is it right approach?or is there any way by this we can save position name in two language with same validity.
Thanks in Advance.
Priyankahello,
in PP01 select you position, and Infotype 1000 Object, click the button Edit, change the language field, and save it... this will create a new translation .
to make sure, display again the Infotype object, Goto Display translation
regards
Hadrien -
hello,
i have a problem when i run the following code and enter an element eg AU it displays gold, but when i type AU1 (i.e Au and 1 atom) it displays the follwing message, not recongising either element or atom occurance, im not sure weather the problem is im running 2 hashtables, any ideas, thank you
Output when typing AU1
Welcome to my Chemcial Analzyer
You entered this Chemical: AU1
The chemcial you enter was: null
Occurance: null
import java.util.*;
public class test
/*Chemical Analzyer
Author: Me
Version: 1.0
Date: 05/05/03*/
public static void main(String[]args)
System.out.println();
System.out.println("Welcome to my Chemcial Analzyer");
System.out.println();
// Ask user to enter a Chemical
String FullChem=WinKBInput.readString("Please can you enter the Chemical you wish to be analzeyed");
//Convert string FullChem to upper case
String FullChem2=FullChem.toUpperCase();
//Print full chemcial on the output screen
System.out.println();
System.out.println("You entered this Chemical: "+FullChem2);
System.out.println();
//From string fullchem save position 0 to 2 in the value First
String First=FullChem2.substring(0);
//Hashtable -> storing of objects that have a relationship with a key
int PlaceElements=20;
//Array 1 declares first key
String Keys[]={"AG","AL","C","AU","C","CA","CL","CU","CO","H","HE","HG","K","MG","N","NA","O","PB","S","XE"};
//Array 2 declares place of chemcial
String ChemNames[]={"Silver","Aluminium","Carbon","Gold","Calcuim","Chlorine",
"Copper","Cobolt","Hydrogen","Helium","Mercury","Potassium ","Magnesium ","Nitrogen","Sodium ","Oxygen ","Phosporus ","Lead ","Sulphur","Xenon"};
Hashtable ht;
ht=new Hashtable(PlaceElements*2);
for (int i=0; i<PlaceElements;i++)
ht.put(Keys, new String(ChemNames[i]));
//Outputs the full chemical name
System.out.println("The chemcial you enter was: "+ht.get(First));
System.out.println();
//From string fullchem save position 0 to 2 in the value First
String Second=FullChem2.substring(1);
//Hashtable -> storing of objects that have a relationship with a key
int PlaceElements1=5;
//Array 1 declares first key
String Keys1[]={"1", "2", "3", "4", "5"};
//Array 2 declares place of chemcial
String ChemNames1[]={"Occured Once", "Occured Twice", "Occured 3 Times", "Occured 4 times", "Occured 5 times"};
Hashtable ht1;
ht1=new Hashtable(PlaceElements1*2);
for (int i=0; i<PlaceElements1;i++)
ht1.put(Keys1[i], new String(ChemNames1[i]));
//Outputs the full chemical name
System.out.println("Occurance: "+ht1.get(Second));
System.out.println();I took your original code, formatted it, and made my replacements, and it works! Here it isimport java.util.*;
/*Chemical Analzyer
Author: MeVersion: 1.0
Date: 05/05/03*/
public class Test {
public static void main(String[]args){
System.out.println();System.out.println("Welcome to my Chemcial Analzyer");
System.out.println();
// Ask user to enter a Chemical
//WinKBInput.readString("Please can you enter the Chemical you wish to be analzeyed");
String FullChem="AU1"; // I dont have WinKBInput
//Convert string FullChem to upper caseString
String FullChem2=FullChem.toUpperCase();
//Print full chemcial on the output screen
System.out.println();
System.out.println("You entered this Chemical: "+FullChem2);
System.out.println();
//From string fullchem save position 0 to 2 in the value First
String First=FullChem2.substring(0,2);
//Hashtable -> storing of objects that have a relationship with a key
int PlaceElements=20;
//Array 1 declares first key
String Keys[]={"AG","AL","C","AU","C","CA","CL","CU","CO","H","HE","HG","K","MG","N","NA","O","PB","S","XE"};
//Array 2 declares place of chemcial
String ChemNames[]={"Silver","Aluminium","Carbon","Gold","Calcuim","Chlorine","Copper","Cobolt",
"Hydrogen","Helium","Mercury","Potassium ","Magnesium ","Nitrogen","Sodium ","Oxygen ",
"Phosporus ","Lead ","Sulphur","Xenon"};
Hashtable ht=new Hashtable(PlaceElements*2);
for (int i=0; i<PlaceElements;i++) ht.put(Keys[ i], new String(ChemNames[ i]));
//Outputs the full chemical name
System.out.println("The chemcial you enter was: "+ht.get(First));
System.out.println();
//From string fullchem save position 0 to 2 in the value First
String Second=FullChem2.substring(2,3);
//Hashtable -> storing of objects that have a relationship with a key
int PlaceElements1=5;
//Array 1 declares first key
String Keys1[]={"1", "2", "3", "4", "5"};
//Array 2 declares place of chemcial
String ChemNames1[]={"Occured Once", "Occured Twice", "Occured 3 Times", "Occured 4 times", "Occured 5 times"};
Hashtable ht1=new Hashtable(PlaceElements1*2);
for (int i=0; i<PlaceElements1;i++) ht1.put(Keys1[ i], ChemNames1[ i]);
//Outputs the full chemical name
System.out.println("Occurance: "+ht1.get(Second));
System.out.println();
}You might want to take out the extra curly braces... -
HR Organisational Staffing Change
Dear Expert,
I am new in HR authorizations, I have a request from the business to give the HR Administrators access to:
Display all objects and relationships
Copy and Save, Positions (Object S) Infotype 1000
Copy, Change & Save the Cost Centre (Object K) relationship A011 to the Position - Infotype 1001
Copy and Save the Job (Object C) relationship B007 to the Position - Infotype 1001
Copy and Save the Org Unit (Object O) relationship A003 to the Position - Infotype 1001
They are not allow to Create, Delete or Delimit any objects
This is what i have maintained
in Personnel Planning object PLOG is maintained as follows
Planning Status
1, 2
ISTAT
Object Type
C, K, O, P, S
OTYPE
Plan Version
01
PLVAR
Function Code
AEND, COP, COPY, DISP, LISD, LIST
PPFCODE
Subtype
SUBTYP
The problem is, if I remove function code INSE- create the users are unable to copy the position.
When we do an SU53 the authorisation check shows that function code INSE- create is missing.
Please advise, if there any function code that I can use instead of INSE- create.
Thank you
ThembaniHi Thembani,
There's not much of a factual difference whether people are allowed to only copy or create the following objects:
C Job
K Cost center
O Organizational unit
P Person
S Position
So granting the users INSE authorization does not matter much.
They will in any case be able to create new objects (C,K,O,P,S). The only difference being is how they go about doing so.
Good luck! -
Outlook 2003 and Office 2007/10 Files
Our exec is having problems opening up files created with the Office 2007/10 standard...doesn't matter if it is WORD or EXCEL...and he has the compatibility pack installed to read the files.
When he tries to open a DOCX or XLSX file within an email attachment in Outlook 2003, it says the file cannot be found...if he saves it first and opens it up fro mthe save position, it works. And he can open standard DOC or XLS files within a attachment email.
We have uninstalled and reinstalled the compatability pack / file converter with same results...this is a situation where he just wants it fixed and fast.
Thanks...
BrianHi,
We may follow these steps to modify the registry and change Outlook's attachment security behavior.
========================
Important This section, method, or task contains steps that tell you how to modify the registry. However,
serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs.
1.
Exit Outlook if it is running.
2.
Click
Start, and then click Run. Copy and paste (or type) the following command in the
Open box, and then press ENTER: regedit
3.
Verify that the following registry key for your version of Outlook exists.
Microsoft Office Outlook 2003
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security
If the registry key exists, go to step 5.
If the registry key does not exist, follow these steps to create it:
a.
Locate, and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft
b.
Under
Edit, click New, and then click Key.
c.
Type
Office, and then press ENTER.
d.
Under
Edit, click New, and then click Key.
e.
For Outlook 2003, type
11.0, and then press ENTER.
f.
Under
Edit, click New, and then click Key.
g.
Type
Outlook, and then press ENTER.
h.
Under
Edit, click New, and then click Key.
i.
Type
Security, and then press ENTER.
1.
Under
Edit, click New, and then click String Value.
2.
Copy and paste (or type) the following name for the new value:
Level2Remove
3.
Press ENTER.
4.
Right-click the new string value name, and then click
Modify.
5.
Type the file name extension of the file type that you want to open in Outlook. For example:
.docx
To specify multiple file types, use the following format:
.docx;.xlsx
6.
Click
OK.
7.
Exit Registry Editor.
8.
Restart your computer.
Best Regards,
Sally Tang
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact
[email protected] -
Error in playing purchased music
hello
after having moved all my music to my macbook some of my purchased tracks won't play in full length. on the laptop they simply skip to next track in the middle of the track and on my iPhone they just go quiet for the rest of the track's running time.
anyone knows about this problem?
thanksUnfortunately not, the standard S60 music player has no feature to save position in a track.
The video centre feature in some S60 3rd Eidtion FP2 phones like the N96 has the feature to play videos from where they last stopped, but even in these phone the music files don't have the same luck. It might be that this feature be added in the future, though it is probably considered that the music player is designed for individual music tracksrather than very long recordings, unlike video files where whole films are offered. Perhaps if enough people demand it... -
DispatchScriptRunner()
How to pass Java script parameters into DispatchScriptRunner() Function.
Tried Code:
WideString scriptPath("InDesign\\CS5\\scripting\\indesign\\samplescripts\\JavaScript\\AddGuides.jsx" );
IDFile scriptFile(scriptPath);
InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scr iptFile));
if(scriptRunner)
ScriptRecordData arguments;
ScriptIDValuePair arg;
ScriptID aID;
ScriptData script(scriptFile);
ScriptData resultData;
PMString errorString;
//To add pair into KeyValuePair
KeyValuePair<ScriptID,ScriptData> ScriptIDValuePair(aID,script);
arguments.push_back(ScriptIDValuePair);
int length=arguments.size();
PMString str;
str.AppendNumber(length);
//CAlert::InformationAlert(str);
Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,erro rString,kFalse);
Value of ScriptId is cuming null or (0);
Please provide a solution to get a scriptId
Qn 2. How to pass a particular Java script methd's parameters into DispatchScriptRunner() Function in c++ code.IScriptArgs is aggregated on the Utils boss, so you would use it as follows:
In your C++ code:
Utils<IScriptArgs>()->Save(); // Saves the current set of scripting parameters on the context stack and creates a new current context, that has no parameters set.
// Now set up the parameters that you want to access from within your JavaScript as key-value pairs
Utils<IScriptArgs>()->Set(PMString("paramkeyname1"),PMString("ParamValueAsString1") );
Utils<IScriptArgs>()->Set(PMString("paramkeyname2"),PMString("ParamValueAsString2") );
// Call your script
Utils<IScriptArgs>()->Restore(); // Replaces the current existing context with the top context on the stack of saved contexts. In other words, returns the parameter stack to the Save() position.
In your JavaScript code:
if(app.scriptArgs.isDefined("paramkeyname1")) {
var yourvalueStr = app.scriptArgs.get("paramkeyname1")
HTH
Maybe you are looking for
-
FI postings with mixed debit/creidt amounts
Hi Friends, We have a custom build program to extract data and post FI document. In some cases after extraction we have a data with mixed DC/LC and LC2 amounts in different signs thats is debit/debit/credit amounts. Example ( Document currency as +10
-
Error in printing via printMode="ActiveX"
Post Author: maj CA Forum: General Hi all am trying to print a report form the Crystal Report Viewer ( Web Application ), then i receved this error message after i chose the printer Server Error---- An error occurred on the server. Printing will be
-
Can I set up iTunes account in 1 country and then use it in another
Hi, I have upgraded my iPad 1 to an iPad 3. I want to set up and send my old iPad 1 to my great auntie (86) in the UK, I am in Spain. I started setting it all up for her setting the country as uk, creating an Apple ID etc... But when it comes to iTun
-
IOS 4 Broke Picture Clarity in Photo Library
Since I installed IOS 4 this morning all my photos in the photo library are only clear as thumbnails but when I click on a picture to view it they are grainy and out of focus, it no longer adjusts itself to bring the picture into focus normally or zo
-
WiFi invalid password on iPhone 3GS
Recently, my iPhone 3GS started showing a new bizarre behaviour. When we enter the password to join a WiFi network, we are getting the following pop-up everytime: Incorrect password for "WirelessNetworkName" This has just started recently. System Inf