Flush()ing shared object from a function

i seem unable to flush/save to file the 'data' items of a
shared object from within a function, any ideas please folks?
i can get the code to work from the 'main body' of the script
BUT if i try the same/similar thing from within a function it
doesn't want to play! could it be due to some consideration
regarding scope of variable (which i kinda understand - and kinda
don't?!?)

o-k-a-y kglad
you da man, my man, we have a right result mon ami.
it worked first time, thank you.
i suspect i wouldn't have found that 'configuration' in a
long time - it's easy when you know how, but getting there can be
hard work.
many thanks for your time and contribution, i appreciate
both.
best wishes,
avonova

Similar Messages

  • PowerShell: Possible to return a DataReader object from a function call

    I have to interact with several different db's.  I was wondering how I could use a common Function for the connection and commnad params and have it return a DatReader object that I then could evaluate?
    Example: (psuedo-code)
    Function SqlCmd(Db, instance, command) {... return <DataReader onject>}
    $Datareader= SqlCmd Db instance command
    if ($Datareader.HasRows) {..to something..}
    Thanks
    TR

    Hi TR,
    This is possible by using the Dot.Net Sql objects. Below is a small function which takes a connection string and a SQL query string and returns a DataReader object:
    function
    Get-SQLData()
    param (
       [string]$sqlConnectionString,
       [string]$query
    # Create a connection to the OLAP Database
    $connection
    =
    New-Object
    System.Data.SqlClient.SqlConnection
    $sqlConnectionString
    $connection.Open()
    if (!$?)
    {throw
    "Could not open the connection."}
    $command
    =
    New-Object
    System.Data.SqlClient.sqlCommand
    $query,
    $connection
    $dataReader
    =
    $command.ExecuteReader()
    ,$dataReader
    The most important thing to note in this entire function in the comma in front of the $dataReader at the end of the function. As PowerShell implicitly tries to unpack collection objects, this comma forces the collection to
    be returned intact allowing you to use it as required. So here is an example of usage:
    $dr
    =
    Show-SQLData
    $sqlConnectionString
    $query
    if ($dr.HasRows)
       while ($dr.Read())
    "$($dr[0]) $($dr[1]) $($dr[2])"
    Hope that helps!
    Chris

  • FMS Remote Shared Objects and PHP

    Is there a way to access remote shared objects from PHP ?
    I've created an a/v chat application, once a user is connected to it, it creates a remote shared object that indicates that the user is online. I want to find out if a shared object exists via PHP to let other users, who are not connected to the flash application, know what's the user's status.
    Thanks!

    All the things you want to do are typical Shared Object's functionalities. I've already created a couple of huge projects myself using Shared Objects functionalities, so I can say with the full responsibility that all the things you want to do can be done very easily using those classes.
    Basicaly, if you want to build your app using SO, there are few options available for you on the market. First, and the best I guess, will be Adobe's Flash Media Interactive Server. It's only disadventage is, that it's quite expensive - but it's worth it's price, believe me.
    If you don't want to pay for it, you can also use a free and open source Red5 server. If it's only the "text-chat based" functionality you want to implement, with a typical video streaming, this one should be enough for you. Although, there could be some problems waiting for you if you wanted to create a full video-chat based application. Take a look at the FMS vs Red5 comparision, which maybe will help you decide - http://www.riafreaks.com/. On the first page of this URL there will be an article I'm talking about covering this topic, as well as a sample guide on how to connect FMS to PHP code, which will let you work with any database you want.
    To be honest, if I understood your problem correctly, than Red5 should be enough for you. It works great with Shared Objects, it's free, and it gives you the whole Java API server side - so you can connect to the database very easily. And it also let's you create and manage Shared Objects client side, as well as server side. Although, believe me that even if you're not a Java developer yourself, you won't have to write even a single line of server side code. You can create, update and destroy Shared Objects using only your Flex clients - it'll suite all your needs in the context you've written.

  • Local Shared Objects and multiple SWFs: mutexes necessary?

    I will have multiple SWFs on a single web page, each reading
    and writing the same SharedObject, which may be up to 100K in size.
    Will I need to create some sort of mutex scheme to ensure that one
    SWF isn't writing while another is reading, or do all SWFs on a
    page essentially run as a single-threaded application?

    >1) I don't think a SharedObject.flush is synchronous.
    I believe it is, as long as you're not attempting to write
    more data than the user has set for the Local Storage limit.
    http://livedocs.adobe.com/flex/3/langref/flash/net/SharedObject.html#flush()
    You'll note that flush is described this way: "Immediately
    writes a locally persistent shared object to a local file", and if
    it returns "SharedObjectFlushStatus.FLUSHED" that means that "The
    shared object has been successfully written to a file on the local
    disk". So I'd say that the normal operation of flush() is
    synchronous. However, the SharedObjectFlushStatus.PENDING state
    means that we've exceeded the limit set by the user, and are
    waiting for them to allow or disallow it. I believe (strongly) that
    that's the only case in which a netStatus event is sent.
    Do you read this differently?
    As far as multiple SWFs running as cooperative or preemptive
    multitasking processes, I'd really like to know the answer, but it
    probably doesn't matter. The more I read and think about this, the
    more it seems to me that Adobe has to prevent simultaneous reads
    and writes to a single Shared Object from taking place, as one use
    of it that I've read about is to share data between SWFs. For
    example:
    http://www.devarticles.com/c/a/Flash/Communication-and-Security-with-the-Flash-Communicati on-Server/1/

  • Device testing with Shared Objects are failing: Error #2130

    This is new for me. I've made a bunch of apps with Flash Pro CC and Air. After the last CC update I can't run my builds on an iPad. They hang as soon as I try to flush a shared object. Any ideas? Is there a new permission setting I need to define? Here is what the debugger says:
    Waiting for Player to connect...
    Error: Error #2130: Unable to flush SharedObject.
              at Error$/throwError()
              at flash.net::SharedObject/flush()
              at CleverClimbers_fla::MainTimeline/frame1()[MyFile_fla.MainTimeline::frame1:133]
              at CleverClimbers_fla::MainTimeline/frame1()
    Cannot display source code at this location.
    Debug session terminated.

    Hi,
    I am not able to reproduce the issue.
    I tried with the latest AIR 4.0 build on iPad version 7.0 and Flash Pro CC version 13.1.0.217.
    Could you please share the Flash Pro version you are using?
    Also if possible, please share the sample app as it would help us in investigating the issue.
    Thanks,
    Pranali

  • Shared Objects, iCloud, and inApp Purchasing

    Here is the scenario:
    All game data is saved in a Local Shared Object. This includes game un-locks and items that the user has purchased using in-app purchaes.
    Will the player be able to down load this shared object from the cloud if they play the game on another device?  Does Apple require in-app purchased 'items' to be stored in  a special way?  I've read some people having issues with Shared Objects in the past, so I'm curious on what the current 'best practices' are.
    Thanks,
    -dis

    Dis, Hi.
    If you want to use non-consumable IN APP PURCHASE - you don't need use any saving for restoring on other devices.
    Non-consumable it's products, that you can buy once. For unlock for example from LITE to FULL version. Than you can save it as Local Shared Object.
    When you will buy it again - APP STORE will not get money again but will return product as Buyed (as new) and you will see it as 'restored'.
    App Store don't provide any downloads. It's return only JSON parameters like 'restored', 'purchased' and etc. All rest you do on your device

  • Flash Log In From with Shared Objects

    So i want to create a flash log in and registration form for my flash game. THis game is played on your local PC not in the internet and i am using AS 2.0. So on the registration from i want to have two input text fileds: username and password. When you click on register the data from those fields to be saved as Shared Object and then on the log in when you type something in the log in fields (again two fields : username and password) the data that you wrote in those fields to pass trough the saved data as shared objects and if those two are the same then the log in is successfull if i want the movie to go on a certain frame whare it says access denied. pls help

    if you use the obviously named textfields:
    var so:SharedObject = SharedObject.getLocal("login","/");
    if(so.data.username==undefined){
    //need to register and assign:
    so.data.username=usernameTF.text
    so.data.password=passwordTF.text
    loginBtn.onRelease=function(){
    if(so.data.username==usernameTF.text && so.data.password==passwordTF.text){
    //successful login
    } else {
    //login failure

  • Calling shared objects in unix from Forms 6i and 10g

    I would like to know how to call shared objects in unix from Froms 6i and 10g. Can anybody help in this regard? Your help is very well appreciated.

    Hi,
    Do you have any 11i instance where those custom forms are used? If yes, you will have to copy those forms from 11i to R12 instance, open the forms using Forms 10g builder, compile it and upload it back to the server.
    Note: 427879.1 - How To Customize And Compile An Application Seeded Form (FMB) Or Library (PLL)?
    Note: 743490.1 - Customization in Oracle Applications
    Note: 563258.1 - How To Upgrade 11i Custom Forms And Reports To R12
    Regards,
    Hussein

  • Problem in getting the function template object from the repository.

    Hi all,
    I have created a par file. I have a JCO connection in that. I am facing problems in getting the function template object from the repository. This thing is running successfully when i try to deploy it in Tomcat. But i am facing problems when i try to deploy it in SAP EP 6.0.
    Below is statement which is giving error after being deployed to SAP EP6.
    This is executing fine when executed in Tomcat Server.
    // getting the object of function template
    IFunctionTemplate functionTemplate =
    aRepository.getFunctionTemplate("YADDNEWUSER");
    Note : YADDNEWUSER is the name of the RFC which I am calling from my JAVA Code.
    Thanks in advance,
    Divija

    This sounds like a bug in the smart upload code. I have used this stuff before, but it's probably an older version, so maybe they broke something. Enumerations aren't usually guaranteed to keep things in any particular order. I would say for now, make a method to take the enumeration and a param name to find the value. And write to the JSPSmart people.

  • Returning objects from functions

    Hi,
    public HSSFRow someFunction() {
       HSSFRow returnrow;
       Iterator rowiterator = someobject.rowIterator();
          while(rowiterator.hasNext()) {
             returnrow = rowiterator.next();
       return returnrow;
    }My problem is this, I want to pass a HSSFRow object back from a function, but the constructor to this object is protected so i cant initialize an object, this code wont compile because it says that the returnrow object might not have been initialized. How do i get round this problem?

    Hey-
    You could just initialize returnrow to null and check for null whenever you call someFunction(), that should do it.
    Lee

  • Cut object from function diagram

    Hi,
    Is there possibility to cut object from function diagram?!!! I can't do it.
    regards

    morganlars,
    There is no need to think about transparent bacgrounds: basically, there is no background.
    You may View>Show Transparency Grid, then hide it again.

  • How to Get property values from Shared Object in client's load event - Very urgent

    I am using shared object to share data between two users. First user connect to shared object and set some value in shared object. Please consider that second user has not connected with the shared object yet.
    Now when second user connects to the server and try to get that property set by first user, he could get shared object but could not get properties of Shared object set by first user. I observed few times that Second user can get these properties within "Sync" event between two users. But I would like to get these values for Second user in any stage (i.e. in load event etc.). Whenever Second user tries to get the property of Shared object, the object will reset the actual property value and then return reset value.
    Anyone faced such issue while using shared object between two users. If so, I would appreciate if you could let me know your suggestions for following questions:
    1) Is there any way to get all the properties of shared object before sync event called, as I want to get it immediately when second user connect to the application and perform next task based on the values stored in shared object.
    2) Is it possible for second user to check whether any property has been set by first user? So that second user can use the property instead of reset it.
    Any kind of help would be greatly appreciated.
    Thank You.

    I am using shared object to share data between two users. First user connect to shared object and set some value in shared object. Please consider that second user has not connected with the shared object yet.
    Now when second user connects to the server and try to get that property set by first user, he could get shared object but could not get properties of Shared object set by first user. I observed few times that Second user can get these properties within "Sync" event between two users. But I would like to get these values for Second user in any stage (i.e. in load event etc.). Whenever Second user tries to get the property of Shared object, the object will reset the actual property value and then return reset value.
    Anyone faced such issue while using shared object between two users. If so, I would appreciate if you could let me know your suggestions for following questions:
    1) Is there any way to get all the properties of shared object before sync event called, as I want to get it immediately when second user connect to the application and perform next task based on the values stored in shared object.
    2) Is it possible for second user to check whether any property has been set by first user? So that second user can use the property instead of reset it.
    Any kind of help would be greatly appreciated.
    Thank You.

  • Help with public function (accessing to addchild object from other public function)

    Hi, i have below piece of my code AS3 (Flash CS4). I would like to get access to addchild Movie Clip object (ZoltyWjazdMC) in function two() which i created by addchild command in public function one(). I know it`s basic question but i can`t find answer for it. Anybody would help me with that?
    public function one():void
    var ZoltyWjazdMC:MovieClip = new MovieClip();
    this.addChild(ZoltyWjazdMC);
    ZoltyWjazdMC.addChild(assets.ZoltyWjazd.loader);
    this.setChildIndex(ZoltyWjazdMC,1);
    ZoltyWjazdMC.alpha = 0;
    ZoltyWjazdMC.visible = true;
    assets.ZielonyWjazd.alpha = 1;
    public function two():void
    ZoltyWjazdMC.alpha = 1;
    Do i need remove "this" and change it to "stage". Is it necessary?

    Define your variable var ZoltyWjazdMC:MovieClip outside of function one(). Currently ZoltyWjazdMC is local to function one() so that function two() does not understand what it is!

  • How can i use the shared object already present in the system from java.

    explanation:
    Actually there are shared objects present in the jdk which is used by java itself.I want to know if i can use the methods in any library file(shared object) which is already present in the system.
    Or the question can be put this way how does the java call the native methods? (Can we do that explicitly) in our code.

    It isn't entirely clear what you mean by 'shared' objects and what the relationship with these shared objects and calling native code is.
    There are no shared objects in the Java language, only the java platform.
    The platform system properties are exposed via the System class (java.lang package).
    You are free to create your own shared objects by using static member access or some other mechanism.
    Your access to methods in any of the API's is dictated by the access type you have, normally public being the only completely open access allowing complete visibility.
    You can call native methods, thats what JNI is for. Calling native methods in classes other than your own is generally done using the API provided by the developer(s) of those classes.

  • Local Shared Object not working in Firefox 2

    I'm using a local shared object in my flash animation so that
    the animation plays only once per user visit. It works fine in IE
    6/7, but doesn't work at all in FF (the movie still plays when I
    refresh the homepage, or come back to the homepage from another
    page).
    This is what I'm using:
    var my_so = SharedObject.getLocal("animationPlayed");
    if (my_so.data.played == undefined)
    my_so.data.played = true;
    my_so.flush();
    else
    gotoAndStop(258);
    } // end else if
    clearLSO_btn.onRelease = function ()
    my_so.clear();
    stop ();
    And this is the site:
    http://qualitycateringforkids.com/default.aspx
    Any ideas?
    Thanks
    RK

    Both of these load no problems in my FF3

Maybe you are looking for