How to use Synchronized method when creating our own controls
I don't know how to use the synchronized method when creating our own activex like controls to speed up the application.
[url http://java.sun.com/docs/books/tutorial/essential/threads/multithreaded.html] here you go
Similar Messages
-
How to use NewObjectArray method to create an array?
This is my code:
#include <jni.h>
JNIEXPORT void JNICALL test(JNIEnv *env,jclass jcls)
jobjectArray array=(env)->NewObjectArray(10,jcls,NULL);
}I use g++ compiler got this error:
test.cpp: In function `void test(JNIEnv, __jclass*)':*
test.cpp:5: invalid conversion from `__jarray' to `__jobjectArray*'*
Why?I don't know why you're getting this error (VC++ and gcc are both fine for me with the Java 1.6 includes), but I do notice that some of the Sun documentation explicitly casts the result of NewObjectArray:
ret= (jobjectArray)env->NewObjectArray(5,
env->FindClass("java/lang/String"),
env->NewStringUTF(""));
From: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jnistring.html
Does your function work correctly after a class cast? Which JVM version are you using? -
How to use ipod touch when I already own an iphone on one computer?
I have a dilemma. when I try to setup my brand new ipod touch I got for xmas, it says i must setup it up as new device or restore from backup. the problem is I use this computer to sync to my iphone 3gs.
itunes wont let me sync to an ipod touch and an iphone on the same computer, its one or the other.
if i choose to setup as new device, then when I sync my iphone it says itunes is synced to another device and must wipe my iphone clean or restore from backup???
how do i use itunes so I can put movies n music on my ipod touch without it affecting my iphone?"Note: iTunes for Windows does not support syncing multiple iPod devices at the same time."
exactly what do they mean when they say at same time? like i can not connect one device, sync it then connect another device and sync that one??
hence my dilemma. this is from that link i read.
i tried this and itunes fails
what a terrible dilemma, sigh
i connect the ipod touch and tell it to setup as new device.
i sync some movies and playlists.
easy enough
then i connect my iphone...guess what? it says this is a new device, would you like to setup as new or restore from backup!!!
if i restore from backup it puts the ipod touch playlists and all my contacts are gone
it seems the only way to do this is, from reading that link, to create a new user in windows, and use this new user profile to manage ipod touch.
so now i'm gonna have to siwtch back and forth between 2 windows accounts.
what a royal pain in the butt
why can't itunes just let me sync what i want to the device and not care what it has, so i can just add regardless if new or not.
god i hate itunes.
Message was edited by: ninja_pimp -
How to add multiple table when creating add on using b1de
Hi all,
Plz help me
How to add multiple table when creating add on using b1de.
ThanksHi dns_sap,
Can you explain a little better what you are trying to accomplish? Is it to create UserTables and UserFields in the database, when the addon runs the first time?
If so, you can use the following code
Add User Table
Try
Dim lRetCode As Long
Dim oUDT As SAPbobsCOM.UserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
oUDT.TableName = TableName
oUDT.TableDescription = TableDescription
oUDT.TableType = TableType
lRetCode = oUDT.Add
'// Check for error when adding the Table: if lRetCode = 0 the table was created; if lRetCode = -2035 the table already exisits
If lRetCode <> 0 Then
oApplication.MessageBox("Error: " & lRetCode.ToString & ", " & oCompany.GetLastErrorDescription)
End If
Catch ex As Exception
oApplication.MessageBox(oCompany.GetLastErrorDescription)
Finally
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDT)
oUDT = Nothing
lRetCode = Nothing
GC.Collect()
End Try
Add User Field
Try
Dim lRetCode As Long
Dim oUDF As SAPbobsCOM.UserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUDF.TableName = TableName
oUDF.Name = FieldName
oUDF.Description = FieldDescription
oUDF.Type = FieldType
lRetCode = oUDF.Add
'// Check for error when adding the field: if lRetCode = 0 the field was created; if lRetCode = -2035, the field already exists
If lRetCode <> 0 Then
oApplication.MessageBox("Error: " & oCompany.GetLastErrorCode & ", " & oCompany.GetLastErrorDescription)
End If
Catch ex As Exception
oApplication.MessageBox(oCompany.GetLastErrorDescription)
Finally
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDF)
oUDF = Nothing
lRetCode = Nothing
GC.Collect()
End Try
Regards,
Vítor Vieira -
How to use the method for field-exit to trigger the workflow?
Dear all,
I want the workflow to trigger , when ever the check box for DELIVERY COMPLETED is checked in ME22N .
I have developed a method in SE18 for the corresponding field and defined function module SWE_EVENT_CREATE with BOR bus2012 and event CHANGED.
Now how to use this method to make my workflow to trigger?Shall I create an event in delegated bus2012 and can I call this method?
Thanks and regards,
S.SureshHi
You want to place your method which is defined for particular filed.right?
For that you can go for BADI. First you check whether any badi is getting called form that tcode ME22N. Then to place your method, implement that BADI. So whenever that BADI is getting called, it will call your event. Through Event workflow will be getting triggered.
Regards,
Hemalatha. -
How to register the recipient when create job by function
I am now use JOB_OPEN , JOB_SUBMIT and JOB_CLOSE to create a job in the program. And need to post the result of the report to the person by email.
Can you tell me how to register the recipient when create the job.
( in sm36, it is easily to do but how to do in coding? )
regards,
slamHi
I think in Back ground using the above fun modules you can't send a mail to the receipient.
see the use of the above fun modules;
IF p_bjob = 'X'.
CONCATENATE sy-cprog sy-datum sy-uzeit
INTO jobname SEPARATED BY '_'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING
out_archive_parameters = arc_params
out_parameters = print_params
valid = valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF valid = chk.
SUBMIT ybrep
WITH < sel Screen>
AND RETURN
USER sy-uname
VIA JOB jobname
NUMBER jobcount
TO SAP-SPOOL
SPOOL PARAMETERS print_params
ARCHIVE PARAMETERS arc_params
WITHOUT SPOOL DYNPRO.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount
jobname = jobname
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE i029 WITH jobname.
ENDIF.
ELSE.
MESSAGE s000 WITH text-003.
STOP.
ENDIF.
ENDIF.
Reward points if useful
Regards
Anji -
My wife and I have shared one iTunes account for 6 years. We want to create our own Apple IDs, so when we sync to our new iMac we won't see each others contacts, photos, calendar, music, etc. Is there a way to move music/apps from one ID to a new ID?
JoeyV325 wrote:
Is there a way to move music/apps from one ID to a new ID?
No.
One of you create a new AppleID and one use the existing AppleID.
But you can still use the items in each iTunes library.
Create separate computer logins for each of you.
This will give you each your own data. Contacts, calendars, photos, etc. (and your own iTunes library). -
How to use protected method in jsp code
Could anyone tell me how to use protected method in jsp code ...
I declare a Calendar class , and I want to use the isTimeSet method ,
But if I write the code as follows ..
========================================================
<%
Calendar create_date = Calendar.getInstance();
if (create_date.isTimeSet) System.out.println("true");
%>
============================================================
when I run this jsp , it appears the error wirtten "isTimeSet has protected access in java.util.Calendar"The only way to access a protected variable is to subclass.
MyCalendar extends Calendar
but I doubt you need to do this. If you only want to tell if a Calendar object has a time associated with it, try using
cal.isSet( Calendar.HOUR ); -
How to use getContent() method in custom JSP Provider to display a HTML Pag
Hi,
If anybody knows how to use getContent() method to use in custom jsp providers (developed by ourselves) so that it can be used to retrieve a jsp page (a simple html page) ..
I want the code in the provider java file to for the getContent method...
Pls. get back to me asap....if any body has implemented a custom jsp provider...as it's urgent...
I have alreday placed the JSP file in the directory structure /etc/opt/SUNWps/desktop/default/channel_dir..But still the jsp is not being displayed..
Pls get me the getContent() method code to retrive the JSP file..
satyabrataHi,
You don't have to do anything in the custom JSPProvider's getContent method except the call { return super.getContent(request,response); } . If all you want is just to show your jsp, then create a channel from the default JSPProvider, and edit the property contentPage of that channel from samplecontent.jsp to your jsp name, save the changes and login again. You should see your JSP.
Sanjeev. -
How to use protected method of a class in application
Hi,
will u please tell me how to use protected method of class in application. (class:cl_gui_textcontrol, method:limit_text)
Thanks in advance,
Praba.Hi Prabha,
You can set the maximum number of characters in a textedit control in the CREATE OBJECT statement itself.
Just see the first parameter in the method . I mean MAX_NUMBER_CHARS. Just set that value to the required number.
Eg:
data: edit type ref to CL_GUI_TEXTEDIT.
create object edit
exporting
MAX_NUMBER_CHARS = 10
STYLE = 0
WORDWRAP_MODE = WORDWRAP_AT_WINDOWBORDER
WORDWRAP_POSITION = -1
WORDWRAP_TO_LINEBREAK_MODE = FALSE
FILEDROP_MODE = DROPFILE_EVENT_OFF
parent = OBJ_CUSTOM_CONTAINER
LIFETIME =
NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
GUI_TYPE_NOT_SUPPORTED = 5
others = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
In this case, the max: number of characters will be set to 10.
I hope your query is solved.
Regards,
SP. -
How to use " toFront() " method in java application and in which package or
How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.
The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
To use it in a Java application, create an object x of either of those two classes and write "x.toFront();". -
How to use getTaskId() method in xpress language.
how to use getTaskId() method in xpress language.
Edited by: negiqueries on Jan 19, 2009 10:37 PMThe API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
To use it in a Java application, create an object x of either of those two classes and write "x.toFront();". -
Interface/Method question (how to use the method insert_table)
Hi people!
I'm working with DOI (desktop office integration).
So far I've been able to reflect flat variables from my ABAP program into a Word Doc, but when it comes to internal tables I'm not sure how to achieve this.....
I find out in the interface i_oi_word_processor_document the method insert_table, but I can't find a single simple example on how to use it....
If no one knows how to use this method, does anyone know how to reflect an internal table fron my program into a Word Doc by another mean?
Thanks in advance!!!
Regards,
LauraHi Laura
If you want you can use direct OLE calls. For this, you can refer to the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c">"An Easy Reference For OLE Automation"</a> published at SDN.
Kind Regards
*--Serdar
[email protected] -
How to use Aggregations Method generated by WIZARD
Hi All,
I used ABAP wizard to develop I report.
This wizard generated one class and method as below
zcl_bt_alv_template=>factory(
exporting im_syrepid = sy-repid
im_lheader = gv_title
im_allowls = abap_true " Allow layout save
importing ex_alvo = r_alv_template
changing ch_datatab = it_efficiency ).
Inside this Factory Method there is one method for aggregations.
ex_alvo->r_aggregations = ex_alvo->r_table->get_aggregations( ).
How to use this Method for getting aggregations for some fields.
Thanks,
Prasad.Hi Patel,
I am getting DUMP for this.
Its saying Access via 'NULL' object reference not possible.
Patel when I am double clicking the
aggregation = if_salv_c_aggregation=>total
This if_salv_c_aggregation is not having any methods.
So may be the dump is coming.
The dump is
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: "R_AGGREGATIONS").
Thanks,
Prasad.
Edited by: Dheeru Prasad on Aug 6, 2009 3:36 PM
Edited by: Dheeru Prasad on Aug 6, 2009 3:39 PM
Edited by: Dheeru Prasad on Aug 6, 2009 3:40 PM -
How to use isLast() method of Resultset ??
When I use the isLast() method of Result, there is following error
java.lang.AbstractMethodError
What should I do ? and how to use isLast() method ?
Thanks a lot :-)Really need your help, thanks again
Maybe you are looking for
-
Can I reset my icloud storage?
Can I reset my icloud storage and start over using the same Apple id???
-
How to identify that the call to a BAdI is coming from SAPGUI
Hi All, In the current project involving SAPCRM 5.0 (both GUI and PCUI), we need to display a pop-up asking the user whether he would like to go ahead with the changes in both GUI and PCUI. The function module 'Popup-to-confirm' was used in a BAdI i
-
Restricting order quantity in Sales Order
Hi Folks I have a requirement that my material can only be ordered in multiples of 5 KG, 15 KG and 25 KG. Could you suggest how can i control the ordered quantity in sales order ? is there a standard way in SAP to do it or does it require customizat
-
I am having intermittent issues using Apex 3.0 responding through XML_DB. It responds correctly for a period of time (2-3 hours) while other times returns a HTML 404: The requested URL /apex/f was not found on this server I am using the internal XML_
-
I have DVCPRO HD 720p60 selected for my timeline in FCP. My footage is also DVCPRO HD 720p60. Frame size, Compressor and Pixel aspect between my sequence and the clips match. I can export an m2v just fine. When I export a quicktime 7, H.264 300kbs fi