E-Rec: Problem with set attribute 'POS_TITLE' in Requisition mgmt
Hi All,
In Component controller of 'ERC_REQ_MGMT' WD4A application, I just tried to set the posting title using the below code:
DATA lo_nd_language TYPE REF TO if_wd_context_node.
lo_nd_language = wd_context->get_child_node( name = wd_this->wdctx_language ).
lo_nd_language->set_attribute( name = `POS_TITLE`
value = lv_header ).
But system is giving a syntax error, saying that 'wdctx_language ' is unknown.
Please help me to solve this issue.
Regards,
Anil
Hi Nicole Geischnek,
Actually I am trying to set the posting title with the requisition header, means Requisition title in Genaral job info and Posting title in Job postings tab should be same.
So I can see that your code can be used to get the header value.
DATA lo_nd_basic_data TYPE REF TO if_wd_context_node.
lo_nd_basic_data = wd_context->get_child_node( name = wd_this->wdctx_basic_data ).
lo_nd_basic_data->get_attribute( EXPORTING name = `HEADER`
IMPORTING value = ls_language_tab-pos_title ).
Could you please help to set the header value of posting in Component controller of WDA "ERC_C_REQ_MGMT_UI".
Thanks,
Anil
Similar Messages
-
Problem with Set/Get volume of input device with single channel
from Symadept <[email protected]>
to Cocoa Developers <[email protected]>,
coreaudio-api <[email protected]>
date Thu, Dec 10, 2009 at 2:45 PM
subject Problem with Set/Get volume of input device with single channel
mailed-by gmail.com
hide details 2:45 PM (2 hours ago)
Hi,
I am trying to Set/Get Volume level of Input device which has only single channel but no master channel, then it fails to retrieve the kAudioDevicePropertyPreferredChannelsForStereo and intermittently kAudioDevicePropertyVolumeScalar for each channel. But this works well for Output device.
So is there any difference in setting/getting the volume of input channels?
I am pasting the downloadable link to sample.
http://www.4shared.com/file/169494513/f53ed27/VolumeManagerTest.html
Thanks in advance.
Regards
Mustafa
Tags: MacOSX, CoreAudio, Objective C.That works but the the game will not be in full screen, it will have an empty strip at the bottom.
I actually found out what's the problem. I traced the stageWidth and stageHeight during resizing event. I found out that when it first resized, the stage width and height were the size with the notification bar. So when I pass the stage into startling, myStarling = new Starling(Game,stage), the stage is in the wrong size. For some reason, I can only get the correct stage width and height after the third resizing event.
So now I need to restart Starling everytime a resizing event happened. It gives me the right result but I am not sure it is a good idea to do that.
And thanks a lot for your time kglad~I really appriciate your help. -
Problem with SET GET parameters
Hi all,
I am facing a problem using SET and GET parameters.
There is a Z transaction(Dialog program) where some fields of screen are having parameter ID's. That transaction is designed to diaplay/change status of only one inspection lot at a time.
Now I need to call that transaction in a loop using BDC. I mean i need to update the status of multiple inspection lots(one after the other). Before calling the transaction I am using
SET PARAMETER ID 'QLS' FIELD lv_prueflos.
Unfortunately the transaction is only changing the first inspection lot. When I debugged I found that the screen field is changing in PAI. Even though in PBO it shows the next value, when it goes to PAI it is automatically changing to the first value(inspection lot).
Example: Inspection Lots : 4100000234
4100000235
4100000236
Now first time when the call transaction is being made the status of insp lot 4100000234 is changed. For the second time when insp lot 4100000235 is being passed in PBO ican see this. But the moment it enters PAI the screen field changes to 4100000234.
Could you pls help me in solving this issue.
Thanks,
AravindHi,
Problem with SET GET parameters
Regarding on your query. Follow this below link.
It will help you.
Re: Problem with Set parameter ID
Re: Problem in Set parameter ID
I Hope it will helps to you.
Regards,
Sekhar -
Button in Bex Analyser 7.0 - problem with setting up Static Parameters
Hello,
I know a similar problem has been discussed here already, but I am still having problems with setting up Static Parameters of my Button in BEx Analyser 7.0, so that I can pass Variable values from that button to my query.
This is what I do - in Static Parameters of my Button I set the following values:
Name Index Value
DATA_PROVIDER 0 DP_1
CMD 0 PROCESS_VARIABLES
SUBCMD 0 VAR_SUBMIT
VAR_NAME 0 0RMA_FIP
VAR_VALUE 0 004/2010
As a result, I would like the value 004/2010 to be passed to variable 0RMA_FIP (which is mandatory) and the query to be executed with that value. For some reason, however, the value is not passed correctly, and instead the variable is filled with a blank or not filled at all, and I am getting a message "Specifiy value for variable Fiscal year/period". What do I do wrong?
Just to give you a broader picture - I would like to later use this logic to pass more than one variables into a query, including a hierarchy node, and read the values from an Excel worksheet - however, after many attempts to do so, I started playing with just one variable to figure out what the problem was.
I have already seen the following two threads and SAP notes on passing variable values from the button:
Re: Button in BEx Analyzer 7.0
Re: How to set variables values via VBA.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be?quicklink=index&overridelayout=true
Can anyone please advise?
Cheers,
ALI managed to figure it out myself!
Instead of VAR_VALUE I need to enter VAR_VALUE_EXT, and it works fine.
I will mark this thread as "answered". -
Problem with setting Source Level in Sun Studio 2
I've got problem with setting Source Level to 1.5 in Sun Studio 2. When I try to set it to 1.5 in Project properties and click Ok everything seem to go well, but when I open Project Properties again Source Level is set to 1.4. I need this to work cause I started to lear Java recently and I want to use foreach loop.
Please helpI'm just citing an example using Date().
In fact, whether I use DateFormat or Calendar, it shows the same result.
When I set the date to 1 Jan 1950 0 hours 0 minutes 0 seconds,
jdk1.4.2 will always return me 1 Jan 1950 0 hours 10 minutes 0 seconds.
It works correctly under jdk1.3.1 -
Problems with setting up my ISP's mail server in Windows Live Mail and Thunderbird
The laptop is a G60-535DX with Windows 7 64 bit. I've managed to setup my gmail account fine in Live Mail, but when setting up my ISP' mail server, it doesn't work. I get the message that the information was entered correctly, and I see the 'connecting' at the bottom of the page, and then 'error', and clicking on it shows a socket error #10061. In Thunderbird, I get a timeout error message. I've entered all the incoming and outgoing server information correctly, (I've done this over 8-9 times now), the ports are the defaults(110,25), no SSL, no authentication. I've talked with my ISP several times. Just a couple of hours ago was the last time. Their only other possibilities were that Live Mail had problems with setting up more than one account, that Live Mail needed updating, that Windows 7 was a new operating system and there were 'kinks'. I removed the gmail account, set up the ISP's mail by itself; didn't help. I checked for Live Mail updates, but found out that they all come from Windows updates(which are current). The folks on PCQ&A inform me that they have 3 or 4 accounts with Live Mail. I can get my mail, by logging onto my ISP's website, but that' kind of a nuisance. I posted this in Seven Forums and they didn't have any ideas. As I said, I also can't get my mail server to work in Thunderbird, either. I don't know what else to try. (short of activating the recovery partition and starting from scratch). Any ideas would be more that welcome.
Thanks,
SteveStevehiker wrote:
Nevermind, it's fixed. One of the guys on PCQ&A suggested going to my ISP's website to see if they had a support page. They did and it stated that under certain circumstances that for the login ID the whole email address should be entered. For XP and Outlook Express one only uses the first part of the email address (your name); so just for grins I entered the whole address, name and all and everyting worked. Called my ISP and was told that that wasn't the way it's supposed to work. Well----
Thanks anyway,
Steve
Mine works the same way_must enter full email address as login. AT&T?
******Clicking the Thumbs-Up button is a way to say -Thanks!.******
**Click Accept as Solution on a Reply that solves your issue to help others** -
Problem with optional attribute caching on a custom tag
Hello,
I've created a tag by extending TagSupport. I have one attribute that is optional. I'm having a problem with this attribute since the tag is cached. If the value is not specified in the tag, it is always using the previous value from the past request.
I understand why this is happening, but I wonder if there is anyway to reset this value besides doing it at the end of the doStartTag or in the doEndTag methods? I simply want it to be an empty string if it is not in the request.
Thanks,
TimThats abit overkill in my opinion.Probably yes, but its a cleaner option. In case your doEndTag handles custom exceptions, you would anyhow need to put this code in a finally block, right ?
public int doEndTag() throws JspException {
try {
call some methods that throws other checked exceptions;
}catch(Exception1 e){
throw JspException(e);
}catch(Exception2 e){
//log and ignore
}finally{
//clean up here
return an int;
Having said that, different containers implement the spec a bit differently. For example, in our project, we use weblogic and for wl, we put our clean up code in the release() method which according to the spec, needs to be called only before gc. Weblogic implementation is a bit different - its called after doEnd() for every use of the tag.
This is from jsp spec regarding tag life cycle especially with reuse
Some setters may be called again before a tag handler is reused. For
instance, setParent() is called if it�s reused within the same page but at a dif-ferent
level, setPageContext() is called if it�s used in another page, and
attribute setters are called if the values differ or are expressed as request-time
attribute values.
�Check the TryCatchFinally interface for additional details related to exception handling and resource management.
cheers,
ram.
} -
Obiee 11g . problem with set default as columnname in interaction tab
Hi Obiee gurus ,
I have small problem with set default option in interaction tab in column properties. actually my problem is , i changed one column bold save as set default option bold and how to revert back to my column option. when i create new analysis with same name . it takes set default option for that column.
can Please give some suggestion for this problem.
regards
SrinivasHi Srinivas,
i guess this will be same for 11G
Refer
http://blogs.oracle.com/siebelessentials//2008/08/remove_systemwide_default_sett.html
thanks,
Saichand.v -
Very urgent : Problem with field attributes in Datasource
Hi
I am getting a problem with field attributes in the datasource.
The issue came up after i modified the extract structure-i modified one field and
added one field to the structure.Now those two fields are not visible in BW.
When i checked with transaction rsa2, i could find that for those two fields , the
field attribute is <b>'A'</b> which is <b>'Field in OLTP and BW Hidden by SAP'</b>.
I tried to modify the field attribute to make it visible.Now the issue is that it is not getting reflected after transport in the Q system.What can be the issue.In the Q system its still the old value 'A' ,which makes the fields invisible.
Please let me know what can be the issue.
Regards
LeonHi,
did you change this attribute via RSA2?
you need to change your datasource via postprocessing (RSA6); then transport your DS to your Q source system.
Replicate your datasources in your BW.
Finally modifiy your Transfer Structure by editing your TRules ( tab Datasource/Tran structure), move your new fields from the right frame to the left frame)
Maintain your TRules
Activate
hope this helps...
Olivier. -
Problem with setting Item level permissions lists
Hello!
I have SPS 2013 on-premised environment with AD authentication.
At some moment I've noticed that we have a problem with setting the item level permissions on any lists except the document libraries.
When I click the "shared with" button I see a popup form with a list of users who have an access to that list but there is no "invite people" link or "Advanced" link. Moreover, the "loading" ring rotates
instanly like some operation was'nt ended.
The same operation with documents in libraries works well.
I am be grateful for any help!Hi Mischael,
From your description, my understanding is that there were no "invite people" or "Advanced" link when some users clicked "shared with" button in some lists.
This issue seems like about permissions. Please log on your site with site collection administrator or a user who has full control for the site, then go to a problematic list->List settings->Permissions for this list, check whether the list
has unique permissions. Then click "Check Permissions", check the permission level for the problematic users and then go to Site Settings->Site permissions->Permission levels, check whether the permission level contains "Manage permissions".
If not, add the permission into the permission level.
Thanks,
Wendy
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
I just bought an AirPort Extreme system over this weekend and I am having problem with setting it up. I plugged the cable as explained in the manual but there is no way I can get a steady green light. I all see is flashing amber light. Can anyone help me,
Think you need to provide some more details about what you are connecting
-
Problem with setting custom attribute and it being searchable
I'm having an issue with setting a custom attribute and having it be searchable using Portal 10.1.4. The situation that we have is that we initially added a bunch of files to Oracle Portal using webdrive. Later on, we decided that we needed another custom attribute called "Pinned Item" that will be used for searching (boolean value) and gave it a default value of false. The attribute was then added to the "File" item type in the "Shared Objects" group.
It appears that since this attribute wasn't initially available on the file object, we couldn't search on it so we decided to set it programatically. First, I tried using wwsbr.set_attribute but it errored out seemingly because the value wasn't set in the first place. If I set a value first by using the web front end, I could then use the set_attribute procedure.
So, I moved on to using wwsbr_api.modify_item and it appears to set it (although everything is being set to false until I changed it to "text" instead of "boolean" which is OK because that's what I wanted anyway... see metalink bug 390618.1). I'm using the method outlined in metalink doc 413079.1. When I do set it to a "1", and edit the item the check box is checked indicating that it is set correctly. And if I just click "OK" to save the attributes after I open it everything works like it should.
However, the advanced search (and custom search portlet) and the search APIs are not picking it up. I'm not sure if I'm hitting Metalink bug ID 5592472 or not as that's using the "set_attribute" procedure instead of the modify_item procedure. And their "workaround" of setting the attribute in the UI isn't really feasible for a couple thousand files.
So far I've tried the following things to get it working:
1. I am calling wwpro_api_invalidation.execute_cache_invalidation
2. I have executed wwv_context.sync
3. I cleared the page group cache
4. I invalidated all of the web cache
Does anyone else have any other suggestions?I'm having an issue with setting a custom attribute and having it be searchable using Portal 10.1.4. The situation that we have is that we initially added a bunch of files to Oracle Portal using webdrive. Later on, we decided that we needed another custom attribute called "Pinned Item" that will be used for searching (boolean value) and gave it a default value of false. The attribute was then added to the "File" item type in the "Shared Objects" group.
It appears that since this attribute wasn't initially available on the file object, we couldn't search on it so we decided to set it programatically. First, I tried using wwsbr.set_attribute but it errored out seemingly because the value wasn't set in the first place. If I set a value first by using the web front end, I could then use the set_attribute procedure.
So, I moved on to using wwsbr_api.modify_item and it appears to set it (although everything is being set to false until I changed it to "text" instead of "boolean" which is OK because that's what I wanted anyway... see metalink bug 390618.1). I'm using the method outlined in metalink doc 413079.1. When I do set it to a "1", and edit the item the check box is checked indicating that it is set correctly. And if I just click "OK" to save the attributes after I open it everything works like it should.
However, the advanced search (and custom search portlet) and the search APIs are not picking it up. I'm not sure if I'm hitting Metalink bug ID 5592472 or not as that's using the "set_attribute" procedure instead of the modify_item procedure. And their "workaround" of setting the attribute in the UI isn't really feasible for a couple thousand files.
So far I've tried the following things to get it working:
1. I am calling wwpro_api_invalidation.execute_cache_invalidation
2. I have executed wwv_context.sync
3. I cleared the page group cache
4. I invalidated all of the web cache
Does anyone else have any other suggestions? -
Hello,
I have a piece of code that is used for converting files from a shared file area to SharePoint for customers that move to SharePoint and Dynamics CRM. The relation to Dynamics CRM calls for using custom code an not existing conversion tools.
The code I wrote works fine if the file sent to a regular site in SharePoint, but if I try to use the same code for files in the Site Collection. If I use the address for the site collection in the constructor for the ClientContext, and the relative URL
from that for the file, both the upload and the setting of the attributes fails (I do make sure the file is there before trying to set the attributes).
After some experimentation I am able to upload the file, by creating the client context with the main site URL, and adding the site collection path elements ("/sites/crm") to the path for the file, but using the same the setting of the attributes
fails.
I have tried some other variant where the site collection elements are in the path for both the ClientContext and the file path. Then the upload fails, the file retrival (GetFileByServerRelativeUrl) works, but the retrival of the attributes then fails.
The code below illustrates the variations.
Can someone please explain what I am doing wrong, or is this a bug in the SDK?
Regards
Anders
using System;
using System.IO;
using System.Security;
using Microsoft.SharePoint.Client;
using File = System.IO.File;
using SP = Microsoft.SharePoint.Client;
namespace TestSharePointDocumentAttributes
class DocumentAttributeTester
public void Execute(string[] args)
string userId = args[0];
string password = args[1];
string filePath = @"C:\work\TestCV1.docx";
string siteUrl;
string documentPath;
string clientContextUrl;
string serverRelativeUrl;
DateTime createdDate = new DateTime(2013, 2, 1, 11, 20, 45);
DateTime modifiedDate = new DateTime(2013, 3, 1, 11, 40, 45);
string fileName = Path.GetFileName(filePath);
SecureString securePassword = new SecureString();
foreach (char c in password.ToCharArray())
securePassword.AppendChar(c);
// Pass 1, no site collection
Console.WriteLine("Pass 1");
clientContextUrl = "https://losangas.sharepoint.com";
serverRelativeUrl = "/crmn_candidate/TestSPAttributes" + '/' + fileName;
upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
Console.WriteLine();
// Pass 2, site collection, parameters as expected, both upload and set attributes fails (even if file exists)
Console.WriteLine("Pass 2");
clientContextUrl = "https://losangas.sharepoint.com/sites/crm";
serverRelativeUrl = "/kontakter/N/Test1" + '/' + fileName;
upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
Console.WriteLine();
// Pass 3, site collection, parameters adjusted. Upload works and set attributes fails.
Console.WriteLine("Pass 3");
clientContextUrl = "https://losangas.sharepoint.com";
serverRelativeUrl = "/sites/crm/kontakter/N/Test1" + '/' + fileName;
upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
Console.WriteLine();
// Pass 4, site collection, parameters adjusted. Upload works fails, but GetFileByServerRelativeUrl succeds and load items fails
Console.WriteLine("Pass 4");
clientContextUrl = "https://losangas.sharepoint.com";
serverRelativeUrl = "/sites/crm/kontakter/N/Test1" + '/' + fileName;
upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
Console.WriteLine();
private void upload(string clientContextUrl, string serverRelativeUrl, string userId, SecureString securePassword, string filePath)
try
byte[] fileContents = File.ReadAllBytes(filePath);
string fileName = Path.GetFileName(filePath);
ClientContext clientContext = new ClientContext(clientContextUrl);
clientContext.Credentials = new SharePointOnlineCredentials(userId, securePassword);
SP.File.SaveBinaryDirect(clientContext, serverRelativeUrl, new MemoryStream(fileContents), true);
Console.WriteLine("Upload successful.");
catch (Exception ex)
Console.WriteLine(string.Format("Upload error: {0}", ex.Message));
private void setVariables(string clientContextUrl, string serverRelativeUrl, string userId, SecureString securePassword, DateTime createdDate, DateTime modifiedDate)
try
ClientContext clientContext = new ClientContext(clientContextUrl);
clientContext.Credentials = new SharePointOnlineCredentials(userId, securePassword);
Microsoft.SharePoint.Client.File uploadedFile = clientContext.Web.GetFileByServerRelativeUrl(serverRelativeUrl);
clientContext.ExecuteQuery();
ListItem listItem = uploadedFile.ListItemAllFields;
List list = listItem.ParentList;
clientContext.Load(uploadedFile.ListItemAllFields);
clientContext.ExecuteQuery();
FieldUserValue author = FieldUserValue.FromUser("Elisabeth Skaane");
FieldUserValue editor = FieldUserValue.FromUser("Elisabeth Skaane");
listItem["Created"] = createdDate.ToString("MM.dd.yyyy HH:mm:ss"); // i.e. "6/5/2012 10:19"
listItem["Modified"] = modifiedDate.ToString("MM.dd.yyyy HH:mm:ss"); // i.e. "6/5/2012 10:19"
listItem["Author"] = author;
listItem["Editor"] = editor;
listItem.Update();
clientContext.ExecuteQuery();
Console.WriteLine("Set attributes successful.");
catch (Exception ex)
Console.WriteLine(string.Format("Set attributes error: {0}", ex.Message));Hello,
Thanks for your effort, but you are not addressing the problem.
As I tried to explain, setting the date works fine in the case where there is no site collection involved. There is no reason to believe that this will be different when in a site collection. Also the logon works fine in borth cases. The FieldUserValue.FromUser
can take either an email, or a prefered name. I tested both.
Anders -
Hello,
I want to implement the BADI IDSSI_DISPLAY_TO_POD in CRM. The OSS Note number 573078 specify the code that must be integrated in the program of implementation of this BADI.
I want to insert a specifical set type with several attributes.
Before using the set type in my program, i have to transport this set in order to assure that the fields of this new set type would be include in the structure DDIC COMT_PROD_MAT_MAINTAIN_API. I did it.
There is my problem : in the generated code of the OSS Note, there is :
ISU_CUST01_TAB = SETTYPE-ISU_CUST01.
with :
SETTYPE a table like structure COMT_PROD_MAT_MAINTAIN_API
ISU_CUST01_TAB TYPE ISU_CUST01_MAINT_T,
ISU_CUST01 TYPE ISU_CUST01_MAINTAIN
After creating settype, I verify that ISU_CUST01_MAINT_T and ISU_CUST01_MAINTAIN exist. this structure are generated when creating a settype.
during the control of the program, I obtain this message :
Field ISU_CUST01 can't be found in table settype.
I don't understand how I can use my settype, like it is specified in the OSS Note.
I will appreciate any help about this topic.
Regards,
Vincent UNGERHi ,wyee .
I do it but not through your FMs , i think you can do it by the FM :
create/change the material CALL FUNCTION 'COM_PRODUCT_MAINTAIN_MULT_API'
IMPORTING
ET_BAPIRETURN = LT_RETURN[]
CHANGING
CT_PRODUCT = LT_PRODUCT
EXCEPTIONS
INTERNAL_ERROR = 1
OTHERS = 2.
This FM can create or change the material in the crm ,and can maitain data except conditions , like basic data ,like relationship . -
Problem with setting velocity in LDPhysics
So I have been having a few problems with the physics extension lately, so I thought Id tell you about them.
It seems that forever what reason, an object won't start moving (even if velocity is set) until it is bumped by another shape. Another problem is that objects won't always move somewhere when I tell them to. Especially when they are real far off the screen.
Here is a program to show you the bug in action:
LDPhysics.SetAABB(-100, 2000, -100, 2000) 'Good for x up to 20000
LDPhysics.Reset()
GraphicsWindow.CanResize = "False"
GraphicsWindow.Top = 0
GraphicsWindow.Left = 0
GraphicsWindow.Width = Desktop.Width
GraphicsWindow.Height = Desktop.Height
GraphicsWindow.BrushColor = "Black"
LDGraphicsWindow.Style = 0
LDPhysics.SetGravity(0,0)
LDPhysics.SetBoundaries(0,50000,0,50000)
Text = Shapes.AddText("")
Shapes.Move(Text,200,20)
For i = 1 To 10
Bullet[i] = Shapes.AddRectangle(20,20)
LDShapes.Centre(Bullet[i],10000+(i*20),10000+(i*20))
LDPhysics.AddMovingShape(Bullet[i],0.7,0.7,0.7)
EndFor
Timer.Tick = Fire
Timer.Interval = 500
While 1 = 1
Program.Delay(5)
LDPhysics.DoTimestep()
EndWhile
Sub Fire
i = i + 1
If i > 10 Then
i = 1
EndIf
Shapes.SetText(Text,i)
LDPhysics.SetPosition(Bullet[i],20+(i*30),50,0)
LDPhysics.SetVelocity(Bullet[i],100,100)
EndSub
Thanks!!
It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11Hi,
There are a couple of things Box2D does for efficiency
1] Is sleeps any object not interacting - stationary and nothing hitting it - when somethng hits it, it wakes up.
2] Any object outside the AABB is frozen - completely forgotten - hence you should ensure any moving object stays in the AABB, perhaps by putting boundaries at the AABB boundaries.
As I have mentioned before Box2D is not really designed to set position and velocities, rather forces and torques. So...
1] If an object is stationary and goes to 'sleep' and it is moved with velocity or position it does not wake up (until something hists it). A stationary sleeping object is woken when a force or torque is applied or it is hit. This is why your
bullets don't move - Try using SetImpulse for example.
2] An object moved outside the AABB will be frozen- once it is frozen it is lost.
There isn't anything I can do about the frozen - you can use the RemoveFrozen
command to delete all frozen and re-add it to the engine inside the AABB or better don't move it outside the AABB.
I could add a function to wake a sleeping object, but really you should use Forces, Impulses and Torques.
I guess you are trying to create an array of bullets that are used as required.
So I would:
1] Create the shapes and position them anywhere inside the AABB - not all on top of each other though.
2] LDPhysics.DisconnectShape and Shapes.Hide - to remove from engine and view.
3] When required Shapes.Move shape to fire location,
LDPhysics.AddMovingShape to add it to the engine and use LDPhysics.SetImpulse to fire.
4] When you don't want this shape any more LDPhysics.DisconnectShape and
Shapes.Hide.
For example, note also the LDPhysics commands are NOT done asynchronously (i.e. a flag in timer event passed to game loop). Additionally your boundaries are larger than the AABB, which could couse problems for reasons above.
LDPhysics.SetAABB(-100, 2000, -100, 2000) 'Good for x up to 20000
LDPhysics.Reset()
GraphicsWindow.CanResize = "False"
GraphicsWindow.Top = 0
GraphicsWindow.Left = 0
GraphicsWindow.Width = Desktop.Width
GraphicsWindow.Height = Desktop.Height
GraphicsWindow.BrushColor = "Black"
'LDGraphicsWindow.Style = 0
LDPhysics.SetGravity(0,0)
LDPhysics.SetBoundaries(0,50000,0,50000)
Text = Shapes.AddText("")
Shapes.Move(Text,200,20)
For i = 1 To 10
Bullet[i] = Shapes.AddRectangle(20,20)
LDShapes.Centre(Bullet[i],10000+(i*20),10000+(i*20))
LDPhysics.AddMovingShape(Bullet[i],0.7,0.7,0.7)
LDPhysics.DisconnectShape(Bullet[i])
Shapes.HideShape(Bullet[i])
EndFor
Timer.Tick = OnTick 'Start timer after bullets created
Timer.Interval = 500
While 1 = 1
If (FireEvent) Then
HideBullet()
'Next Bullet
i = i + 1
If i > 10 Then
i = 1
EndIf
Shapes.SetText(Text,i)
FireBullet() 'Don't modify anything (LDPhysics Commands) asynchronously which could conflict with DoTimestep
FireEvent = "False"
EndIf
LDPhysics.DoTimestep()
Program.Delay(5)
EndWhile
Sub OnTick
FireEvent = "True"
EndSub
Sub HideBullet
'Hide bullet 'i' and disconnect from physics engine
LDPhysics.DisconnectShape(Bullet[i])
Shapes.HideShape(Bullet[i]) 'Hide the shape after diconnecting it
EndSub
Sub FireBullet
'Add and show bullet 'i' and fire it with an impulse
LDShapes.Centre(Bullet[i],20+(i*30),50) 'Set positon before showing it (reduce possible flicker)
Shapes.ShowShape(Bullet[i]) 'Show the shape before adding it - not quite sure why - some required geometry or other attribute probably not available when hidden
LDPhysics.AddMovingShape(Bullet[i],0.7,0.7,0.7)
LDPhysics.SetImpulse(Bullet[i],100,100)
EndSub
EDIT - the reason that I have to show the shape before adding it is that the HideShape removes it from the layout and the methods I use to add it can't find the size and position of a hidden shape - something to remember!
Maybe you are looking for
-
PDF files is not displayed properly in Adobe PDF version 11.0.06
have one pdf which can be viewed perfectly in Adobe version 9. The same PDF is not properly opening clearly in Adobe 11. My Adobe Pdf version is 11.0.06. PDF file info. This PDF has been created by iText 2.1.7 api from java File version of PDF file i
-
Issue in BADI BBP_PGRP_FIND
Hi SRM Gurus, How can i get the Shopping Cart Item details,Company Code and Product Category in the BADI 'BBP_PGRP_FIND'?. I checked with the BADI Interfaces and i could find only Product Category. My Exact Requirement is to get the Approvers(Maintai
-
Producing a Paper Layout as output instead of Web Layout
Hello All, I've developed a report in Reports 10g and saved it as a jsp file, having both paper & web layout. I've also designed a form in Oracle forms 10g with a list item displaying the list of all reports available. I've written the following piec
-
Hi I created PR to PO. Po created with account assignment category c-sales order and item category s-third party. My question is PO or PR not showing in MD04. Please can anybody suggest?
-
How can i make my baseline budgete hours spraed same as remaining hours
I have just made a baseline of my current schedula and i see for activity that have already started primavera has spread all the budeted hours from actual start to the finish date however i want to plan hours afte my data date , in other words i do n