Restrict to only one Native Window?
Hello everyone, im trying to create a simple twitter client as a project for getting acquainted a little bit more with AIR. So far im able to fetch the data, if i double click on a message a new Window is opened where i could reply to the user. The problem is that if i double click again on other (or the same) message another window opens. This is not the desired behavior.
What would be the best way so that ONLY one reply window is open at any given time?
I'm thinking:
1. Disable the double click property of the list.
2. A singleton.
But im sure there must be a more "accepted" formal way of doing this.
Thanks!
Alejandro
I had a typo when I originally posted, but your code should work if you do it like this:
public var sendMsg:SendSMS; // don't instantiate this yet
private function onItemDoubleClick(event:ListEvent):void {
if (sendMsg == null || sendMsg.closed) // notice that I changed != to ==
sendMsg = new SendSMS(); // don't declare a duplicate variable, use the variable declared outside
sendMsg.height = 500;
sendMsg.width = 500;
sendMsg.tweetName = event.currentTarget.selectedItem.user;
sendMsg.open();
sendMsg.addEventListener(SendSMSEvent.ENABLE_CHANGED, handleClick);
else
// This implies that the window is still open
sendMsg.tweetName = event.currentTarget.selectedItem.user;
// You'll need to make sure you are either binding to tweetName in your display, or that tweetName is actually a setter and you
// modify whatever is displaying it when it is changed
Similar Messages
-
Why does only one safari window?
Only one safari window opens, how can I open multiple windows?
You do this by first tapping the + sign, correct? And when you open the second site, you do not see two tabs at the top? Like this:
-
Suddenly I can open only one Firefox window at a time. I can have multiple tabs in that window, but I can suddenly no longer open another window. What happened?
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes -
How to restrict more than one popup window
Hello All,
Is it possible to have only one pop up window at a time?
My problem is:
From parent window, I can use a link to open a pop up window. Now I have to restrict the user not to have more than one pop up window at a time.
Kindly suggest any solution to this .
Best RegardsThis is a Javascript related question. Javascript related questions should be posted in a forum devoted to Javascript. There are ones at webdeveloper.com and dynamicdrive.com.
-
Formatted Search - Restrict to Only One Customer on Activity Window
Hello Experts:
Am trying to create a formatted search to provide a suggested RMA Number on the Business Partners > Activity window in a UDF.
While in Activity, the user should get a list of ONLY the one customer they are currently working with. So if C0001 is being used in the Activity window, the list should show all suggested RMA numbers just for that customer of C0001, not any other customer.
When I use the following it shows all customers.
--FMS 6BP Automated RMA Number
SELECT
T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode]))
FROM OCLG T0
INNER JOIN OCRD T1
ON T0.CardCode = T1.CardCode
ORDER BY
T1.CardCode Desc,
T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode])) Desc
When I put in WHERE T1.CardCode = $[$ 9.0.0 ] in the right place it shows nothing...
Any ideas on how to make only the one current customer in Activity window appear in the list???
Thanks in Advance - ZalThanks Istvan and Gordon...
Istvan - that is the same as my SQL - just do not know how to show the $[$... correctly in this forum - it always goes to that http thing.
Gordon - tried to use your SQL but it gave me an error of "Internal Error (-1003) Occured [Message 131-183] every time I tried to click on the magnifying glass. However, due to your last line in the SQL it gave me an idea that eventually they were OK with - namely, the highest number to the top of T0.ClgCode...
Thanks again guys - Zal -
Restriction for only one chief position per organizational unit.
Hi
Customer insists of having not more than one chief position in each org. unit.
Is there any way that the system will block or give a warning while I am trying to mark an additional chief position for an org unit ?Hi Zeev,
you need to create a user exit.
Aranka -
I tried re-installing version 7.0.1 but that didn't help.
about:config
browser.tabs.closeWindowWithLastTab
Set this to TRUE
You're welcome! :) -
No tabs are showing when only one window open. How do I open a new tab?
Just upgraded to latest version. When only one window is open, no tabs show across the top. If I have two tabs open, both show across the top, but go to no tabs if I close one of them. And, the + sign is available for opening a third tab if at least two are open. The only way I can find to open a new tab when only one window is currently open is to turn off the menu, click the orange Firefox drop-down, and click New Tab. Why isn't it showing a tab, and a + tab (to open a new one) when only one tab (window) is open.
Thanks everyone for the quick responses. Cntl + T works fine, and I did move the + window to the nav bar, which also works well.
I had already gone into options and checked the box for always showing the tab bar, but it doesn't show it. I even unchecked it, saved the settings, the rechecked and saved the settings. Doesn't seems to make any difference.
I'm okay with it not showing a tab when I only have one open, just so I can get to a new one easily when I want it. -
When I want to close only one window it closes all of them. How do I close just one.
I only want to close one window. How can I do this without closing them all. But for this, I would use Mozilla all the time.
Thanks, JoyceYou do not mention what your Operating System is. You should be able to close only one firefox window, and then finally exit from firefox as a whole by using Firefox Button -> exit.
Also or alternatively consider use [[tabbed browsing]]. -
Cmd biee service windows left only one after win. cumulative security patch
Customer (3-5456748787) reported that the cmd obiee service windows left only one (instead of the usual two) after applying window cumulative security patches.
No change was made to the shortcut Start BI Services and they like to find out why they are getting one cmd window now.
Customer installed the 11115 environment using Simple Install option.
Everything else is working fine as normal. Any idea why and what caused the cmd window to disappear?
I can't find vcap image for 11115 Simple Install option. Anyone has one environment that I can verify this?
Thanks
TeikHi Teik,
I could not check this as I do not have any environment at the moment, but I think this is due to the changes in the 11.1.1.5 installation modes.
If I am right, the "Start BI Services" through the windows start menu, starts the BI weblogic servers and then the opmn and the nqserver processes. In 11.1.1.5 Simple mode, there is only one weblogic server (Admin Server) and there is only one command window.
I am sorry if I got this wrong.
Hope this helps.
Thank you,
Dhar -
Displaying one JDialog window at a time
Hi,
I'm having some trouble trying to write a code where only one JDialog window appears at one time.
-so when one jdialog box appears, no other jdialog can appear
-I was thinking about using a boolean but it didn't work at all
Here's my code:
iimport javax.swing.*;
import java.awt.event.*;
public class Data extends JFrame
JMenuItem existingRental;
JMenuItem newRental;
boolean one = true;
public Data(){
createMainMenu();
setSize(350, 100);
setVisible(true);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public static void main(String[] args){
new Data();
private void createMainMenu(){
JMenuBar mainMenuBar = new JMenuBar(); //notice - used JMenuBar
setJMenuBar(mainMenuBar);
JMenu windowMenu = new JMenu("Window");
windowMenu.setMnemonic('w');
mainMenuBar.add(windowMenu);
newRental = new JMenuItem("New Rental");
newRental.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));
newRental.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new Rental();
one = true;
if(!one)
new ExistingRentals();
existingRental = new JMenuItem("Existing Rentals");
existingRental.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, ActionEvent.CTRL_MASK));
existingRental.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new ExistingRentals();
one = true;
if(!one)
new Rental();
windowMenu.add(newRental);
windowMenu.add(existingRental);
}JDialog two
import javax.swing.*;]
import java.awt.*;
public class ExistingRentals extends JDialog
private JList list;
private JScrollBar scrollHorizontal;
public ExistingRentals()
existingRentalAgreement();
setTitle("Rental List");
setSize(200, 500);
setVisible(true);
setLocationRelativeTo(null);
public void existingRentalAgreement()
Container container = getContentPane();
container.setLayout(new BorderLayout());
list = new JList();
scrollHorizontal = new JScrollBar(JScrollBar.HORIZONTAL);
add(scrollHorizontal, BorderLayout.SOUTH);
scrollHorizontal.add(list);
}What if you made your jdialog modal. this can be done by passing a boolean parameter set to "true" to the JDialog super constructor. Here is what I mean with some other minor changes:
ExistingRentals class ----------------------------------------
import javax.swing.*;
import java.awt.*;
public class ExistingRentals extends JDialog
private JList list;
private JScrollBar scrollHorizontal;
public ExistingRentals(JFrame parent, String title)
super(parent, true); // true here makes dialog modal.[captain.obvious]false does the opposite[/captain.obvious]
existingRentalAgreement();
setTitle(title);
setSize(200, 500);
setVisible(true);
setLocationRelativeTo(null);
public void existingRentalAgreement()
Container container = getContentPane();
container.setLayout(new BorderLayout());
list = new JList();
scrollHorizontal = new JScrollBar(JScrollBar.HORIZONTAL);
add(scrollHorizontal, BorderLayout.SOUTH);
scrollHorizontal.add(list);
import javax.swing.*;
import java.awt.event.*;
public class Data extends JFrame
JMenuItem existingRental;
JMenuItem newRental;
boolean one = true;
public Data() {
createMainMenu();
setSize(350, 100);
setVisible(true);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public static void main(String[] args)
new Data();
private void createMainMenu()
JMenuBar mainMenuBar = new JMenuBar(); // notice - used JMenuBar
setJMenuBar(mainMenuBar);
JMenu windowMenu = new JMenu("Window");
windowMenu.setMnemonic('w');
mainMenuBar.add(windowMenu);
newRental = new JMenuItem("New Rental");
newRental.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,
ActionEvent.CTRL_MASK));
newRental.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
newRentalAction(e);
existingRental = new JMenuItem("Existing Rentals");
existingRental.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E,
ActionEvent.CTRL_MASK));
existingRental.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
existingRentalAction(e);
windowMenu.add(newRental);
windowMenu.add(existingRental);
private void existingRentalAction(ActionEvent e)
new ExistingRentals(this, "Existing Rental List");
// one = true;
// if (!one) new Rental();
private void newRentalAction(ActionEvent e)
// one = true;
// if (!one)
new ExistingRentals(this, "New Rental List");
// new Rental();
} -
Why only one leading ledger?
Hi
I am aware that in new GL you can have only one leading ledger. you can have as many non leading ledgers. Only leading ledger values flows to CO.
what can be the possible reasons for the restriction of "only one leading ledger"???
thank you in advance
Regards
VedavateeDear expert
In New G/L, there is one leading ledger for each client that is valid for all company codes
You can define only one ledger as the leading ledger u2013 SAP provides the leading ledger u201C0Lu201D
The leading ledger is integrated with all subsidiary ledgers
Only the values from the leading ledger are sent to CO
The leading area in Asset Accounting (depreciation area 01) must be posted to the leading ledger
Leading ledger uses the (additional) local currencies assigned to the company code
Leading ledger uses the GL Total Table: FAGLFLEXT
In each company code, the settings made for the following parameters are automatically applied to the leading ledger:
Currencies
Fiscal Year Variant
Posting Period Variant
Regards
Ajeesh.s -
How is oracle 10g configured to use only one cpu
Today a customer informed me that their instance of 10g was configured to run on only one of four cpu's in a Solaris server.
How did they do this ?
GeorgeOn Solaris 10 this could be done in a number of ways.
One way is to create a processor set with only one CPU in it, and bind the Oracle processes to it. They cannot run on any other CPU any more. As long as you bind the listener to it, any network based connections will come from the listener and so be in the same processor set.
A more sophisticated way is to create a Zone with a 1 CPU resource in it. A Zone is a software container within Solaris 10, and it can be associated a processor set. The difference to the previous way is that no explicit binding of processes is necessary. A Zone looks like a Solaris system in its own right. And everything in that Zone can only run on the CPUs in the processor set bound to the Zone. So Oracle could be started up in the Zone in the normal way, and be restricted to only one physical CPU, always.
There is also the possibility of using Solaris Resource Manager, for a softer control of CPU. But this does not restrict processes to a single physical processor. It is a fair share scheduler that allows different processes to receive their configured slice of CPU time, on average. So processes can still run on different CPUs in the system, but the averaging means that no single workload can maximise the system and restrict access for other workloads.
And the latest Sun systems are capable of running a virtualisation layer when the system boots (sometimes called a HyperVisor), and this partitions the hardware up into virtual systems, before Solaris then loads and runs on top of these. So you can configure a 4 CPU system to look like 4 * 1 CPU systems through virtualisation, and each runs its own instance of Solaris. And then one of these you run Oracle.
John -
FLV Playback and Seekbar on different native windows in one Air application
Hello Everyone. I'm trying to make a simple video playback AIR application that utilizes the initial native window to house a transport control with a seekbar on it. Once the application launches, it creates a second (new) window on my second screen and places a FLVPlayback instance on that new window. Everything works just like it want it to except for one thing. When the seekbar and FLVplayback instance are not located on the same window stage, the seekbar handle sticks to the mouse when trying to scrub through the video.
I've added both the transport control and the FLVPlayback instance to the original native window as children and I have also added both of them to the new window as children and everything works just fine. It's only when they are separated and located on different stages that the seekbar acts up. When they are on the same stage, I can click on a point on the seekbar and the video jumps to that spot and continues to play and I can also scrub the seekbar, the video updates as I scrub, and when I release the mouse, the seekbar handle stays where I released the mouse. When they on separate stages, the seekbar handle continues to follow the mouse movement without releasing it. The video updates as the seekbar handle is moved due to it sticking to the mouse, but if I release the mouse, the handle is still moving with the mouse and the video is still being scrubbed. Like I said, everything works great except for this and I have reached my limit with time spent on this issue. Does anyone have any insight into this?
Here's my code for the project. This is my first AIR application, so I am coding it as I am learning, please be kind.
import fl.video.*;
import flash.display.*;
import flash.desktop.*;
import flash.events.*;
import fl.video.MetadataEvent;
import flash.geom.*;
import flash.ui.Mouse;
import flash.text.*;
GLOBAL SETUP
var flvControl:FLVPlayback;
var MasterWindow = stage.nativeWindow;
var screen1:Screen = Screen.screens[0];
var screen2:Screen = Screen.screens[1];
MASTER WINDOW SETUP
this.loaderInfo.addEventListener(Event.COMPLETE,maximize);
transControl.playPauseButt2.addEventListener(MouseEvent.CLICK, PlayButton);
if (Screen.screens.length > 1){
createVideoBKG();
createVideoPlayer();
GENERAL FUNCTIONS
//Maximize the initial screen
function maximize(e:Event) {
MasterWindow.x = screen1.bounds.left
MasterWindow.maximize();
MasterWindow.stage.scaleMode = StageScaleMode.EXACT_FIT;
//Hide Mouse Behind Video Window On Roll-Over
function MouseRollOver(e:MouseEvent):void
{ Mouse.hide() }
function MouseRollOut(e:MouseEvent):void
{ Mouse.show() }
//Play-Pause Button Control
function PlayButton(event:MouseEvent):void
if(transControl.playPauseButt2.currentFrame==1 ){
transControl.playPauseButt2.gotoAndPlay(2);
flvControl.play();
else {
transControl.playPauseButt2.gotoAndPlay(1);
flvControl.pause();
function CloseWindow(e:MouseEvent):void
NativeApplication.nativeApplication.openedWindows[2].close();
VIDEO BKG SETUP
function createVideoBKG(e:Event = null):void{
var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
newOptions.type = NativeWindowType.LIGHTWEIGHT;
newOptions.systemChrome = NativeWindowSystemChrome.NONE;
newOptions.transparent = true;
var videoBKG:NativeWindow = new NativeWindow(newOptions);
if (Screen.screens.length > 1){
videoBKG.x = screen2.bounds.left;
videoBKG.maximize();
chromeSetup(videoBKG);
videoBKG.activate();
//Video BKG Chrome Setup
function chromeSetup(currentWindow):void {
var vidBKG = new video_bkg();
vidBKG.name = "video_bkg2";
vidBKG.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
vidBKG.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
currentWindow.stage.addChild(vidBKG);
VIDEO Player SETUP
function createVideoPlayer(e:Event = null):void{
var newOptions:NativeWindowInitOptions = new NativeWindowInitOptions();
newOptions.type = NativeWindowType.LIGHTWEIGHT;
newOptions.systemChrome = NativeWindowSystemChrome.NONE;
newOptions.transparent = true;
var videoPlayer:NativeWindow = new NativeWindow(newOptions);
if (Screen.screens.length > 1){
videoPlayer.x = screen2.bounds.left;
videoPlayer.y = screen2.bounds.top;
videoPlayer.width = screen2.bounds.width;
videoPlayer.height = screen2.bounds.height;
videoPlayer.stage.scaleMode = StageScaleMode.NO_SCALE;
videoPlayer.alwaysInFront = true;
var DVR = new DVR_Player();
DVR.name = "DVR";
DVR.x = 0;
DVR.y = 0;
DVR.addEventListener(MouseEvent.ROLL_OVER, MouseRollOver);
DVR.addEventListener(MouseEvent.ROLL_OUT, MouseRollOut);
videoPlayer.stage.addChild(DVR);
flvControl = DVR.display2;
flvControl.width = 1280;
flvControl.height = 720;
flvControl.skin = null;
flvControl.autoPlay=false;
flvControl.isLive=false;
flvControl.fullScreenTakeOver = false;
flvControl.align = VideoAlign.CENTER;
flvControl.scaleMode = VideoScaleMode.NO_SCALE;
flvControl.source = "olympics.f4v";
flvControl.seekBar = transControl.seekbarContainer2.seeker;
videoPlayer.activate();Does anyone have any ideas about this?
-
Came home to find computer restarted, which I assume is an automatic Firefox update.
When I try to open Firefox, window pops up saying "Close Firefox" and, "A copy of Firefox is already open. Only one copy of Firefox can be open at a time."
I'm unable to open the program at this time, lots of critical work info stored there - please help. Thx.
NealSee "Hang at exit":
*http://kb.mozillazine.org/Firefox_hangs
*https://support.mozilla.com/kb/Firefox+hangs
Maybe you are looking for
-
I turned off my data usage and when I turned it back on, the personal info was gone. No email, contacts. How do I get it back? I'm afraid to do any kind of reset with out knowing what I'm doing.
-
MBP 10.5.8 won't see wifi network but iphone & ipad ok
not only that, but the pc's in the house runing xp, vist and 7 all see the network. i have access to the modem but am really reluctant to change anything for fear of disturbing everyone else's access. i've never encountered this with my macbook pro b
-
Is itunes compatible with windows 7 64-bit
Is iTunes cmpatible with Windows 7 64-bit? I just had to get new computer and got rid of Vista.
-
I will be very happy if someone answers this, 'cos from all the other related posts, my outlook is pretty bleak. At least give me the thumbs up for trying, or a little human contact. Proof this post existed. Alright, I (fairly) recently updated to wi
-
Reg.Debite note alert message during invoice MIR7
Dear Experts We want an alert message during Invoice against Purchase order that "Debite note is raised". what I should do. Pls advise. Thanks Rajakumar.K