NSArray of UIButtons calling the same function
I've been thinking and searching and I can't figure it out. I've come across these two threads which seem to be pieces of my issue:
http://discussions.apple.com/message.jspa?messageID=7891554
http://discussions.apple.com/thread.jspa?threadID=1985019&tstart=0
I'm basically attempting to create an array of 9 UIButtons which will all call the same function, but I need to know which button was clicked.
I'm not entirely sure how to create the NSArray of buttons, and when I include (id)sender with the selectSquare function, it doesn't work. Any help is much appreciated!
// Square a1
a1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[a1 setFrame:CGRectMake(0.0f, 0.0f, 70.0f, 70.0f)];
[a1 setBackgroundImage:[UIImage imageNamed:@"black.png"] forState:UIControlStateNormal];
[a1 setCenter:CGPointMake(60.0f, 200.0f)];
[a1 addTarget:self action:@selector(selectSquare) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:a1];
// I currently have the previous "a1" button code repeated 9 times, each
// with a different button name... I want to put all these in a single
// array instead
-(void) selectSquare:(id) sender {
if(turn == x) {
[sender setBackgroundImage:[UIImage imageNamed:@"x_button.png"] forState:UIControlStateNormal];
statusImage.image = [UIImage imageNamed:@"o_image.png"];
TicTacToe indeed!
The positions I have for my buttons seemed to be perfect when I tested them, so I just went with that vs. using IB.
As for the tag property, would it just be an int? Like:button1.tag = 5And then use the tag as that button's index in the array? So the button with tag 5 would be the 6th element?
Also, I'm still not sure on why -(void) selectSquare:(id) sender; doesn't work. When I click on "a1" (the current button with an action assigned to it), the simulator does nothing and then brings Xcode to the front... But when I take out (id)sender, it works fine.
In the second thread I posted, somebody mentioned something about unbinding and rebinding control actions to fix this, but I'm not too sure what that process entails.
Here is my interface for that controller:#import <UIKit/UIKit.h>
@interface TicTacToeViewController : UIViewController {
UIImageView *statusImage;
UIButton *playButton;
UIButton *a1;
UIButton *a2;
UIButton *a3;
UIButton *b1;
UIButton *b2;
UIButton *b3;
UIButton *c1;
UIButton *c2;
UIButton *c3;
//IBOutlet UILabel *gameText;
//IBOutlet UILabel *x_score;
//IBOutlet UILabel *o_score;
//IBOutlet UILabel *round;
NSInteger turn;
//NSInteger xscorevalue;
//NSInteger oscorevalue;
@property(nonatomic,retain) IBOutlet UIImageView *statusImage;
@property(nonatomic, retain) UIButton *playButton;
@property(nonatomic, retain) UIButton *a1;
@property(nonatomic, retain) UIButton *a2;
@property(nonatomic, retain) UIButton *a3;
@property(nonatomic, retain) UIButton *b1;
@property(nonatomic, retain) UIButton *b2;
@property(nonatomic, retain) UIButton *b3;
@property(nonatomic, retain) UIButton *c1;
@property(nonatomic, retain) UIButton *c2;
@property(nonatomic, retain) UIButton *c3;
//@property(nonatomic,retain) IBOutlet UILabel *gameText;
//@property(nonatomic,retain) IBOutlet UILabel *x_score;
//@property(nonatomic,retain) IBOutlet UILabel *o_score;
//@property(nonatomic,retain) IBOutlet UILabel *round;
@property(nonatomic) NSInteger turn;
//@property(nonatomic) NSInteger x_score;
//@property(nonatomic) NSInteger o_score;
//-(void)reset:(BOOL) newGame;
-(void) selectSquare:(id) sender;
@end
Similar Messages
-
Parallel run of the same function from multiple jobs
Hello, everyone!
I have a function which accepts a date range, reads invoices from a partitioned by date table and writes output to a partitioned by invoice table. Each invoice can have records only with one date, so both tables may have one invoice only in one partition, i.e. partitions do not overlap. Function commits after processing each date. The whole process was running about 6 hrs with 46 million records in source table.
We are expecting source table to grow over 150 million rows, so we decided to split it into 3 parallel jobs and each job will process 1/3 of dates, and, as a result, 1/3 of invoices.
So, we call this function from 3 concurrent UNIX jobs and each job passes its own range of dates.
What we noticed, is that even if we run 3 jobs concurrently, they do not run this way! When 1st job ends after 2 hrs of run, the number of commited rows in the target table is equal to the number of rows inserted by this job. When 2nd job ends after 4 hrs of run, the number of rows in the target table is equal the summary of two jobs. And the 3rd job ends only after 6 hrs.
So, instead of improving a process by splitting it into 3 parallel jobs we ended up having 3 jobs instead of one with the same 6 hrs until target table is loaded.
My question is - How to make it work? It looks like Oracle 11g is smart enough to recognize, that all 3 jobs are calling the same function and execute this function only once at the time. I.e. it looks like only one copy of the function is loaded into the memory at the same even if it called by 3 different sessions.
The function itself has a very complicated logic, does a lot of verifications by joining to another tables and we do not want to maintain 3 copies of the same code under different names. And beside this, the plan is that if with 150 mln rows we will have a performance problem, then split it to more concurrent jobs, for example 6 or 8 jobs. Obviously we do not want to maintain so many copies of the same code by copying this function into another names.
I was monitoring jobs by quering V$SESSION and V$SQLAREA ROWS_PROCESSED and EXECUTIONS and I can see, that each job has its own set of SID's (i.e. runs up to 8 parallel processes), but number of commited rows is always eqal to the number of rows from the 1st job, then 2nd+1st, etc. So, it looks like all processes of 2nd and 3rd jobs are waiting until 1st one is done.
Any ideas?OK, this is my SQL and results (some output columns are ommited as irrelevant)
SELECT
TRIM ( SESS.OSUSER ) "OSUser"
, TRIM ( SESS.USERNAME ) "OraUser"
, NVL(TRIM(SESS.SCHEMANAME),'------') "Schema"
, SESS.AUDSID "AudSID"
, SESS.SID "SID"
, TO_CHAR(SESS.LOGON_TIME,'HH24:MI:SS') "Sess Strt"
, SUBSTR(SQLAREA.FIRST_LOAD_TIME,12) "Tran Strt"
, NUMTODSINTERVAL((SYSDATE-TO_DATE(SQLAREA.FIRST_LOAD_TIME,'yyyy-mm-dd hh24:mi:ss')),'DAY') "Tran Time"
, SQLAREA.EXECUTIONS "Execs"
, TO_CHAR(SQLAREA.ROWS_PROCESSED,'999,999,999') "Rows"
, TO_CHAR(TRAN.USED_UREC,'999,999,999') "Undo Rec"
, TO_CHAR(TRAN.USED_UBLK,'999,999,999') "Undo Blks"
, SQLAREA.SORTS "Sorts"
, SQLAREA.FETCHES "Fetches"
, SQLAREA.LOADS "Loads"
, SQLAREA.PARSE_CALLS "Parse Calls"
, TRIM ( SESS.PROGRAM ) "Program"
, SESS.SERIAL# "Serial#"
, TRAN.STATUS "Status"
, SESS.STATE "State"
, SESS.EVENT "Event"
, SESS.P1TEXT||' '||SESS.P1 "P1"
, SESS.P2TEXT||' '||SESS.P2 "P2"
, SESS.P3TEXT||' '||SESS.P3 "P3"
, SESS.WAIT_CLASS "Wait Class"
, NUMTODSINTERVAL(SESS.WAIT_TIME_MICRO/1000000,'SECOND') "Wait Time"
, NUMTODSINTERVAL(SQLAREA.CONCURRENCY_WAIT_TIME/1000000,'SECOND') "Wait Concurr"
, NUMTODSINTERVAL(SQLAREA.CLUSTER_WAIT_TIME/1000000,'SECOND') "Wait Cluster"
, NUMTODSINTERVAL(SQLAREA.USER_IO_WAIT_TIME/1000000,'SECOND') "Wait I/O"
, SESS.ROW_WAIT_FILE# "Row Wait File"
, SESS.ROW_WAIT_OBJ# "Row Wait Obj"
, SESS.USER# "User#"
, SESS.OWNERID "OwnerID"
, SESS.SCHEMA# "Schema#"
, TRIM ( SESS.PROCESS ) "Process"
, NUMTODSINTERVAL(SQLAREA.CPU_TIME/1000000,'SECOND') "CPU Time"
, NUMTODSINTERVAL(SQLAREA.ELAPSED_TIME/1000000,'SECOND') "Elapsed Time"
, SQLAREA.DISK_READS "Disk Reads"
, SQLAREA.DIRECT_WRITES "Direct Writes"
, SQLAREA.BUFFER_GETS "Buffers"
, SQLAREA.SHARABLE_MEM "Sharable Memory"
, SQLAREA.PERSISTENT_MEM "Persistent Memory"
, SQLAREA.RUNTIME_MEM "RunTime Memory"
, TRIM ( SESS.MACHINE ) "Machine"
, TRIM ( SESS.TERMINAL ) "Terminal"
, TRIM ( SESS.TYPE ) "Type"
, SQLAREA.MODULE "Module"
, SESS.SERVICE_NAME "Service name"
FROM V$SESSION SESS
INNER JOIN V$SQLAREA SQLAREA
ON SESS.SQL_ADDRESS = SQLAREA.ADDRESS
and UPPER(SESS.STATUS) = 'ACTIVE'
LEFT JOIN V$TRANSACTION TRAN
ON TRAN.ADDR = SESS.TADDR
ORDER BY SESS.OSUSER
,SESS.USERNAME
,SESS.AUDSID
,NVL(SESS.SCHEMANAME,' ')
,SESS.SID
AudSID SID Sess Strt Tran Strt Tran Time Execs Rows Undo Rec Undo Blks Sorts Fetches Loads Parse Calls Status State Event P1 P2 P3 Wait Class Wait Time Wait Concurr Wait Cluster Wait I/O Row Wait File Row Wait Obj Process CPU Time Elapsed Time Disk Reads Direct Writes Buffers Sharable Memory Persistent Memory RunTime Memory
409585 272 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED SHORT TIME PX Deq: Execute Reply sleeptime/senderid 200 passes 2 0 Idle 0 0:0:0.436000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 7 21777 22739 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 203 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.9674000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 25 124730 4180 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 210 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.11714000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 24 124730 22854 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 231 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.4623000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 46 21451 4178 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 243 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED SHORT TIME PX qref latch function 154 sleeptime 13835058061074451432 qref 0 Other 0 0:0:0.4000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21451 3550 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 252 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.19815000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 49 21451 22860 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 273 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.11621000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 22 124730 4182 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 277 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 20 blocks 125 requests 125 User I/O 0 0:0:0.242651000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 39 21451 4184 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 283 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.2781000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 42 21451 3552 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 295 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.24424000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 40 21451 22862 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 311 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.15788000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 31 21451 22856 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 242 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED KNOWN TIME PX Deq: Execute Reply sleeptime/senderid 200 passes 1 0 Idle 0 0:0:0.522344000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 28 137723 22736 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 192 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.14334000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 31 21462 4202 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 222 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.16694000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 37 21462 4194 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 233 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.7731000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 44 21462 4198 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 253 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 21 blocks 125 requests 125 User I/O 0 0:0:0.792518000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 39 21462 4204 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 259 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.2961000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21462 4196 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 291 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.9548000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21462 4200 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 236 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Table Q Normal sleeptime/senderid 200 passes 2 0 Idle 0 0:0:0.91548000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 25 124870 22831 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 207 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Execution Msg sleeptime/senderid 268566527 passes 3 0 Idle 0 0:0:0.644662000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 43 21423 4208 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 241 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Execution Msg sleeptime/senderid 268566527 passes 3 0 Idle 0 0:0:0.644594000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 47 21423 4192 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 297 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 20 blocks 109 requests 109 User I/O 0 0:0:0.793261000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 12 21316 4206 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448Here I found one interesting query http://www.pythian.com/news/922/recent-spike-report-from-vactive_session_history-ash/
But it does not help me -
How do you call the same parameters from function to function
I need to create several functions to try and consolidate and clear up readability in my program and I need to call the same things in all the functions. How do I do that without writing everything I need to call in each function?
Yeah . . that's pretty much right on base. Except this is how I did it and it doesn't quite work the way I thought.
This first bit is what I wrote to replace the redundant code
class Header // this class is all the declaration stuff for the events
{ public void Header()
{ SerialRead s;
String serialString;
int newline1,newline2;
String line1,line2,line3,linetmp;
String spindle,torque1,torque2,torque3,angle1,angle2,angle3;
int tval1 = Integer.parseInt(torque1);
int tval2 = Integer.parseInt(torque2);
int tval3 = Integer.parseInt(torque3);
int aval1 = Integer.parseInt(angle1);
int aval2 = Integer.parseInt(angle2);
int aval3 = Integer.parseInt(angle3);
}This is how I thought it should be implemented
class AcceptPass1 extends Header implements ActionListener{
public void actionPerformed(ActionEvent e){
s=new SerialRead();
s.findPort();
waitForSerial=true;
s.openConnection();
blank_l1.setText("Waiting for data from Pass #2");
while(waitForSerial){
blank_l1.setText("Data Received. Please verify data!");
s.closeConnection();
serialString=serialBuffer.toString();
line1=serialString.substring(0);
linetmp=serialString.substring((serialString.indexOf("ZZZ") + 3));
line2=linetmp.substring(0);
line3=linetmp.substring(linetmp.indexOf("ZZZ") + 3); -
IPhone SDK - Multiple buttons calling the same IBAction
Hi,
Can I call the same action with multiple buttons? I´ve just connected
the action to the buttons in interface builder, but in the header file
I can´t use - (IBAction)setOperator: (id)sender; as the parameter to the function, it always crash due to uncaught exception. If I use - (IBAction)setOperator; it
works, but i can´t differentiate wich button was pressed.
I don´t know if i can set the (id)sender parameter in the interface
builder. Can anyone help me?
Thanks,
Pitteri.h file:
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface CalculatorView : UIView {
IBOutlet UITextField *txtResult;
IBOutlet UIButton *btnMult;
IBOutlet UIButton *btnDiv;
@property (nonatomic, retain) UITextField *txtResult;
@property (nonatomic, retain) UIButton *btnMult;
@property (nonatomic, retain) UIButton *btnDiv;
- (IBAction)setOperator:(id)sender;
@end
.m file:
#import "CalculatorView.h"
@implementation CalculatorView
@synthesize btnDiv, btnMult, txtResult;
- (IBAction)setOperator:(id)sender{
//if btnMult pressed
//bla bla bla
//if btnDiv pressed
//bla bla bla
that´s my code. Hope u can help.
thanks
@end -
I want to call the WinAPI function-animatewindow in user32.dll to produce some special effect when showing or hidding windows, but i don't know how to using this Win API to achieve my purpose?
Does anyone have an example VI about this application?
Thanks in advance for your help.You have to use the Call Library Function Node to call Windows API functions. The animatewindow function itself has some pretty simple parameters. You first need to get the window handle. There are a set of Windows API Function Utilities (32-bit) for LabVIEW that you can use. In there there is a VI (Get Window Refnum) that gets the window handle. It's a simple call to a Windows API function. You would call the animatewindow function in the same way. In this case there are 3 parameters: the window handle (returned by a FindWindow API call), a DWORD (32-bit integer) for the duration, and another DWORD for the flags.
-
Calling the same controller in Weblogic portal 10.3.2
In weblogic 8.1 calling the same controller instance (different action) is very simple.... just pass on the jpfScopeId in the request parameter as per the code below
function openActionInNewWindow(index){
<%
PortletPresentationContext ppc = PortletPresentationContext.getPortletPresentationContext(request);
String jpfScopeId = ppc.getInstanceLabel();
%>
url = "/someApp/portlets/somePath/someAction.do?index="+index;
url += '&jpfScopeID='+'<%=jpfScopeId%>';
alert(url);
extWindow = window.open(url, 'second', 'title=Breaking News,width=650, height=300,toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no,resizable=yes');
extWindow.focus();
How do we do the same in Weblogic portal 10.3.2? I tried the above code but its invoking a new instance of the controller. I want to call the same controller instance as some instance variables in the controller are being used across different actions.No, there isn't problem show in log. I don't know why... Please suggest me or help me.
Thanks in advance!
Best Regards,
Coy. -
JNI : Two native libraries with the same functions
Hello,
I have two versions of the same native library like "abc_v1.sl" and "abc_v2.sl".
They have the same functions but they act differently.
I want to use both of them in parallel (each in its own thread) but only the functions of the first loaded library are being called.
Isn't there any possibility to load each native library in a different name space... maybe a different JVM?
Any help will be appriciated.
Thank you!Isn't there any possibility to load each native library in a different name space... maybe a different JVM?Naturally if you have different processes (different VMs) then each can load a different version.
This might actually be easier to do. Especially if you think that you are going to be adding more versions. It would require that you implement a communication api from each of thes to your main application.
If you want to do it in in a single process then you have some work to do in C. It has nothing to do with java or JNI.
Basically you need to dynamically load each library and the create a thunk to each method you want to access. Where 'thunk' represents a dynamic descriptor that allows you to dynamically call the method.
What you are doing now is statically loading the libraries. So that won't work.
You can search on your platform/compiler for examples on how to do that. -
I have a database of names. When I go to the database and pull up names I right click on the option "Open in new tab". I would like to bring up 200 names and do the same function simultaaneously to them like, add a vote to their total individual vote count. Is this possible?
I ended up reformating the drive as FAT32 because I still need to use it on my Windows 98SE system also. I did have a problem with the allocation size. I wanted to use 512 bytes but it kept failing so I used the default size(8192 bytes) and then it worked fine. I didn't think there would be a problem formatting as NTFS but since you are having problems I just tried it. It failed at 512 bytes allocation size so I tried again using 4096 bytes, the default, as the allocation size and it failed again. It looks like these drives will not format as NTFS.
Also, I think I figured out what's going on with the ReadyBoost problem. As I said initially it wouldn't work with ReadyBoost then after I had 12GB of data on the drive the ReadyBoost feature started working. After I deleted all the files it quit working again. After doing some reading on the net about Flash drives and ReadyBoost problems it appears that the memory chips on my Lenovo Flash drive are mixed with both fast memory chips that work fine with ReadyBoost and slower memory chips that are too slow for ReadyBoost. Apparently, after I fill up the portion of memory with data that uses the slow chip(s) then ReadyBoost works fine with the fast chip(s). I also verified the Flash drives read and write memory speeds using Vista's Event Viewer. To work with ReadyBoost the Flash drive has to read at a minimum of 2.5MB/s (for 4KB random reads) and write at a minimum of 1.75MB/s (for 512KB random writes).
Let me know what you find out. -
Where should i call the rfc function module? in xi or in r/3
where should i call the rfc function module?
for the synch scenario: file < -- > xi <---> rfc
i know the type of rfc is tcp/ip; but i'm not sure with the followings,
and with some trials i can not even see any message via rwb even all the setting
can be activated without errors.
where should i create the rfc destination? in r/3 or xi
where should i call the rfc via abap program? in r/3 or xi
i guess the calling program should belong to the different server with the rfc itself....
so confused....
Thanks for your reply!!
Junif i create the destination in xi point to r/3, then i call the rfc use the destination in r/3 right ?
The call doesnt use the destination in R3. XI has the RFC destination which is just used to connect to the R3 system
but where i need to create the fm via se37? in xi or r/3 ?
In R3
Regards,
Prateek -
The actions panel is perfect at what it does; however, if you have a few action sets and, in order to eliminate scrolling, you need to expand them into a double row of buttons, it quickly becomes difficult to maintain. As soon as you delete an action or add an action to it, it disorders the others and you have to reorganize again, which becomes a vicious cycle. I like to keep things organised and neat with all that I do and pretty much the only way to have this feature is to expand it on the back end of the software or, if possible, create a script that loads a second Actions panel with the same functionality as the first but completely independent from it. I assume that the SDK will not allow us to expand on the software in this particular way, as Photoshop is not open source; however, maybe this suggestion will be taken into account for future updates or versions since I have yet to find a suitable way to do this.
Thank you in advance.
Kind regardsThat would depend on the links on the page. Some pages have links that refer to different areas on the same page. If you want to force a link to open in a new tab, you can middle-click it.
-
Help in Calling the C Functions in ECC 6.0
Hi All,
We are in process of Upgrading from 4.6C to ECC 6.0.
There is a particular report which calls the C function 'C_DIR_READ_NEXT' .
In this the Parameter " ID 'TYPE' FIELD FILE-TYPE" is showing as (???)not getting the file type in ECC 6.0 where as in 4.6C it was working fine.
Can any body please tell me why this so and is there any other C function which i can use in the place of this .
Awaiting a favourable reply
wih rgds
A.K.Ranjith SinghHi Ranith,
i know there is a new authotity-Object S_C_FUNCT included in this Function.
Look at Note 766771.
If you search in OSS with C_DIR_READ_NEXT, there are some Notes too.
Hope it helps.
Regards, Dieter
You cal also look in RSWATCH0 (AL11) the use of this FM.
Regards, Dieter
Message was edited by:
Dieter Gröhn -
Error in calling the Remote Function Module
Hi all,
I am trying to call the Remote function Module which is in CRM from ECC .
But we are not able to detect the function module as it is showing the error as Function Module not found.
Can anybody help us in calling the Remote Function Module .
Regards,
MadhaviPlease check the foll 2 things :
RFC radio button clicked in se37 for that FM
RFC connection established with the remote server in SM59
Thanks -
Vhd has the sama function as virtual machine or hyper-v in windows 8
hi,
is VHD has the same function as hyper-v or virtual machine. if yes then I can make virtual machine from windows 7 home premium if the hardware support it.
thanks
johan
h.davidAll VHDs are Virtual Machines and have the same function since they emulate a hardware environment, but they are not compatible between the different VM software. They each have their own structure and are not directly compatible. There are utilities
that can be found on the internet that claim to export or import VMs from varies different VM software.
Windows 7 XP Mode and Virtual PC use the same structure, but Hyper-V is a different structure.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” -
Multiple calls of same function module do NOT initialize variables ?
Hi all,
..so its my fist post here, this is a bit strange problem for me and maybe someone knows whats happening.
So I have in SAP Solution Manager a function module 'Z', which calls a standard SAP class CL_SPROJECT_SOLAR_BASE_REPORT, which in turn calls the standard function module 'SPROJECT_GET_ADMIMP_SCREEN_BP'.
During development, things worked fine, but now I run my Z-Program for more than one instance and even I do all FREE for the Class, apperently the function module SPROJECT_GET_ADMIMP_SCREEN_BP, which is called by the class CL_SPROJECT_SOLAR_BASE_REPORT, does not get it's variables from the global data of the function pool re-initialized, when it is called for the second, 3rd, ... time.
This is a bit strane behavior for me, I would have expected that variables in a function module (or even in the global data of that function pool) get re-initialized each time that function module is called ?
Actually, this is the only function in that function pool.
Well, if not, does anyone has an idea how I can get the variables of this module pool re-initialized between the calls ? More concrete, the global data of function pool SAPLSPROJECT_SOLAR_ADMEVAL_BP define:
DATA: g_v_with_var TYPE char1.
In the function module line 36 (no reference to g_v_with_var, no module call, no changes to g_v_with_var before the IF-statement at all) it is querying:
IF g_v_with_var IS INITIAL.
So this is my problem, the second time I am calling the class (which is 'free'ed and re-created between the calls) which calls this function module the 'g_v_with_var' is not initial and there seems to be no way to have it set to initial again ?
So even thought this is in SolMan, I think the question & problem is a ABAP technical one ?
Any thoughts, help or support would be very much appreciated,
thank so much,
FrankHi Mae,
..thanks a lot for your fast reply, unfortunately there is only one function and no functions or forms at all for initializing. The variable I am fighting with is g_v_with_var and that is referenced only 4 times in the whole function pool:
Global Data: 101 DATA: g_v_with_var TYPE char1.
Function Module SPROJECT_GET_ADMIMP_SCREEN_BP (which is the only function module):
36 IF g_v_with_var IS INITIAL.
127 g_v_with_var = airep_true.
193 CLEAR g_v_with_var.
If in line 36 g_v_with_var is 'X', which it is always after the first call, the function will exit with an exception, so line 193 to clear it will actually never be executed...and it is not cleared the next time the function module is called, so you never get back to have the function run...
All the best,
Frank -
Help Calling the same vi after one button dialog
hi need help aftr the the one dialog appears how to call the same vi again need help
Message Edited by jeyanthi on 05-22-2008 10:13 PM
Attachments:
StationNumberEWS.vi 43 KBWhy did you start a new thread? continue here
Message Edited by MikeS81 on 05-23-2008 09:15 AM
Maybe you are looking for
-
How can I delete automatically all double photos in the library of iPhoto? jos vdp
How can I delete automatically all double photos in the library of iPhoto? jos vdp
-
Its possible to change the state of a final object . What is the idea behind this .. ? I am disturbed by this fact ..can any one tell me why? public class FinalTest public static void main(String args[]) final MyFinal a = new MyFinal()
-
HT1178 How do I encrypt my Time Capsule hard drive?
I would like to secure my Time Capsule hard drive. How do i go about encrypting it?
-
I have to say that I am very dissapointed in Apple right now. My Ipad 2 stopped workign recently and since i paid for apple care, I sent it in to get repaired. When they recieved it I got an email stating that it could not be fixed. When I called the
-
Interface Diadem with Bessler Camera
Dear NI I ahve a bessler Network camera which can take the pictures and send it to the network using ethernet interface I can see it in pylon viewer . I want to know that in Diadem can I interface the real camera and analyze it on real time ? Threre