Please help on event listener (notified)
i create a dynamic text field, i want it notified that, when
got value send in the text field, then go to play another frame. i
found some tag like event listener and text event . but i dun know
how to used it.
any expert got any suggestion or advice show me?
Hi kglad,
In AS3 watch method is removed.
Can you please tell me how we can do the same in actionscript 3?
Thanks,
Shanthi
Similar Messages
-
I'm having some trouble trying to figure out how this event listener will work.
The main application is building an arrayCollection of a calendarDay custom components which is displayed by a DataGroup.
Within each calendarDay custom component i may create an arrayList of a DriverDetailComponent custom components displayed within the calendarDay by a DataGroup.
If a user double clicks on the DriverDetailComponent that is two layers in I would like to change states of the main application. I'm having trouble figuring out what item in the main application to set the listener on. Please help.
I can't figure out how to post the below as scrollable code snips so this is very long.
Main application code:
<code><?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:components="components.*"
preinitialize="readDataFile()"
creationComplete="buildRowTitles()"
width="1024" height="512" backgroundColor="#A4BDD8">
<s:states>
<s:State name="State1"/>
<s:State name="driverDetailState"/>
</s:states>
<!--
<fx:Style source="EventCalendar.css"/>
creationComplete="readDataFile()" creationComplete="driversList.send()"-->
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<mx:DateFormatter id="myDateFormatter"
formatString="EEE, MMM D, YYYY"/>
<!--<s:HTTPService id="driversList"
url="files/drivers.xml"
result="driversList_resultHandler(event)"
fault="driversList_faultHandler(event)"/>
<s:HTTPService id="postDriversList"
url="files/drivers.xml"
method="POST"
result="postDriversList_resultHandler(event)"
/>-->
<!--<s:Move id="expandTab"
target="{labelTab}"
xBy="250"/>-->
</fx:Declarations>
<fx:Script>
<![CDATA[
import components.CalendarDay;
import components.TruckDriver;
import components.calendarDay;
import events.CancelChangeDriversEvent;
import events.ChangeDriversEvent;
import events.EditDriverEvent;
import mx.collections.ArrayCollection;
import mx.collections.ArrayList;
import mx.containers.Form;
import mx.controls.Alert;
import mx.controls.CalendarLayout;
import mx.core.FlexGlobals;
import mx.core.IVisualElement;
import mx.core.WindowedApplication;
import mx.printing.FlexPrintJob;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.xml.SimpleXMLEncoder;
import spark.components.Application;
import utilities.FormatUtil;
import utilities.ObjectToXML;
/* public var prefsFile:File; */ // The preferences prefsFile
[Bindable] public var driversXML:XML; // The XML data
public var stream:FileStream; // The FileStream object used to read and write prefsFile data.
public var fileName:String="driversArrayCollection";
public var directory:String = "AceTrackerData";
public var dataFile:File = File.documentsDirectory.resolvePath(directory + "\\" + fileName);
[Bindable]
public var drivers:ArrayCollection=new ArrayCollection();
private var fileStream:FileStream;
[Bindable]
public var calendarDayArray:ArrayCollection = new ArrayCollection;
public var i:int;
[Bindable]
public var weekOneTitle:String;
[Bindable]
public var weekTwoTitle:String;
[Bindable]
public var weekThreeTitle:String;
[Bindable]
public var weekFourTitle:String;
public var day:Object;
protected function readDataFile():void
if(dataFile.exists)
fileStream = new FileStream();
fileStream.open(dataFile, FileMode.READ);
drivers = fileStream.readObject() as ArrayCollection;
fileStream.close();
else
drivers = new ArrayCollection();
var driver:TruckDriver = new TruckDriver("New", "Driver", 000);
drivers.addItem(driver);
saveData(drivers);
buildCalendarArray();
protected function buildCalendarArray():void
calendarDayArray.removeAll();
for (i=0; i<28; i++)
var cd:calendarDay = new calendarDay;
cd.dateOffset= i-7
cd.drivers=drivers;
cd.addEventListener("editDriverEvent",editDriverEvent_Handler);
calendarDayArray.addItem(cd);
private function saveData(obj:Object):void//this is called on the postDriversList result handler to create and write XML data to the file
var fs:FileStream = new FileStream();
fs.open(dataFile, FileMode.WRITE);
/* fs.writeUTFBytes(myXML); */
fs.writeObject(drivers);
fs.close();
protected function driverschedule1_changeDriversHandler(event:ChangeDriversEvent):void
saveData(drivers);
readDataFile();//i read the drivers file again, this refreshes my data, and removes any temporary data that may have been stored in the drivers array
buildCalendarArray();
currentState = 'State1';//this hides the driversdetail window after we've clicked save
/* postDriversList.send(event.driverInfo); */ //this needs to be different
/* Alert.show("TEST"); */
protected function driverschedule1_cancelChangeDriversHandler(event:CancelChangeDriversEvent):void
/* Alert.show("Changes have been canceled."); */
readDataFile();//this re-reads the saved data file so that the changes that were made in the pop up window
// are no longer reflected if you reopen the window
buildCalendarArray();
currentState = 'State1'; //this hides the driversdetail window after we've clicked cancel
protected function buildRowTitles():void
var calendarDay0:Object;
var calendarDay6:Object;
calendarDay0=calendarDayArray.getItemAt(0);
calendarDay6=calendarDayArray.getItemAt(6);
weekOneTitle = calendarDay0.getDayString() + " - " + calendarDay6.getDayString();
weekTwoTitle=calendarDayArray.getItemAt(7).getDayString()+ " - " + calendarDayArray.getItemAt(13).getDayString();
weekThreeTitle=calendarDayArray.getItemAt(14).getDayString()+ " - " + calendarDayArray.getItemAt(20).getDayString();
weekFourTitle=calendarDayArray.getItemAt(21).getDayString()+ " - " + calendarDayArray.getItemAt(27).getDayString();
]]>
</fx:Script>
<s:Group height="100%" width="100%">
<s:layout>
<s:BasicLayout/> <!--This is the outermost layout for the main application MXML-->
</s:layout>
<s:Scroller width="95%" height="100%" >
<s:Group height="100%" width="100%" ><!--this groups the vertically laid out row titles hoizontally with the large group of calendar days and day titles-->
<s:layout>
<s:HorizontalLayout/>
</s:layout>
<s:Group height="95%" width="50" ><!--this is the group of row titles layed out vertically-->
<s:layout>
<s:VerticalLayout paddingLeft="40" paddingTop="35"/>
</s:layout>
<s:Label text="{weekOneTitle}"
rotation="-90"
backgroundColor="#989393"
height="25%" width="115"
fontWeight="normal" fontSize="15"
paddingTop="4" textAlign="center" />
<s:Label text="{weekTwoTitle}"
rotation="-90"
backgroundColor="#989393"
height="25%" width="115"
fontWeight="normal" fontSize="15"
paddingTop="4" textAlign="center" />
<s:Label text="{weekThreeTitle}"
rotation="-90"
backgroundColor="#989393"
height="25%" width="115"
fontWeight="normal" fontSize="15"
paddingTop="4" textAlign="center" />
<s:Label text="{weekFourTitle}"
rotation="-90"
backgroundColor="#989393"
height="25%" width="115"
fontWeight="normal" fontSize="15"
paddingTop="4" textAlign="center" />
</s:Group>
<s:Group height="100%" width="100%" >
<!--this vertically groups together the horizontal day names group and the tile layout datagroup of calendar days-->
<s:layout>
<s:VerticalLayout paddingLeft="5"/>
</s:layout>
<s:Group width="100%" >
<s:layout><!--this group horizontal layout is for the Day names at the top-->
<s:HorizontalLayout paddingTop="10"/>
</s:layout>
<s:Label id="dayNames" text="Sunday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
<s:Label text="Monday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
<s:Label text="Tuesday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
<s:Label text="Wednesday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
<s:Label text="Thursday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
<s:Label text="Friday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
<s:Label text="Saturday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
</s:Group>
<!--<s:SkinnableContainer width="16%">-->
<s:DataGroup id="calendarDataGroup"
dataProvider="{calendarDayArray}"
itemRenderer="{null}" resizeMode="scale"
height="100%" width="100%"
> <!-- I had to use a null renderer because otherwise each instance is added in a group container renderers.DriverScheduleRenderer-->
<s:layout >
<s:TileLayout requestedColumnCount="7" />
</s:layout>
</s:DataGroup>
<!--</s:SkinnableContainer>-->
<!--<mx:FormItem label="Today's Date:">
<s:TextInput id="dateToday"
text="{myDateFormatter.format(testDate)}"/>
</mx:FormItem>-->
<!--<components:DriverSchedule drivers="{drivers}"
changeDriversEvent="driverschedule1_changeDriversHandler(event)"/>-->
<s:HGroup> <!--this groups together my drivers button and my print button at the bottom of the calendar-->
<s:Button id="showDriverDetailButton"
label="Driver List"
click="currentState = 'driverDetailState'">
<!--</s:Button>
<s:Button id="printButton"
label="Print"
> click="printButton_clickHandler(event)"-->
</s:Button>
</s:HGroup> <!--this is the end of the small hgroup which pairs my drivers button with the print button-->
</s:Group><!--this ends the vertical grouping of the day names and the tile layout calendar-->
</s:Group> <!--this ends the horizontal grouping of the calendar (names and days) with the week labels at the left-->
</s:Scroller>
<s:SkinnableContainer includeIn="driverDetailState"
width="95%" height="95%" horizontalCenter="0" verticalCenter="0"
backgroundColor="#989898" backgroundAlpha="0.51">
<s:BorderContainer horizontalCenter="0" verticalCenter="0">
<components:DriverSchedule id="driverSchedule"
drivers="{drivers}"
changeDriversEvent="driverschedule1_changeDriversHandler(event)"
cancelChangeDriversEvent="driverschedule1_cancelChangeDriversHandler(event)"
/>
</s:BorderContainer>
</s:SkinnableContainer>
</s:Group> <!--end of basic layout group-->
</s:WindowedApplication>
</code>
calendarDay.mxml code:
<code>
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="initDay()"
width="100%"> <!--width="16%" height="25%" width="160" height="112"-->
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<mx:DateFormatter id="myDateFormatter"
formatString="MMM D"/>
</fx:Declarations>
<fx:Metadata>
[Event(name = "editDriverEvent", type="events.EditDriverEvent")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import components.CalendarDay;
import components.DriverDetailComponent;
import events.EditDriverEvent;
import mx.collections.ArrayCollection;
import mx.collections.ArrayList;
import mx.controls.CalendarLayout;
import mx.controls.DateField;
[Bindable]
public var todayCollection:ArrayCollection = new ArrayCollection;
[Bindable]
public var todayList:ArrayList=new ArrayList; //arraylist created as data provider for dataGroup, this is where all drivers with an arrival date of today are added
[Bindable]
public var currDate:Date =new Date; //this will be used to contain the current real world date
[Bindable]
public var calDate:Date = new Date; //this is used below to determine the date of the calender day that is being created
[Bindable]
public var todaysDate:CalendarDay;
[Bindable]
public var currDay:int;
[Bindable]
public var dateOffset:int;
public var drivers:ArrayCollection= new ArrayCollection();
public var driver:Object;
public var rowLabel:String;
public function initDay():void
todaysDate = new CalendarDay(currDate, currDate.day, dateOffset)//currDate represents the day the operating system says today is
currDay=todaysDate.returnDate().getDate();//currDay is an int representing the day of the month
calDate=todaysDate.returnDate();//calDate represents the actual date on the calendar (MM-DD-YYY) that is currently being evaluated
/* if (currDay ==currDate.getDate()) //i want to highlight the day if it is in fact today
cont.styleName="Today";
if (calDate.getDate() == currDate.getDate())
calDayBorder.setStyle("backgroundColor", "#FFFF00");
else
calDayBorder.setStyle("backgroundColor", "#EEEEEE");
addDrivers();
return;
public function addDrivers():void
var count:int = 0;
/*var driverDetail:DriverDetailComponent;
var driver = */
for each (driver in drivers)
{//i check the date value based on data entry of mm-dd-yy format against the calculated date for the day
//the calender is building and if it is equal the drivers information is added to this day of the calendar
if (DateField.stringToDate(driver.arrivalDate,"MM/DD/YYYY").getDate() == calDate.getDate())
var driverDetail:DriverDetailComponent = new DriverDetailComponent; //i create a new visual component that adds the id and destination to the calendar day
driverDetail.driverid = drivers[count].id; //i feed the id property which is the truck# - firstName
driverDetail.driverToLoc=drivers[count].toLoc; //i feed the toLoc which is the current destination of the driver
driverDetail.driverArrayLocation=count; //here i feed the location of this driver in the "drivers" array so i know where it's at for the click listener
todayList.addItem(driverDetail);
//this concatenates the drivers truck number first name and destination to display in the calendar day
/* todayList.addItem(driver.truckNumber + " - " + driver.firstName + " - " + driver.toLoc); */
count ++;
public function getDayString():String
rowLabel =myDateFormatter.format(calDate);
return rowLabel;
]]>
</fx:Script>
<s:BorderContainer id="calDayBorder" width="160" styleName="Today" cornerRadius="2" dropShadowVisible="true" height="100%">
<s:layout>
<s:BasicLayout/>
</s:layout>
<!--I need to make a custom item renderer for my calendar days that limits the height and width of the day, and also puts the items
closer together so i can fit maybe 5 drivers on a single day-->
<s:DataGroup dataProvider="{todayList}"
itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"
bottom="-2"
width="115" left="2"> <!--width="94%" width="100" width="16%"-->
<s:layout >
<s:VerticalLayout gap="-4"/> <!--The reduced gap pushes the drivers together if there are serveral on one day. This helps cleanly show several drivers on one day-->
</s:layout>
</s:DataGroup >
<s:Label text="{currDay}" right="3" top="2" fontSize="14" fontWeight="bold"/>
</s:BorderContainer>
</s:Group>
</code>
DriverDetailComponent code:
<code><?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Metadata>
[Event(name = "editDriverEvent", type="events.EditDriverEvent")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import events.EditDriverEvent;
import mx.controls.Alert;
[Bindable]
public var driverid:String;
[Bindable]
public var driverArrayLocation:int;
[Bindable]
public var driverToLoc:String;
protected function label1_doubleClickHandler(event:MouseEvent):void
Alert.show("You have selected " +driverid +" at location " + driverArrayLocation.toString() +" in the drivers ArrayCollection.");
var eventObject:EditDriverEvent = new EditDriverEvent("editDriverEvent",driverArrayLocation);
dispatchEvent(eventObject);
]]>
</fx:Script>
<s:Label id="driverDetailLabel" text="{driverid} - {driverToLoc}" doubleClick="label1_doubleClickHandler(event)" doubleClickEnabled="true"/>
</s:Group>
</code>lkb3 wrote:
I'm trying to add a listener to [this JOptionPane pane dialog box|http://beidlers.net/photos/d/516-1/search_screenshot.JPG|my dialog box], so that when it pops up, the cursor is in the text box, but then if the user clicks a button other than the default, the cursor reverts back into the text box.
The code I have is this:
// BUILD DIALOG BOX
JLabel option_label = new JLabel("Select a search option:");
// Create the button objects
JRadioButton b1 = new JRadioButton("Search PARTS by name");
JRadioButton b2 = new JRadioButton("Search ASSEMBLIES by name");
JRadioButton b3 = new JRadioButton("Search DRAWINGS by name");
JRadioButton b4 = new JRadioButton("Search all by DESCRIPTION");
b1.setSelected(true);
// Tie them together in a group
ButtonGroup group = new ButtonGroup();
group.add(b1);
group.add(b2);
group.add(b3);
group.add(b4);
// Add them to a panel stacking vertically
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS));
panel.add(b1);
panel.add(b2);
panel.add(b3);
panel.add(b4);
JLabel name_label = new JLabel("Enter a search term (add *'s as required)");
JTextField name = new JTextField(30);
name.addComponentListener(new ComponentListener() {
public void componentHidden(ComponentEvent ce) { }
public void componentMoved(ComponentEvent ce) { }
public void componentResized(ComponentEvent ce) {
ce.getComponent().requestFocus();
public void componentShown(ComponentEvent ce) { }
Object[] array = { option_label, panel, name_label, name };
// GET INPUT FROM USER
int res = JOptionPane.showConfirmDialog(null, array, "Select", JOptionPane.OK_CANCEL_OPTION);
String searchTerm = name.getText();This sucessfully has the focus in the text box when opened; is there a way to get the focus to go back into the text box after the user clicks a radio button?
Thanks!
[this JOptionPane pane dialog box|http://beidlers.net/photos/d/516-1/search_screenshot.JPG|dialog Joption]
you will need to add ItemListener to the JRadioButtons -
Please help : two events on one button
Hi there
I set up a simple Flash banner with the following code to click through to a web page:
function buttonClickHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("**URL**"));
trace("You clicked me.");
This worked fine, no problems.
However, I was then asked to include a click counter by using this code:
btn.buttonMode = true;
btn.addEventListener(MouseEvent.CLICK, goOut);
function goOut(e:Event){
var url:String = root.loaderInfo.parameters.clickTag;
var request:URLRequest = new URLRequest(**URL**);
try {
navigateToURL(request);
catch (e:Error) {
I've tried various ways to combine the two events, but it just doesn't seem to work. I'm only used to one simple action at a time(!) and this is needed urgently.
Can anyone please help me resolve this problem? I will keep an eye on the forum to update with any necessary info asked for.
Many thanks in advance.You can just call two different functions by adding two listeners:
btn.addEventListener(MouseEvent.CLICK, goOut);
btn.addEventListener(MouseEvent.CLICK, buttonClickHandler);
If you want to combine them though, you do have one error - the goOut function needs to accept a MouseEvent, not a regular Event:
function goOut(e:MouseEvent){
Also, you shouldn't need the root when grabbing the FlashVar:
var url:String = loaderInfo.parameters.clickTag;
You should put a trace in there to make sure it's working as expected.
And you didn't really say what isn't working. Do you get any errors? -
Please help problem in Listener
Dear All,
I am face problem in Listener.
At present Listener is up and sap is working fine.
While going through log I find this error. Please suggest how to resolved the problem .
we are using oracle 9i and Ecc 5
LISTENER2Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
System parameter file is E:\oracle\ora92\network\admin\listener.ora
Log messages written to E:\oracle\ora92\network\log\listener2.log
Trace information written to E:\oracle\ora92\network\trace\listener2.trc
Trace level is currently 0
Started with pid=1268
TNS-01151: Missing listener name, LISTENER2, in LISTENER.ORA
LISTENER.ORA
LISTENER.ORA Network Configuration File: E:\oracle\ora92\network\admin\listener.ora
Generated by Oracle configuration tools.
STARTUP_WAIT_TIME_FS****-SAP-ORAV = 0
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ***-SAP***)(PORT = 1528))
ADMIN_RESTRICTIONS_FS****-SAP-ORAV = on
FSL****--SAP-ORAV =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = PRD))
(ADDRESS = (PROTOCOL = IPC)(KEY = PRD.WORLD))
(ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)(Host = *********)(Port = 1527))
This file is written by Oracle Services For MSCS
on Tue May 16 21:20:04 2006
TRACE_LEVEL_FS****--SAP-ORAV = OFF
CONNECT_TIMEOUT_LISTENER = 10
STARTUP_WAIT_TIME_LISTENER = 0
ADMIN_RESTRICTIONS_LISTENER = on
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ********)(PORT = 1527))
SID_LIST_F****--SAP-ORAV =
(SID_LIST =
(SID_DESC =
(SDU = 32768)
(SID_NAME = PRD)
(ORACLE_HOME = E:\oracle\ora92)
TRACE_LEVEL_LISTENER = OFF
CONNECT_TIMEOUT_FS****--SAP-ORAV = 10
NMICONF.LOG
DBSNMP for 32-bit Windows: release 9.2.0.7.0 - Production on *
Discovering services on ***configured on host addresses {***-01. ********.5 ****}
Warning : Skipping OracleOraHome92TNSListenerFsl****: Could not find corresponding listener definition in
Warning : Skipping OracleOraHome92TNSListenerLISTENER2 : Could not find corresponding listener definition in
Warning : Skipping OracleOraHome92TNSListenerprd : Could not find corresponding listener definition in
Warning : Skipping OracleOraHome92TNSListenerprd.world
: Could not find corresponding listener definition in
Warning : LISTENER1 defined in E:\oracle\ora92\network\admin\listener.ora will be skipped, because it does not monitor any of the valid SIDs
Warning : LISTENER defined in E:\oracle\ora92\network\admin\listener.ora will be skipped, because it does not monitor any of the valid SIDs
Warning : No Listener found for SID PRD. PRD will be skipped
Could not determine location of emtab.
Regards,
KumarHello Anil,
At present sap is working nad all the service are up.
but why this error in the log.
Please if you can guide the steps.
Best Regards,
Kumar -
Problem signature
Problem Event Name: APPCRASH
Application Name: Audition.exe
Application Version: 3.0.7283.0
Application Timestamp: 470d9498
Fault Module Name: kernel32.dll
Fault Module Version: 6.0.6001.18215
Fault Module Timestamp: 49953395
Exception Code: e06d7363
Exception Offset: 000442eb
OS Version: 6.0.6001.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 1739
Additional Information 2: 3c3cf0b351726b85a2b6d24ff0a86110
Additional Information 3: 7d1c
Additional Information 4: 1d1d64b872c793392285053bf8183ae1
Extra information about the problem
Bucket ID: 1232267440When i try to switch my audio driver to ASIO Audio Driver in Audition 3.0. It Stops Working and when i go to Problem Reports and Solution.. Its Tell Me Something about the Fault Module Name: kernel32.dll and the rest is below.. I Am using Mbox2 Mini and its Driver 7.4v
I Dont Know how to get it working again so could u help.. you can reach me on yahoo messenger at : [email protected] please help
Problem Event Name: APPCRASH
Application Name: Audition.exe
Application Version: 3.0.7283.0
Application Timestamp: 470d9498
Fault Module Name: kernel32.dll
Fault Module Version: 6.0.6001.18215
Fault Module Timestamp: 49953395
Exception Code: e06d7363
Exception Offset: 000442eb
OS Version: 6.0.6001.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 1739
Additional Information 2: 3c3cf0b351726b85a2b6d24ff0a86110
Additional Information 3: 7d1c
Additional Information 4: 1d1d64b872c793392285053bf8183ae1
Extra information about the problem
Bucket ID: 1232267440
I Dont Know how to get it working again so could u help.. you can reach me on yahoo messenger -
Have "ZOOM" function in the map???Please help me~~
in my project , in need write a map of a building.
i would like to use zoom fucntion to let user to look into the room number in the box instead of room
do the j2me have this function and how to implement ??
please help
urgent event~~~thz a lotin my project , in need write a map of a building.
Sounds like you are working with graphics, not collections
i would like to use zoom fucntion to let user to look
into the room number in the box instead of room
Yeah, sounds like you need to be posting in the Java2D forums
do the j2me have this function and how to implement
I'm sure there are 2D graphics calls you can make in J2ME. You basically need to get the subimage or subsection of the original image, then scale it to the size of the canvas and redraw. -
Please Help, Event Listener Not Listening
Hey, I am stuck trying to use some code I have used in the past to pass args through an event listener. I must find a way to do this
This is what I am doing, using an inline function. I dont completely understand how it all works, but know that in one open FLA it works and in the other it does not. The error thrown is #1178: Attempted access of inaccessible property spotlightBox through a reference with static type..." SpotlightBox is the name of the function I'm trying to pass data to.
The main difference in the two FLA's is that, in the broken one, it's constructed inside a for loop. But not sure how that is a problem. If you have some guidance I would greatly appreciate it. My work deadline is in tomorrow and I am stuck.
This is being used inside a with block for each sprite:
addEventListener(MouseEvent.ROLL_OVER, function onRoll_Over(e:Event) { spotlightBox(e, new Array("5"))});
And here is the function:
function spotlightBox(e:Event, arg:Array):void
trace(arg[0]);use:
addEventListener(MouseEvent.ROLL_OVER, function(e:Event) { spotlightBox(e, new Array("5"))});
function spotlightBox(e:Event, arg:Array):void
trace(arg[0]);
but your main problem is using a with() statement to add listeners. that's probably not going to work. -
Please Help me with my Custom Event
I am new in java, please help me about my custom event
I have a simple source code about custom event but it doesn't work like I want. This code generate result :
start
end
but I want result :
start
my custom event (from aaa method)
end
Thank you
package TestBean;
class MyEvent extends java.util.EventObject {
public MyEvent(Object source) {
super(source);
interface MyEventListener extends java.util.EventListener {
public void myEventOccurred(MyEvent evt);
class MyClass {
protected javax.swing.event.EventListenerList listenerList =
new javax.swing.event.EventListenerList();
public void addMyEventListener(MyEventListener listener) {
listenerList.add(MyEventListener.class, listener);
public void removeMyEventListener(MyEventListener listener) {
listenerList.remove(MyEventListener.class, listener);
protected void fireMyEvent(MyEvent evt) {
Object[] listeners = listenerList.getListenerList();
for (int i=0; i<listeners.length; i+=2) {
if (listeners==MyEventListener.class) {
((MyEventListener)listeners[i+1]).myEventOccurred(evt);
public class BeanFrame extends javax.swing.JFrame {
public BeanFrame() {
initComponents();
MyClass c = new MyClass();
System.out.println("start");
c.addMyEventListener(new MyEventListener()
public void myEventOccurred(MyEvent evt)
aaa(evt);
System.out.println("end");
private void aaa(MyEvent evt) {
System.out.println("my custom event");
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
pack();
}// </editor-fold>
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new BeanFrame().setVisible(true);package TestBean;
class MyEvent extends java.util.EventObject {
public MyEvent(Object source) {
super(source);
interface MyEventListener extends java.util.EventListener {
public void myEventOccurred(MyEvent evt);
class MyClass {
protected javax.swing.event.EventListenerList listenerList =
new javax.swing.event.EventListenerList();
public void addMyEventListener(MyEventListener listener) {
listenerList.add(MyEventListener.class, listener);
public void removeMyEventListener(MyEventListener listener) {
listenerList.remove(MyEventListener.class, listener);
protected void fireMyEvent(MyEvent evt) {
Object[] listeners = listenerList.getListenerList();
for (int i=0; i<listeners.length; i+=2) {
if (listeners==MyEventListener.class) {
((MyEventListener)listeners[i+1]).myEventOccurred(evt);
public class BeanFrame extends javax.swing.JFrame {
public BeanFrame() {
initComponents();
MyClass c = new MyClass();
System.out.println("start");
c.addMyEventListener(new MyEventListener(){
public void myEventOccurred(MyEvent evt){
aaa(evt);
System.out.println("end");
private void aaa(MyEvent evt) {
System.out.println("my custom event");
// ><editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
pack();
}// </editor-fold>
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new BeanFrame().setVisible(true);
}just enclosed it with the code tags. -
PLEASE, PLEASE HELP ME. I'm a computer ignorant woman and need help. I have an IBOOK G4 and I was trying to fix a problem in IPhoto (which never got fixed) and took some guy's bad advice to reset iphoto or something and now my plug-ins are gone too. Or at least the one(s) that were allowing me to listen to on-line discussions and audio recordings.. Can anyone help me? I have gone to UPDATE SOFTWARE and updated Java but that is all. It's like I go to a think were there is an audio thing to listen to and there is a picture of a plug in and it says something like "Plug in not available to listen to this" and then gives you an option to download plug-in but when I do, it says something like "No Plug in was found that was useable" or something alone those lines. Then it has a manual plug-in option but when I clicked that, I entered the frustrated crying zone. Can you help? I will so give you big points! Thank you!
THis is all Greek to me, but maybe it answers your questions???? Thank you Ronda.
ATA Bus:
MATSHITADVD-R UJ-845E:
Model: MATSHITADVD-R UJ-845E
Revision: DMP2
Serial Number:
Detachable Drive: No
Protocol: ATAPI
Unit Number: 0
Socket Type: Internal
Built In Sound Card:
Devices:
Texas Instruments TAS3004:
Inputs and Outputs:
Internal Microphone:
Controls: Left, Right
Playthrough: No
PluginID: TAS
Headphones:
Controls: Mute, Left, Right
PluginID: TAS
Internal Speakers:
Controls: Mute, Left, Right
PluginID: TAS
Formats:
PCM 16:
Bit Depth: 16
Bit Width: 16
Channels: 2
Mixable: Yes
Sample Rates: 32 KHz, 44.1 KHz, 48 KHz
PCM 24:
Bit Depth: 24
Bit Width: 32
Channels: 2
Mixable: Yes
Sample Rates: 32 KHz, 44.1 KHz, 48 KHz
DIMM0/BUILT-IN:
Size: 512 MB
Type: Built-in
Speed: Built-in
Status: OK
System Power Settings:
AC Power:
System Sleep Timer (Minutes): 6
Disk Sleep Timer (Minutes): 10
Display Sleep Timer (Minutes): 6
Dynamic Power Step: Yes
Reduce Processor Speed: No
Automatic Restart On Power Loss: No
Wake On AC Change: No
Wake On Clamshell Open: Yes
Wake On LAN: No
Wake On Modem Ring: Yes
Display Sleep Uses Dim: Yes
Battery Power:
System Sleep Timer (Minutes): 9
Disk Sleep Timer (Minutes): 10
Display Sleep Timer (Minutes): 9
Dynamic Power Step: No
Reduce Processor Speed: Yes
Automatic Restart On Power Loss: No
Wake On AC Change: No
Wake On Clamshell Open: Yes
Wake On Modem Ring: No
Display Sleep Uses Dim: Yes
Reduce Brightness: Yes
Battery Information:
Battery Installed: Yes
First low level warning: No
Full Charge Capacity (mAh): 466
Remaining Capacity (mAh): 466
Amperage (mA): 0
Voltage (mV): 16491
Cycle Count: 247
AC Charger Information:
AC Charger (Watts): 50
Connected: Yes
Charging: No
Hardware Configuration:
Clamshell Closed: No
UPS Installed: No -
All day calendar events not being displayed in the notification centre for iphone 5 post ios 7 upgrade. Please help. Is it a bug?
With iOS 6, the all day events showed up in the notification centre but it lacks in the upgrade iOS 7.Same problem here. Some people pointed out that all-day events do show up in their notification center, but that seems only to be the case for birthdays (and only as text like the weather). I've tried it myself on my iPhone and iPad and it did work for birthdays but not for any other all-day events. I already sent this to Apple as a product feedback as well, as should everyone of you. The more people mention it, the faster Apple's going to fix this issue. In its current state, notification center is not a very helpful feature in my opinion. There's absolutely no point in not showing all-day events in the 'today' calendar overview.
Here's a link to the product feedback page: http://www.apple.com/feedback/
I posted my message in the iPhone section since I couldn't find a page specifically dedicated to iOS 7.
I really love the look & feel of iOS 7 but it's kinda sad to see notification center not tapping its full potential.
Cheers! -
Since I could not find a list of the Event Ids that was accurate at all or not too general as to be useless and Microsoft won't let us know how to fix these ourselves without having a programming degree, I am begging for help from anyone who can help
me get my computer working right again. I have some important things to get done which I can't do without my computer working. I have tried to get what I could get but I am blocked from many files which makes it difficult to get info. Please help. I appreciate
any help I can get. Thank you,
WhiteFox42
I am not sure which one is more important.
Event id 20
Installation Failure: Windows failed to install the following update with error 0x80070643: Update for Microsoft .NET Framework 4 on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2 for x64-based Systems
(KB2468871).
Event id 11
Possible Memory Leak. Application (C:\Windows\System32\svchost.exe -k LocalServiceNetworkRestricted) (PID: 476) has passed a non-NULL pointer to RPC for an [out] parameter marked [allocate(all_nodes)]. [allocate(all_nodes)] parameters are always
reallocated; if the original pointer contained the address of valid memory, that memory will be leaked. The call originated on the interface with UUID ({3f31c91e-2545-4b7b-9311-9529e8bffef6}), Method number (20). User Action: Contact your application
vendor for an updated version of the application.
Event id 455
taskhost (1348) WebCacheLocal: Error -1811 (0xfffff8ed) occurred while opening logfile R:\User\App Data\Roaming\Microsoft\Templates\Local\Microsoft\Windows\WebCache\V01.log.
Event Xml:
Event id 505
wuaueng.dll (1012) SUS20ClientDataStore: An attempt to open the compressed file "C:\Windows\SoftwareDistribution\DataStore\DataStore.edb" for read / write access failed because it could not be converted to a normal file. The open file operation
will fail with error -4005 (0xfffff05b). To prevent this error in the future you can manually decompress the file and change the compression state of the containing folder to uncompressed. Writing to this file when it is compressed is not supported.
Event id 513
Cryptographic Services failed while processing the OnIdentity() call in the System Writer Object
Event id 1000
Faulting application name: IEXPLORE.EXE, version: 11.0.9600.16428, time stamp: 0x525b664c
Faulting module name: IEFRAME.dll, version: 11.0.9600.16476, time stamp: 0x52944cf2
Exception code: 0xc0000005
Fault offset: 0x00025f1d
Faulting process id: 0x1854
Faulting application start time: 0x01cf0735f0e5f0c7
Faulting application path: C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE
Faulting module path: C:\Windows\system32\IEFRAME.dll
Report Id: e3dc1e9a-733f-11e3-b920-00215a2af202
Event id 1000
Faulting application name: msiexec.exe, version: 5.0.7601.17514, time stamp: 0x4ce79d93
Faulting module name: msvcrt.dll, version: 7.0.7601.17744, time stamp: 0x4eeb033f
Exception code: 0xc0000005
Fault offset: 0x00000000000035e1
Faulting process id: 0x1030
Faulting application start time: 0x01cf01b77867a358
Faulting application path: C:\Windows\system32\msiexec.exe
Faulting module path: C:\Windows\system32\msvcrt.dll
Report Id: f7253b17-6daa-11e3-b944-00215a2af202
Event id 1002
Computer: w7mar-64 "I don't know why it has computer as this when it should not be."
Description:
The IP address lease 192.168.200.195 for the Network Card with network address 0x08002742F261 has been denied by the DHCP server 192.168.200.1 (The DHCP Server sent a DHCPNACK message).
Event id 1008
The Windows Search Service is starting up and attempting to remove the old search index {Reason: Index Corruption}.
Event id 1008
Computer: w7mar-64
Description:
An errorUser: LOCAL SERVICE
occurred in initializing the interface. The error code is: 0x2.
Event id 1014
User: NETWORK SERVICE
Computer:
Description:
Name resolution for the name wpad.westell.com timed out after none of the configured DNS servers responded.
Event id 1015
User: N/A
Computer: w7mar-64
Description:
Event ID 1013 for the Windows Search Service has been suppressed 7 time(s) since 12:04:10 PM. This event is used to suppress Windows Search Service events that have occurred frequently within a short period of time. See Event ID 1013 for further details
on this event.
Event id 1015
Failed to connect to server. Error: 0x8007043C
Event id 1018
The description for Event ID 1018 from source EvntAgnt cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
Event id 1020
Updates to the IIS metabase were aborted because IIS is either not installed or is disabled on this machine. To configure ASP.NET to run in IIS, please install or enable IIS and re-register ASP.NET using aspnet_regiis.exe /i.
Event id 1028
Windows Installer has determined that its configuration data cache folder was not secured properly. The owner of the key must be either Local System or Builtin\Administrators. The existing folder will be deleted and re-created with the appropriate security
settings.
Event id 1101
.NET Runtime Optimization Service (clr_optimization_v4.0.30319_32) - Failed to compile: System.Web.Entity.Design, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil . Error code = 0x80010108
Event id 1500
The description for Event ID 1500 from source SNMP cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
Event id 1530
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
Event id 1530
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
DETAIL -
6 user registry handles leaked from \Registry\User\S-1-5-21-2959539970-205720217-4182857889-1000:
Process 1020 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-2959539970-205720217-4182857889-1000\Software
Process 1020 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-2959539970-205720217-4182857889-1000\Software\Microsoft\Windows\CurrentVersion\Internet Settings
Process 1020 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-2959539970-205720217-4182857889-1000\Software\Microsoft\Windows\CurrentVersion\Internet Settings
Process 1020 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-2959539970-205720217-4182857889-1000\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings
Process 1020 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-2959539970-205720217-4182857889-1000\Software\Microsoft\Internet Explorer\Main
Process 1020 (\Device\HarddiskVolume2\Windows\System32\svchost.exe) has opened key \REGISTRY\USER\S-1-5-21-2959539970-205720217-4182857889-1000\Software\Policies
Event id 3028
Context: Windows Application, SystemIndex Catalog
Details:
The content index catalog is corrupt. (HRESULT : 0xc0041801) (0xc0041801)
Event id 3029
Context: Windows Application, SystemIndex Catalog
Details:
The content index catalog is corrupt. (HRESULT : 0xc0041801) (0xc0041801)
Event id 3036
The content source <csc://{S-1-5-21-2959539970-205720217-4182857889-1001}/> cannot be accessed.
Event id 3036
No protocol handler is available. Install a protocol handler that can process this URL type. (HRESULT : 0x80040d37) (0x80040d37)
Event id 4104
Description:
The backup was not successful. The error is: Access is denied. (0x80070005).
Event id 4228
TCP/IP has chosen to restrict the scale factor due to a network condition. This could be related to a problem in a network device and will cause degraded throughput.
Event id 4321
The name "WHITEFOXPC :0" could not be registered on the interface with IP address 192.168.1.21. The computer with the IP address 192.168.1.19 did not allow the name to be claimed by this computer.
Event id 4373
The description for Event ID 4373 from source NtServicePack cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
Event id 4879
MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system WHITEFOXPC.
Event id 6000
The winlogon notification subscriber <GPClient> was unavailable to handle a notification event.
Event id 6006
The winlogon notification subscriber <TrustedInstaller> took 186 second(s) to handle the notification event (CreateSession).
Event id 7000
The Windows Audio service failed to start due to the following error:
A privilege that the service requires to function properly does not exist in the service account configuration. You may use the Services Microsoft Management Console (MMC) snap-in (services.msc) and the Local Security Settings MMC snap-in (secpol.msc) to view
the service configuration and the account configuration.
Event id 7001
The Computer Browser service depends on the Server service which failed to start because of the following error:
The dependency service or group failed to start.
Event id 7010
The index cannot be initialized.
Details:
The content index catalog is corrupt. (HRESULT : 0xc0041801) (0xc0041801)
Event id 7023
The Block Level Backup Engine Service service terminated with the following error:
%%-2147024713
Event id 7024
The Windows Search service terminated with service-specific error %%-1073473535.
Event id 7026
The following boot-start or system-start driver(s) failed to load:
aswKbd
aswRvrt
aswSnx
aswSP
aswTdi
aswVmm
discache
spldr
Wanarpv6
Event id 7030 & 7031
The dldw_device service is marked as an interactive service. However, the system is configured to not allow interactive services. This service may not function properly.
Event id 7032
The Service Control Manager tried to take a corrective action (Restart the service) after the unexpected termination of the Windows Installer service, but this action failed with the following error:
An instance of the service is already running.
Event id 7040
The search service has detected corrupted data files in the index {id=4700}. The service will attempt to automatically correct this problem by rebuilding the index.
Event id 7042
The Windows Search Service is being stopped because there is a problem with the indexer: The catalog is corrupt.
Details:
The content index catalog is corrupt. (HRESULT : 0xc0041801) (0xc0041801)
Event id 8210
An unspecified error occurred during System Restore: (Installed Java 7 Update 45). Additional information: 0x80070003.
Event id 9000
The Windows Search Service cannot open the Jet property store.
Details:
0x%08x (0xc0041800 - The content index database is corrupt. (HRESULT : 0xc0041800))
Event id 10005
DCOM got error "1084" attempting to start the service MSIServer with arguments "" in order to run the server:
{000C101C-0000-0000-C000-000000000046}
Event id 10010
15 of these with different server codes which I can't copy unless I copy all the details.
The server {3EEF301F-B596-4C0B-BD92-013BEAFCE793} did not register with DCOM within the required timeout.
Event id 12348
Volume Shadow Copy Service warning: VSS was denied access to the root of volume \\?\Volume{8e79517c-6c41-11e3-b621-cb03f0618d54}\. Denying administrators from accessing volume roots can cause many unexpected failures, and will prevent VSS from functioning
properly. Check security on the volume, and try the operation again.
Event id 15006
9 of these.
Description:
Owner of the log file or directory \SystemRoot\System32\LogFiles\HTTPERR\httperr1.log is invalid. This could be because another user has already created the log file or the directory.
Event id 31004
33 of tese.
The DNS proxy agent was unable to allocate 0 bytes of memory. This may indicate that the system is low on virtual memory, or that the memory manager has encountered an internal error.
The End.
Kimberly D. White-FoxPlease provide a copy of your System Information file. Type System Information in the Search Box above the start Button and press the ENTER key
(alternative is Select Start, All Programs, Accessories, System Tools, System Information). Select File, Export and give the file a name noting where it is located. The system creates a new System Information file each time system information is accessed.
You need to allow a minute or two for the file to be fully populated before exporting a copy. Please upload to your Sky Drive, share with everyone and post a link here. Please say if the report has been obtained in safe mode.
Please upload and share with everyone copies of your System and Application logs from your Event Viewer to your Sky Drive and post a link here.
To access the System log select Start, Control Panel, Administrative Tools, Event Viewer, from the list in the left side of the window select Windows
Logs and System. Place the cursor on System, select Action from the Menu and Save All Events as (the default evtx file type) and give the file a name. Do the same for the Applications log. Do not provide filtered files.
For help with Sky Drive see paragraph 9.3:
http://www.gerryscomputertips.co.uk/MicrosoftCommunity1.htm
Some Event Viewer reports are generated solely because the computer is in safe mode or safe mode with networking. You have at least one example of this in your long list. If you do not see the same report for a time when
the computer was in normal mode then it can be disregarded.
You will find some general advice on interpreting Event Viewer reports here:
http://www.gerryscomputertips.co.uk/syserrors5.htm
Hope this helps, Gerry -
Command or Canvas Events for Recording ?? Please Help..
Hi I am Abhijith I am a total newbie to the j2me world, And I am learning it now,
My project topic is "Bluetooth Walkie Talkie " , And I am trying my best and putting
all my efforts to code incrementally by learning , Before I could implement bluetooth,
I thought let me complete the recording The audio and playing part first,
The recording and playing of audio is working fine , But i would like to do it a real manner as Real Walkie talkie does, I want to record audio ONLY when the Key is being
pressed , and when its released it should exit the player hence saving the recorded file,
(Actually i dont want to save it in future,i would be sending the bytearray though the bluetooth , but for now , I want the Current module to be ready)
I tried my best searching online to implement my requirement but the couldnot find
such events I found Canva's KEYPRESS, KEYRELEASE , etc events but they dint not
serve my purpose, Let me clearly tell where I am stuck , After the midlet starts(by launching it) then i would like to press a key( keypressed say No 5) for certain
amount of time and the audio should be recorded only for the keypressed duration ,
after I release , it should stop recording and save as a wav file .
Whats happening is When i keep the key pressed , The midlet asks whether to allow
the recording , for this purpose when I release key the control is going out, and
i am not able to achieve the needed , I am posting the code here, Please Help me.
I am not asking for the complete spoon feeding or ready made code, But as a beginner
I need help from you all to learn and implement it.(at least it should satisfy me,i would feel i have learnt something then)
Here below is my code ( i AM using WTK 2.5 )
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.media.*;
import java.io.*;
import javax.microedition.media.control.*;
import java.util.*;
import javax.microedition.io.*;
import javax.microedition.io.file.*;
public class Key extends MIDlet{
private Display display;
private KeyCodeCanvas canvas;
public Key(){
display = Display.getDisplay(this);
canvas = new KeyCodeCanvas(this);
protected void startApp(){
display.setCurrent(canvas);
protected void pauseApp(){}
protected void destroyApp( boolean unconditional ){
notifyDestroyed();
class KeyCodeCanvas extends Canvas implements CommandListener{
private Command exit;
public StringItem message ;
private Player player;
private byte[] recordedAudioArray = null;
private String keyValue = null;
private Key midlet;
Thread t = null;
private String eventType = null;
public KeyCodeCanvas(Key midlet){
this.midlet = midlet;
exit = new Command("Exit", Command.EXIT, 1);
addCommand(exit);
setCommandListener(this);
protected void paint(Graphics g){
g.setColor(255, 0, 0);
g.fillRect(0, 0, getWidth(), getHeight());
if (keyValue != null){
g.setColor(0, 0, 255);
g.drawString(keyValue + eventType+message, getWidth() / 2, getHeight() / 2,
Graphics.TOP | Graphics.HCENTER);
public void commandAction(Command c, Displayable d){
String label = c.getLabel();
if(label.equals("Exit"))
midlet.destroyApp(true);
protected void keyPressed(int keyCode){
eventType = "pressed";
keyValue = getKeyName(keyCode);
repaint();
public void keyReleased(int keyCode)
try
eventType = "released";
keyValue = getKeyName(keyCode);
repaint();
catch (Exception e)
System.out.print(e);
public void keyRepeated(int keyCode)
eventType = "repeated";
keyValue = getKeyName(keyCode);
try
Thread t1 = new Thread()
public void run()
try
player = Manager.createPlayer("capture://audio?encoding=pcm");
player.realize();
RecordControl rc = (RecordControl)player.getControl("RecordControl");
ByteArrayOutputStream output = new ByteArrayOutputStream();
rc.setRecordStream(output);
rc.startRecord();
player.start();
eventType = "Recording";
message.setText("Recording...");
Thread.sleep(5000);
message.setText("Recording Done!");
rc.commit();
recordedAudioArray = output.toByteArray();
player.close();
catch (Exception e)
}; t1.start();
catch (Exception e)
repaint();
//Runnable r1 = new Runnable()
// public void run()
// try
// System.out.print(" here 1");
// message.setText(" here 1 ");
// player = Manager.createPlayer("capture://audio?encoding=pcm");
// player.realize();
// RecordControl rc = (RecordControl)player.getControl("RecordControl");
// ByteArrayOutputStream output = new ByteArrayOutputStream();
// rc.setRecordStream(output);
// rc.startRecord();
// player.start();
// eventType = "Recording";
// message.setText("Recording...");
// Thread.sleep(5000);
// message.setText("Recording Done!");
// rc.commit();
// recordedAudioArray = output.toByteArray();
// player.close();
// catch (Exception e)
}I am really sorry at the end I messed with the code and its altered a Lot, But hope the
logic Will is clear which is my requirement . I know the code for recording and
playing is not complete as said, i Messed around a working code and tried adding Canavs
for keyrepeat method,tried putting a thread around , AT last totally messed,
I tried working on this for two days but couldn't be successfull , Please Help me!!
The control goes out when midlet asks whether to allow recording ,
I thank you anticipation ...
-Abhijith RaoMidlet asking whether to allow the recording are typical permissions prompts specified by MIDP security policy. You need to sign the MIDlet and give it proper permissions.
Problems like this were discussed in an older thread at WTK forum: *[MIDlet keeps asking for permission.|http://forums.sun.com/thread.jspa?threadID=5347313]* According to one of the posters in the thread, +"...I got it to work on the emulator by setting the permission to 'manufacturer'. It runs smoothly without annoying questions..."+
If you're interested, check documentation and tutorials on MIDP security policy for more details.
For events to record audio only when the key is being pressed, consider GameCanvas API, method getKeyStates.
I am not certain though if doing it this way is a good idea. I doubt that phone users have same habits as those of walkie-talkies; for them it might be indeed more comfortable to use single simple key presses to start and finish recording. -
"Connect to iTunes to Use Push Notifications" comes almost in every app that I open and it does not notify me when I got message in Whatsapp and Viber. Please help me to overcome it, it is becoming quite annoying!
Did you get any help on this? From what I can see from surfing this site, it's a BUG that no one has offered a solution to. It sometimes happens after a 'reset' and going to ITunes does not offer a way to 'set up push notifications'.
-
Question: Inadvertently a visiting toddler gained access to my computer during a visit. He's obviously fiddled with something as I can no longer use my arrow keys to navigate through my albums or events on iPhoto. Only one pic shows up in the album view - I can't see any thumbnails. To see the other pics I have to use the scroll bar on the right hand side of the window. Please help!
Depeding on your version of iPhoto: On the left (iPhoto 11) or right (earlier versions) of the lower frame of the iPhoto Window you'll see a slider. Drag it left.
Regards
TD -
I am having major trouble trying to get photos into IPhoto. On my old macbook, I just had to hit the IPhoto button - I have hundreds of photos and events but now I have this MacPro when I hit the Iphoto button the photos just "disappear" into a document file on the dock and the photos are all contained in some kind of arcs....I'm not computer literate and spent 2 years in one on one just learning IPhoto Could some one out there please help me.?
What version of iPhoto are you using? Where are the photos coming from that go into the document on the Dock? What iPhoto button are you referring to?
OT
Maybe you are looking for
-
IPod not being recognised by iTunes or My Computer: How to Fix It
For anyone whose iPod is not being recognized by "iTunes," and does not show up in "My Computer," but does show up in "Device Manager," and in "Safely Remove Hardware." This is a problem with the program DAEMON Tools, which can only get on your compu
-
Back ground processing in Reports
I need to prepare a report, it contains Selection Screen. This report has to run in both foreground and in background. There is no option provided in selection screen to ideentify whether it runs in Foreground or in Background. In report I need to p
-
ST06 Disk I/O, clock speed of CPU's
Hello All, I want to know how to determine 1.Disk IO-Speed in GByte/h (maximum uncached read speed). 2.Clock speed of the CPU in Giga Hertz. 3. SPAM version(I have no access to SPAM transaction) The above 2 can be obtained from ST06, but can anybody
-
Unable to access Admin Console
Hi, I have installed Oracle Database11g and WebLogic 10.3.0 Application Server successfully in LINUX-64 bit environment. At the end of OIM server 9.1.0.1 it displays "The Oracle Identity Manager Application Server setup has some problem. Refer OIM_HO
-
I was told this problem is likely because of an update in coding which IE can read, but Firefox has yet to implement. Is this correct, and if so will it be rectified soon. I much prefer using Firefox than going between to the two search engines as I