I read something about the ok-code but I cant really understand how it works and how I have to implement it.
I tried implementing a MODULE in the PAI for my Buttons but they are not working either.
MODULE test INPUT.
case sy-ucomm.
when 'BTN_01'.
call screen 0.
endcase.
ENDMODULE.
Thanks!
There are not enough details to give a real answer, so my answer is kind of a guess.
In your title you mention a "Exitbutton". Has the button the function type "E"?
If yes, then maybe you better use
MODULE ... AT EXIT-COMMAND.
Another hint:
To see what happens, you may enter /h in the OK-code field (activate debugging, 'Hoppelmodus' :) ). Then push your button and hopefully you can see step by step what happens.
SOLVED
MODULE status_9000 OUTPUT.
SET PF-STATUS 'STATUS9000'.
SET TITLEBAR 'TITLE9000'.
ENDMODULE.
I had to create a PF-STATUS for my screen (i named it 'STATUS9000').
Functionbuttons-> Symbols-> Set Exit-Button FNCT-CODE EXIT
MODULE user_command_9100 INPUT.
ok_code = sy-ucomm.
CASE ok_code.
*now if you click the red exit-button (which we gave a fnct-code[exit]) the ok_code has 'EXIT' as his value.
WHEN 'BACK'.
LEAVE TO SCREEN 9000.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN OTHERS.
ENDCASE.
ENDMODULE.
ok-code = 'EXIT' after we pressed the exit-button, so we are going to leave the program.
Related
I have a grenade BP which the hero throws and wondering how you would set this up ..
I have tried and works fine but this way is caused by a sphere collision and checks what is inside the collision during detonation.
I tried without casting but this didn't work out very well for me, Is there something else I should be doing?
Please ignore the "get overlapping actors" class filter, I only done that as a test, i usually leave it blank.
ideally id like to try some sort on line trace when the bomb detonates so it can check if its a direct hit rather than triggering even when safe behind cover.
Any help is greatly appreciated, thank you!
Is there casting necessary? say I had 10 other different AI characters, id have to cast through them all right
I tried without casting but this didn't work out very well for me, Is there something else I should be doing?
Please ignore the "get overlapping actors"class filter, I only done that as a test, i usually leave it blank
I found out using a MultiSphereTraceByChannel works much better.
This is a feature you see in a lot of IRC clients. Basically, if you type a string "Ad" and then hit tab the client will fill in the first matching nick (in the case of an IRC client) mathcing 'Ad' - so let's say it fills in Adam. But, like bash, if you keep hitting tab it should cycle through all the names containing "Ad" as a prefix.
I'm not quite sure how to implement this in the Wndproc for a RichEdit though. Specifically, when a user hits tab I need to get the current 'token', save it, and get all the prefixes and fill in the first. If he hits tab again I need to get the next prefix, and so on, but I need to empty the prefix list once I get a WM_CHAR that's not tab -- I think?
I'm wondering if there's some easier, less hacky way though, or if anybody has seen code that does this?
Thanks.
Useful though Remy's comments are, it seems to me that this question is more about what the logic should be to implement kind-of-bash-style auto-completion than anything else. On that basis, and based on what you posted, which I found slightly confusing, I think it should be something like this (pseudo-code);
int autocomplete_index = 0;
string autocomplete_prefix;
on_tab:
if (autocomplete_prefix == "")
{
autocomplete_prefix = current_contents_of_edit_field ();
autocomplete_index = 0;
}
auto autocomplete_result = get_autocomplete_string (autocomplete_prefix, autocomplete_index++);
if (autocomplete_result != "")
replace_contents_of_edit_field_and_move_caret_to_end (autocomplete_result);
else
beep (); // or cycle round
done;
on_any_other_char:
autocomplete_prefix = "";
If the rich edit control is embedded in a dialog, you also need to ensure that the dialog manager does not speak in and snaffle VK_TAB before you do. That normally doesn't happen for rich edit controls (although it does for regular edit controls - go figure) but if it does you can handle WM_GETDLGCODE appropriately in your WndProc (details on request).
And 'hacky'? Why? I don't think so. Sounds like a good idea to me.
I want my mvwprintw statement to disappear after a point in the code. I don't know how delete the print statement though. Is there a print function that can do it? I tried by creating another statement full of spaces thinking it would overlap the existing statement and it would look blank. I tried looking online but could not find anything. Please let me know if there is a way.
You can clear the whole line by moving to the beginning of a line
move(3,0);
and then clearing the line
clrtoeol();
I actually found a way, hopefully this helps someone with the same problem in the future. All you need to do is to add \rat the beginning of your statement and it will over wright anything previously in that spot.
mvwprintw(win2,3,16,"Hi.");
mvwprintw(win2,3,16,"\rPlease make your first move."); //overwrites the "Hi"
mvwprintw(win2,3,16,"\rPlease make your second move.");//overwrites the "Please make your first move"
Adding blank spaces into the print statement would erase your previous message.
I am having problems with using a camera in OpenGL/freeGLUT. Here is my code:
http://pastebin.com/VCi3Bjq5
(For some reason, when I paste the code into the code feature on this site, it gives extremely weird output.)
As far as I can tell this should rotate the camera when arrow keys are pressed - but it does nothing. It also seems that even the initial camera position is wrong. Any clue why this is?
The display function is only called once. You need to either set an idle function with glutIdleFunc() or tell GLUT that the display function must be called again with glutPostRedisplay().
I have developed a graphic userinterface for a small program in c. Its some kind of calculator. I have two inputfields where one can enter numbers and I want to display the result as a text-label in the same window.
I do not know how to make the window or the text-label to update itself. I am used with GUIS in java and there are a method called invalidate() to refresh the window and its child-items? Is there a similar function in the gtk3-lib in c?
I don't understand. I think there is a button to press after entering numbers in inputfields, am i right? If so, just connect a function to the button clicked signal.
This function make the sum of 2 numbers and set the label text.
If you don't have the button, i think you need to connect the signal to the inputfields, something like:
"on_spinbutton1_value_changed" : update_text_label
P.S.
I don't know C, usally i use python, but i think is quite similar.
P.P.S.
Is this the same question founded here?