Function vs Handler
Hello,
I am developing a simple game that among other things, needs
to accept user names for an indefinite amount of players. I have
everything working how I'd like except that, for example when the
user inputs their name they can click "add player" button, or
choose to press enter. For whatever reason, both of these actions
(key down for text box, and mouseUp for button) call the same
function. However, I seem to have to have this function on both the
textBox and on the button. Long story short, how / where do you
define a global function? I tried on the first frame of my movie
where other global variables are initialized, but that just returns
an error that the mouseUp or keydown don't know where the handler
is. Appreciate the help in advance.
-Pete
Hi Pete,
it sounds like you missed out when movieScripts were
mentioned :)
Create a script with Ctrl-Shift-U and place the 'global'
function/handler in there.
Creating a script with that key-combo makes the script a
moviescript.
Any other script can be converted to a movieScript through
the script
tab in the property inspector and the 'Type:' pulldown there.
That script can remain in the cast (it can't even be placed
in the
score) for it to work. All behaviors that don't have that
specific
function/handler-name in their own script will look in
moviescripts if
it can be found there. (and now they will)
HTH,
Manno
Dread Pirate Pete wrote:
> Hello,
>
> I am developing a simple game that among other things,
needs to accept user
> names for an indefinite amount of players. I have
everything working how I'd
> like except that, for example when the user inputs their
name they can click
> "add player" button, or choose to press enter. For
whatever reason, both of
> these actions (key down for text box, and mouseUp for
button) call the same
> function. However, I seem to have to have this function
on both the textBox and
> on the button. Long story short, how / where do you
define a global function? I
> tried on the first frame of my movie where other global
variables are
> initialized, but that just returns an error that the
mouseUp or keydown don't
> know where the handler is. Appreciate the help in
advance.
>
> -Pete
>
Manno Bult
http://www.aloft.nl
Similar Messages
-
Do we have any functionality to handle stale cheques in sap
Dear Guru's,
I need the functionality to handle stale cheques in sap. If any configuration is required then plz let me know, it's urgent.
Thanks in Advance,
KishoreHi,
You have to void cheques individually.
What we are doing is that we have done a Z program calling FCH9 and created a BDC for mass void
in selection you give the date range so that you can choose a date prior to six months.
Get the help of an ABAPer
Assign points if useful
Sunoj -
Functionality to handle JAVA Export and Imports in ChaRM covered under SP15
Hi All,
Is the highly expected functionality of handling change request management for Java based systems (Export-Import for the Java transports) is covered under the Support pack 15 of SOLMAN4.0?
If anyone has any information regarding please share.
Regards,
KathirDon't believe this is possible without a manual process linked to it.
The only solution I see for now is that you first only release the TR that need to go to your follow-up system, import them, then perform the manual actions and then release the subsequent TRs, etc...
Same issue is popping-up when using XI Transports, as each TR has a Change List that needs to be activated. If two TRs within the same maintenance cycle contain the same object, the second TR will fail because the change list for that object is not yet activated. A manual process can solve the issue. At our project, we introduced a new user status for this.
Best regards,
Roel -
Callback functions to handle events for a specific system build block
I have two questions about customized event handling in Systembuild:
1- The SystemBuild Utility "sysbldEvent" can bo used to specify additional actions for the "openblock" and "navigate" events. However, it will be applied to all systembuild blocks.
Is there a way to limit its scope to a specific block or block type?
This has been done for the Altia block (which is a customized UCB block) - a double-click will open a special dialog box. Is this feature implemented using publicly available systembuild features or there are other special features used?
2- Is there any way to assign callbacks to other type of block events: copy, paste, etc ...
Thanks.Farshid,
There are a couple of options for creating custom dialogs/blocks.
SysbldEvent can be used. As you noted it will generate and event for all the blocks. You can not generate an event only for a specific block. However the Xmath function has two values sent to it. One is the type of event (blockopen or navigate) and the blockId. You can use blockId together with SBA commands to find out which block generated the event. If it is a block that you are not interested in then return 0 and SystemBuild opens the normal dialog. If it is the right block then you can open your own dialog or perform what ever action is needed. Finally return a 0 if you want SystemBuild to still open the normal dialog, or you can return 1 and no dialog is opened.
The Altia
block is a custom block. It is a standard UserCode block that has been customized to have differnt default parameters and different icon. In the SystemBuild editor (not catalog browser) select a block and the go to Edit>New Custom Block. The custom block can a have a MathScript function associated with it that gets called when the block is created. For more information on custom blocks see chapter 18 of the SystemBuild Users Guide (Help>Search MATRIXx Bookshelf from Xmath).
The final method is creating a component. For a component percent vars can remain internal or they can be available to the user. You can also provide a different set of parameters that are available to the user, and then provide equations for how they map to the internal percent vars. Information on Components is in Chapter 17 of the SystemBuild User's Guide.
Carl L
National Instruments -
Window API Function CreateEvent Handle and LabVIEW
I have a frame grabber that uses the Windows CreateEvent function to create an event handle. This event is triggered when
a frame has been acquired and ready to be processed. Is it possible to respond to this triggered event within LabVIEW?
Any help would be greatly appreciated.If you have the event handle, you can use a call library node to call the WaitForSingleObject function in kernel32.dll. This will block until the event is set.
-
Need a query/function to handle subsidiaries in a company tree
Hi, not sure this is the right forum category but here you go:
I have a holding tree with more than 200 companies, and several layers. Each company is defined by:
- a unique ID
- a direct parent ID --> the company immediately above in the tree
- an ultimate parent ID --> the company that owns the entire tree, it is the same for all
Now I am looking for a function that returns the list of all companies below a given one in the tree, and there could be several layers underneath. Doing that for the ultimate parent is easy because all companies now who their ultimate parent is, but I am
struggling to build a function that works for an intermediary parent in a dynamic way.
I am sure I am not the first one trying to solve this problem ;-)
Thanks for your tips.Thanks a lot Erland. I have a follow up question. I have translated the above query to my context to use my own attributes and to include the time validity of the records as well. So the query is 100% accurate when I run it for intermediary parents, but
when I run it for the ultimate parent there is an issue. I would expect to get the entire tree once, but instead it gets returned many many times until it stops with the following error:
Msg 530, Level 16, State 1, Line 1
The statement terminated. The maximum recursion 100 has been exhausted before statement completion.
Any idea why?
WITH rekurs AS (
SELECT org.customer_shortname, org.customer_nr
FROM t_customer_sre org
WHERE org.customer_nr = 2002038126
and getdate() between start_validity_date and end_validity_date
UNION ALL
SELECT org.customer_shortname, org.customer_nr
FROM rekurs r
JOIN t_customer_sre org ON r.customer_nr = org.global_customer
and getdate() between start_validity_date and end_validity_date
SELECT customer_shortname, customer_nr
FROM rekurs -
Issue while handling the functional ack(CONTRL) through B2B
Hi,
My requirement is to handle the incoming CONTRL message through B2B and send the data to SOA/AIA application and update the CONTRL data in table. For that i have done the following settings in oracle B2B.
Functional Ack handled automatically : false
Functional Ack internal properties : false
Notify Inbound Receipt Acks : false
Notify Inbound Functional Acks : false
I am able to update the data successfully in the table for the successful scenarios. But if the transaction is failed in SOA/AIA application due to some error then it is creating 2 entries of MSG_ERROR in reports tab in B2B where as it is creating only one entry for MSG_COMPLETE state.
Please guide me if i am missing anything here. I am getting below 2 errors for 2 separate entries at the same time.
1)
Error Code B2B-52325
Error Description Machine Info: (elb1cn14.statoilfuelretail.com) Description: Error in the SOA Composite {0}
Error Level ERROR_LEVEL_COLLABORATION
Error Severity ERROR
Error Text Error in the SOA Composite
2)
Error Code B2B-52325
Error Description
Error Level
Error Severity
Error Text Error -: B2B-52325: Error in the SOA Composite {0}
Edited by: 901994 on Aug 22, 2012 3:36 AMBut if the transaction is failed in SOA/AIA application due to some error then it is creating 2 entries of MSG_ERROR in reports tab in B2B where as it is creating only one entry for MSG_COMPLETE state.Are you really sure that you are seeing three report entries for SAME transaction?
I guess B2B listening channel is trying to retry the same file in case of error.App message delivery is not retried in B2B rather failed messages are delivered to the IP_IN_QUEUE. Please enable the logging for B2B engine in TRACE 32 mode and run a test to reproduce the behaviour. Post the log here or mail across to my id (in my profile).
Regards,
Anuj -
Dynamically catch a function call from an object at runtime
Hi,
I have a bit of an interesting question.
Say I have a dynamic object named Foo. It may have a set of explicitly defined functions:
public function helloWorld():String
return "hello world";
public function get name():String
return "My Name";
etc.
I want to be able to create a further function
public function handleFunctionCall(functionCall:String, args:Array):*
trace("Function: " + functionCall + " was called with the arguments:");
for(var i:int=0; i<args.length; i++)
trace(args[i]);
The purpose of this is so that I can declare the object Foo and then call any function and handle it accordingly at runtime.
e.g.
var foo:Foo=new Foo();
foo.bar();
foo.whathaveyou();
foo.whatever();
Hope someone can point me in the right direction.I'd be interested to know more about what you are trying to achieve, but the code below should work:
public function handleFunctionCall( functionName : String, args : Array ) : *
var functionToCall : Function = this[ functionName ];
return functionToCall.call( this, args );
For alternative approaches you may want to take a look at behavioural design patterns. The command or strategy pattern may suit your needs. -
How to use this FUNCTION VIEW_MAINTENANCE
hi
i create a table zxxxx and set Data Browser/Table View Maint:
Display/Maintenance Allowed.
so i want to use the function of "VIEW_MAINTENANCE" to update and create new
inforation the TABLE.
but i don't know VIEW_MAINTENANCE which of parameter meaning.
and how to control it.
who can give demo show.
CALL FUNCTION 'VIEW_MAINTENANCE'
EXPORTING
VIEW_ACTION = 'S' "DISPLAY
VIEW_NAME = W_VIEWNAME "W_TABNAME
TABLES
X_HEADER = L_VIMDESC
X_NAMTAB = L_VIMNAMTAB
DBA_SELLIST = L_VIMSELLIST
EXCL_CUA_FUNCT = L_VIMEXCLFUN.
what meaning and availability value : EXCL_CUA_FUNCT-FUCNTION ,
how to use X_HEADER
X_NAMTAB
DBA_SELLIST these parameter.
thank you very much.Please check doucmentation maintained for FM - VIEW_MAINTENANCE.
CUA functions to be deactivated dynamically
At runtime, the table EXCL_CUA_FUNCT must contain all those functions which are not to be callable in data processing , i.e. which are to be dynamically deactivated in the CUA interface at runtime. This is useful, e.g. for the following functions whose handling in cluster maintenance is ambiguous:
- 'ANZG' --> switch from 'Change' to 'Display' mode,
makes no sense in a maintenance cluster
- 'AEND' --> switch from 'Display' to 'Change' mode
makes no sense in a display cluster
- 'xxxx' --> other functions at the callers discretion.
The table must have the structure VIMEXCLFUN, as follows:
FUNCTION(4) TYPE C, ---> contains the function codes to be deactivated dynamically
MESSAGE(3) TYPE C. ---> online help auxiliary field (not yet supported)
Return ->
CUA functions to be deactivated dynamically
Database Access Selection Conditions The table DBA_SELLIST contains the database access selection conditions. The following fields must be filled:
Field name Contents
NEGATION NOT, if the condition is to be negated
SPACE otherwise
VIEWFIELD name of the field to which the condition is to apply
OPERATOR logical operator of the condition (e.g. 'EQ', 'NE',...)
VALUE comparison value of the condition in external format
AND_OR AND, if the next line of the condition is to be linked
to the current line by logical AND
OR , if the next line of the condition is to be linked
to the current line by logical OR
SPACE, if no further line follows
DDIC S, if the view field in DD is flagged as a subset field
(PM = 'S')
SPACE otherwise
TABIX Index of the view field in the view nametab
Notes:
1. Valid operators are: (see also ABAP doc.)
EQ - equals
NE - not equal to
GT - greater than
GE - greater than or equal to
LT - less than
LE - less than or equal to
CA - only for strings: contains at least one character of the comparison string
CN - only for strings: negation of CA
CO - only for strings: contains only characters from the comparison string
NA - only for strings: negation of CO
CP - only for strings: contains the pattern in the comparison string
NP - only for strings: negation of CP
CS - only for strings: contains the string in the comparison string
NS - only for strings: negation of CS
LK - like the LIKE operator in a SELECT ... WHERE clause
2. The function module does not (yet) check whether the selection conditions passed here are compatible with any conditions in the Data Dictionary view definition. The caller must ensure that this is the case.
Return ->
Database Access Selection Conditions -
How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B
Hi Friends,
How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
External Trading Partner is sending the EDI 856 via AS2 URL to our Oracle B2B Server.
In the inbound 856 agreement, we have checked the option of Funtional Ack and also Functiona Ack handled by B2B is yes.
We have the outbound agreement which is sending that Functional ack 997 (auto generated by oracle b2b) and we have specified the Outbound AS2 channel of the Partner.
997 doc is being sent to external partner using AS2 channel, but the filename is generating as '40101'.
Please can you let me know how to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
Appreciate your valuable answers!!
Thanks,
AmirineniAmirineni,
AFAIK, there is no option to set the file name when the 997 is generated automatically by B2B.
Alternatively, if this is a must requirement, you can generate the FA from backend and send to B2B with MSG_TYPE =9. In this case, you can set the header with filename (How to set the actionname property in B2B 11g) -
How to override to_number function?!
Hi,
I already tried to find an answer by searching this forum but without success...
My problem is, that I have a lot of mappings using the to_number() function to convert char into number. Now it turns out, that in some cases - due to the bad data qualtity - fields contain special chars e.g. 1234" Don't ask why ;) Of course the reguIar tu_number() function fails on that. Now I wrote a to_number function that handles the issue by removing all the special chars and then convert. I now want to override oracle's built-in to_number function with my own function.
Do you have any ideas how that works? As a requirement the solution should be simple... It would be an imense work to edit every mapping. I global solution is preferred. Something like a priority option, to take self written functions first or sth...
Thanks for any help!
Cheers SteffenHi,
you could use OMB to change all occurance of that functino in your project.
Unfortunately I know OWB allmost only from theory :-( but I remember, that you can set a context to a project or a mapping and all subsequent operations will happen within that horizont.
As far as I saw, OMB isn't to hard to use, even without days of learning, just by looking for fitting operation, but I know documentation about OMB is pretty poor, almost only syntax reference is available.
really overriding the pre_build to_number-function might be possible as sys, but I would avoid that or only do in a relly play-instance. I suppose you tried allready simply to run 'create or replace ...' ?
Thanks for your tip about number checking, but I tried allready many variations functions like that. I never can get it validated:
I have a function is_number_num, returning 1 for ok, 0 for false, which si working fine on SQL*PLUS, but when I use it splitter-condition, in this variations:
"IS_NUMBER_NUM"( GRP_IN.ANZAHL,'NLS_NUMERIC_CHARACTERS='',.''') = 1
I get: PLS-00801 internal error [phdxcsql_canonicalize_sql:state]
with .... == 1
I get:
Line 0, Col 0:
The expression is not properly formed.
I have no bloody idea, what that means and what might be wrong in here ? Even google does not return 1 singel page for the error-parameter !
I tried several versions:
"IS_NUMBER_NUM"( GRP_IN.ANZAHL,'NLS_NUMERIC_CHARACTERS='',.''') = 1
also this: "IS_NUMBER_NUM"( GRP_IN.ANZAHL) = 1
but nothing is accepted !
Also I made a more easy function for checking for date-format, which works fine in SQL*PLUS, but can't be validated in OWB-splitter.
Oracle support is playing for time since days !
thsi function brings same error, depending if I use 1 or 2 "=" !???
any idea ?
somehow I have the feeling, I missed 1 easy rule on how to use a splitter-condition correctly ?
But I can't see anything wrong in my constructions, especially because they are working fine in SQL*PLUS !???
thanks for any hint, LaoDe -
BAPI_DOCUMENT_CREATE2 FUNCTION ERROR
GIVE ME A HAND PLEASE!!
SYSTEM ENVIRONMENT : 4.6B PATCH 30.
KPRO ENVIRONMENT : CONTENTS SERVER 6.30
USING IN SAP DB 7.4 ENVIRONMENT
I AM USING JCO BY CALLING BAPI_DOCUMENT_CREATE2 FUNCTION IN APACHE WEB.
THERE IS NO PROBLEM IF I CREATE A DOCUMENT WITHOUT APPENDING FILE(DOCUMENT)
BUT IF I APPEND A FILE THEN IT MAKES AN ERROR (WHEN CHECKING IN KPRO)
I FOUND THEERROR 5 TRANSFER_ERROR IN SDOK_PHIOS_CHECKIN FUNCTION,
TYPE = E
ID = 26
NUMBER = 253
MESSAGE = Error while checking in and storing:
WHEN I TRIED TO TRACE THE FUNCTIONS.
HANDLING THE PROBLEM BY BAPI FUNCTION IN SAP IS POSSIBLE,
BUT CALLING THAT IN WEB THEN MAKES ERROR.
GIVE ME A HAND PLEASE!!
<DETAILED ERROR INFORMATION>
CALL FUNCTION 'RFC_START_PROGRAM'
DESTINATION 'BACK'
EXPORTING
COMMAND = COMMAND
REG_SERVER = 'Y'
USE_GWHOST = 'N'
IMPORTING
ERROR = ERR_MESS
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE ERR_MESS
COMMUNICATION_FAILURE = 2 MESSAGE ERR_MESS.
command : saphttp -a 376A6E0E4ED041385B989C0E00000000 -g space14 -x sapgw01
ERROR MESSAGE : RFC PARTNER DOES NOT ALLOW TO START ANY PROGRAMHi Christoph,
I have a similar question. Here is my code. However it does not work. The error message i get is Error uploading the file.
I tried splitting file name to split between docpath as '/usr/sap/XFV/DVEBMGS20/data/' and doc file as 'pdfdata1.pdf'. But it still does not work.
ws_docdata-documenttype = 'XEV'.
ws_docdata-description = 'BAPI DMS'.
ws_docdata-statusextern = 'CT'.
ws_file-storagecategory = 'SAP-SYSTEM'.
ws_file-wsapplication = 'PDF'.
ws_file-originaltype = '1'.
ws_file-docfile = '/usr/sap/XFV/DVEBMGS20/data/pdfdata1.pdf'.
APPEND ws_file TO it_files.
lw_link-OBJECTTYPE = 'DIMAIOB'.
lw_link-OBJECTKEY = '00000000000053009076'.
APPEND lw_link to it_links.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ws_docdata
pf_ftp_dest = 'SAPFTPA'
pf_http_dest = 'SAPHTTPA'
IMPORTING
documentnumber = v_docnum
documentpart = v_docpart
documentversion = v_docver
return = v_ret
TABLES
OBJECTLINKS = it_links
documentfiles = it_files.
Thanks
Pavan -
Best way to handle user scaling/offsetting of channels in a program?
I have a "Channel Configuration" page in my program that I setup. The user can turn channels on or off for data acquisition. The user saves the channels (global variable), and then goes back to a Main Menu.
Right now, if they want to add a channel or edit one, I'm having them go through MAX.
I can deal with them having to add channels through MAX but I'm thinking of just integrating my own scaling. Having the user enter UNITS/VOLT and OFFSET. Then transfer those values via a global variable array to where I need them. Is there a VI Function that handle this scale? Or do I just need to get the individual data and store them in arrays. Does that make sense?
I'm using SCC modules, PXI-6052E car
d, and Labview 6.1.
Thanks!
LaurenIf you use DAQmx (I can't remember if its supported in LV6.1) there is a property node where you can read and write scaling and offsets.
If you can't use DAQmx, your approach to store in arrays/config files will also work.
Robert -
Error Handling for Dynamic Actions (4.1.1)
Hello
I'm trying to create a function to handle all possible errors but the errors generated by DA are not being caught.
Is it possible to caught them? How?
My function is based in:
http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_error.htm#autoId4
and I'm making my tests in apex.oracle.com
ThanksHi,
there is no APEX JS function which you could use to intercept the error display. But you might be able to overwrite the "window.alert" JS function which is used to show the error with your own implementation. This function could check the text for some patterns and then decide what to show to the user. I haven't tried this but
var originalAlert = window.alert;
window.alert = function( pMessage ) {
if ( pMessage ... some check comes here ... ) {
originalAlert( "My new message" );
} else {
originalAlert( pMessage );
};might work.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Win SDK function conflict with CVI library function
I do not have SDK_CONFLICT_PRIORITY defined. Is this new to CVI 2009?
The following code gives me an error "11, 58 Too many arguments to `CVI_WriteFile'."
#include <windows.h>
#include <formatio.h>
void function (void) {
HANDLE hHandle = INVALID_HANDLE_VALUE;
char buffer [1000] = {'\0'};
DWORD dwWriteCount;
if (!WriteFile (hHandle, buffer, 5, &dwWriteCount, NULL)) {
I have included <windows.h> before <formatio.h> but CVI still wants to use the formatio version of WriteFile - it appears to have been renamed CVI_WriteFile ?!?!?
If I eliminate the #include <formatio.h> it compiles OK.
Message Edited by menchar on 03-06-2010 04:00 PMWell, the complete source for formatio.h I reported before is this one:
#ifdef _NI_mswin32_
extern int CVIFUNC cviprefix(CloseFile)(int handle);
extern int CVIFUNC cviprefix(OpenFile)(const char *filename,int rd_wrt, int action, int bin_ascii);
extern int CVIFUNC cviprefix(ReadFile)(int handle, char *buf, int count);
extern int CVIFUNC cviprefix(WriteFile)(int handle, const char *buf, int count);
extern int CVIFUNC cviprefix(SetCommitMode)(int commit);
#define CloseFile cviprefix(CloseFile)
#define OpenFile cviprefix(OpenFile)
#define ReadFile cviprefix(ReadFile)
#define WriteFile cviprefix(WriteFile)
#define SetCommitMode cviprefix(SetCommitMode)
#else
In the header this warning is present:
/* This header must be included after any Windows SDK header or any header */
/* that directly or indirectly includes a Windows SDK header. */
/* Some of the function names conflict with Windows SDK functions. */
As far as I can understand (but I'm not an expert on these very technical and tricky aspects of C) first of all CVI functions are renamed CVI_xxx, after it a call to WriteFile or any other function in that group is defined to be translated to CVI_WriteFile, so when you call WriteFile the preprocessor actually translates it in the CVI version of the function and SDK one is superseded.
My understandment is that if you undefine WriteFile, you can actually use both functions if you want: native CVI one by calling CVI_WriteFile and SDK one by simply calling WriteFile.
...or I can be missing some other hint, which can surely be possible!
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?
Maybe you are looking for
-
Kernel panic after 10.5.6 update
Hi all, A few hours after updating to Mac OS X 10.5.6 yesterday, I got a kernel panic (trace below). If I recall correctly, only Mail and Safari were open at the time. This is my 2nd kernel panic in the one month since own a new Macbook. What worries
-
Error with Maintenance Optimizer in Solution Manager 4.0
Hi, I am configuring Solution Manager for download SP, I check marketplace and download the guide, when I try to download a SP following message show me: "Change requests cannot be displayed or created, because the RFC connection has errors, or is no
-
Question on Bit Locker & IBM Client Security Solution CSS.
Since both Bit Locker and CSS use the TPM chip to store the key, can they both be used at the same time?
-
A problem about paining within Swing
Now I have developed a project aiming to drawing line between two component,here is two internalframe. Problem here is that it could work well with JDK1.4,but it could not work well with JDK1.3. The detailed is that there is something wrong between d
-
How do I get my ipod to quit repeating the same song over and over?
How do I get my ipod nano to quit repeating the same song over and over again?