Relationship between "open" parameters and argv

I'm coming from the Linux world, where the command-line arguments passed to a program show up in main()'s argv parameter.
I ported my app to OS X. It has a GUI, so I built it as a .app using CMake's MACOSX_BUNDLE option.
The actual executable program is burried: "foo.app/Contents/MacOS/foo". When I execute that directly, everything works as expected. If I call my program with arguments "A B C", I get argv[1] = "A", etc.
But launching a program buried deep in a ".app" directory tree made me think I was fighting the intended way of doing things. So I've tried calling my program with the "open" command from the command line. I.e., "open -a foo A B C". But when I do this, argv[1] doesn't contain "A". It contains a string starting with "-psn_".
So here's my question: If I need to launch a program with a GUI, and that program is supposed to take arguments on its command line, what's the most Apple-blessed way to launch it?

conveycj wrote:
So here's my question: If I need to launch a program with a GUI, and that program is supposed to take arguments on its command line, what's the most Apple-blessed way to launch it?
Change your program. GUI programs don't take command line arguments. GUI applications get their input via the user or via Apple Events.
When a GUI program is launched, its command line looks like "/path/to/myapp.app/Contents/MacOS/myapp -psn XXXX". You can't alter that and shouldn't try. However, you can look at those command line arguments and, if you see "-psn XXXX", assume you are running under a GUI. If you don't see "-psn XXXX", then your application was launched from the command line and you can process your arguments in the traditional fashion.

Similar Messages

  • How to create the relationship between ESSBASE 11 and DM in OBIEE11

    Hi Experts,
    I have one requirement that there is one property table named 'Store Master' in DW,and it contains a lot of attribute, such as Open Date, Close Date, IS 24 Hour etc.
    But another data source is essbase and based on this source, I create all reports.
    In ESSBASE, it has one dimension and hierarchy Location, and it has four level, Country(L1),Region (L2),Province(L3),Store(L4)
    So I want to know how to create the relationship between Location (ESSBASE) and Store Master (DM).
    I try to create one relationship in physical layer between Gen4,Location and Store, then drag the open date and close date into Location Dimension in BMM,then Presentation Layer.
    When I drag column 'Open Date' ,'Gen4,Location ' and 'Sales' into reports, it will generate the following error message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request Dim Region.Store Open Date. (HY000)
    However, when I remove the column 'Open Date'. it will be ok.
    So what I missing the steps? Please help me. Thanks.

    >
    '2. Now, pull the 'Store' column from relational DB onto the Gen5, Location column from Essbase. This action now creates, two logical sources for your 'Store' column.'
    If the length from different data source is not same,such as 1001(DM),L_1001(ESSBASE), can I drag the 'Store' column from relational DB onto the Gen5, Location column from Essbase?
    I think it does not work.Right?Hi,
    I am not sure if you are talking about the length(as in varchar(128)) of the member value being different in different sources, or the member itself is different in both the sources.
    I am still assuming, that you are referring to the members not same in both the sources.If it is, the whole concept of federation is based on conforming dimensions. So, it needs that the same dimension information is present in both the sources and then only, you know we can analyze the numbers based on this dimension. So, either the dimension being different in both sources, or the members not present in both the dimensions might lead to incorrect numbers.
    So I select Store Attributes in relation DB and Location in ESSBASE in physical layer, then create the physical join, such as right("Hour Sales"."H_Sales".""."H_Sales"."Gen6,Location",4) = "Authorization".""."EDW"."T_EDW_MDM_STORE"."US_CODE", then drag the OPEN_DATE and CLOSE_DATE in relation DB to Location in ESSBASE in BMM,finially drag them into presentation layer.We create physical layer relationships, to send over the same relation to the underlying database during querying. So, creating a physical relationship between essbase cube and relation database would not help here.
    When you set up this federation, BI Server sends individual queries to each source and maps the conforming dimension members internally.
    Hope I was clear, and this helps.
    Thank you,
    Dhar

  • How to create the relationship between ESSBASE 11 and DM  in OBIEE 11G?

    Hi Experts,
    I have one requirement that there is one property table named 'Store Master' in DW,and it contains a lot of attribute, such as Open Date, Close Date, IS 24 Hour etc.
    But another data source is essbase and based on this source, I create all reports.
    In ESSBASE, it has one dimension and hierarchy Location, and it has four level, Country(L1),Region (L2),Province(L3),Store(L4)
    So I want to know how to create the relationship between Location (ESSBASE) and Store Master (DM).
    I try to create one relationship in physical layer between Gen4,Location and Store, then drag the open date and close date into Location Dimension in BMM,then Presentation Layer.
    When I drag column 'Open Date' ,'Gen4,Location ' and 'Sales' into reports, it will generate the following error message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request Dim Region.Store Open Date. (HY000)
    However, when I remove the column 'Open Date'. it will be ok
    So what I missing the steps? Please help me. Thanks.

    >
    '2. Now, pull the 'Store' column from relational DB onto the Gen5, Location column from Essbase. This action now creates, two logical sources for your 'Store' column.'
    If the length from different data source is not same,such as 1001(DM),L_1001(ESSBASE), can I drag the 'Store' column from relational DB onto the Gen5, Location column from Essbase?
    I think it does not work.Right?Hi,
    I am not sure if you are talking about the length(as in varchar(128)) of the member value being different in different sources, or the member itself is different in both the sources.
    I am still assuming, that you are referring to the members not same in both the sources.If it is, the whole concept of federation is based on conforming dimensions. So, it needs that the same dimension information is present in both the sources and then only, you know we can analyze the numbers based on this dimension. So, either the dimension being different in both sources, or the members not present in both the dimensions might lead to incorrect numbers.
    So I select Store Attributes in relation DB and Location in ESSBASE in physical layer, then create the physical join, such as right("Hour Sales"."H_Sales".""."H_Sales"."Gen6,Location",4) = "Authorization".""."EDW"."T_EDW_MDM_STORE"."US_CODE", then drag the OPEN_DATE and CLOSE_DATE in relation DB to Location in ESSBASE in BMM,finially drag them into presentation layer.We create physical layer relationships, to send over the same relation to the underlying database during querying. So, creating a physical relationship between essbase cube and relation database would not help here.
    When you set up this federation, BI Server sends individual queries to each source and maps the conforming dimension members internally.
    Hope I was clear, and this helps.
    Thank you,
    Dhar

  • Relationship between material type and industry sector

    Hi experts
    when using t-code mm01,there are two fields material type and industry setor in screen.Is there any relationship between material type and industry sector? I want to know if user be able to see the material type related to particular industry sector?
    thanks in advance!

    Hello
    There is no direct relationship between the material type and the industry sector.
    The industry sector is used only for field sttus maintenance (fields in display/optional/requierd entry) in transactions.
    We will assign seperate field reference groups to industry sectors and deopending on how we configure the field references, the fields will appear for the materials created for that industry sector.
    regards

  • Relationship between logical system and a client

    Hi,
    Our internal notes say that, in order to create a new client, I must do the following:
    1. Create a logical system using BD54. The client name must be SID + "CLNT" + number. In my case, this would be NSPCLNT100.
    2. Create a client using SCC4.
    Questions:
    1. What is the relationship between the client and the logical system?
    2. How does SAP know that client number 100 must be related to NSPCLNT100? I am not specifying this relationship anywhere.
    Thank you in advance for your help.
    Regards,
    Peter

    you assing logical system to a client from SCC4

  • Question the relationship between AR invoice and Outgoing payment

    Dear All,
    Does anyone the know the the relationship between AR invoice and Outgoing payment? because I would like to print the report in specific date range. For example, today is 02 July 2009. I want to print "AR invoice as at 31 Mar 2009", by using SQL. It seems like date back.
    From Samson

    Hi Samson,
                      Even i haven't done much r n d  bout this but what i came to know is that, there might be a scenario where you may want to make a payment to your customer. In this case we can use the Outgoing payment for the same. The system doesnt stop you from doin so. I have seen this in SAP B1 2005B, PL34.
    Regards,
    Joseph

  • In which table we can find the relationship between Role id and Task id

    Hi Experts,
    In which table we can find the relationship between Role id and Task id in Cprojects.
    Thanks
    Subhaskar

    Hi Subhaskar,
    Apart from DPR_ENTITY_LINK , you can also get it from table DPR_PART.
    Please go through the below link
    http://wiki.sdn.sap.com/wiki/display/PLM/cProjectstablesin+SAP
    I hope this will help you.
    Regards,
    Rahul

  • Table name having relationship between Business area and Profit Center

    Hi guys,
    Can you tell me the table name showing the relationship between Business area and Profit Center in fb60  transaction.
    thnx
    hema

    HI.
    BSEE u2013GSBER  Business area.
    BSID-PRCTR Profit center
    Regards.
    jay

  • The relationship between production order and purchase requistion After running MPS

    Dear Experts:
         I met a issue . My users want to know the relationship between production order and purchase requistion . In my company we create production order and  purchase req. by  running MRP. our operations are:
    1. T-CODE: MD41  create planned order .
    2. T-CODE: CO41 convert planned order to production order .
    3. T-CODE: MD15 convert planned order to purchase Requisition.
      but I can't  find the  relation of them. would you like to give me some advices? thank you very much.

    Hello
    On the standard MTS process there is no link between the requirement (STO) and the replenishment element (production order).
    See the below extraction from note 12955:
    There is no index that the system could use to determine which issue element (sales order, planning, reservation, dependent requirement, ...) is covered by a certain receipt element (purchase order, production order, purchase requisition, planned order, stock level ...).
    A production order, for example, can be created to cover several different requirements, even when you are using lot sizing procedure EX.
    You can use transaction MD09 or MD04to determine the pegged requirements, but they are calculated dynamically and there is not fixed link between requirement and receipt.
    BR
    Caetano

  • How would i design the relationship between "question", "subquestion", and "answer"

    Hi all. Consider the following scenario:
    Scenario:
    A Question has an Answer, but some Questions have Subquestions. For example:
    1. Define the following terms: (Question)
    a) Object (1 marks) (Subquestion)
    An instance of a class. (Answer)
    b) ...
    2. Differentiate between a constructor and a destructor (2 marks)
    (Question)
    A constructor constructs while a destructor destroys.
    (Answer)
    Question:
    I want to model Questions, Subquestion, and Answer as Entities with relationships/associations, preferably binary relationships as i feel ternary relationships will be problematic while programming. Any suggestion on how i would
    go about this?
    There is never infinite resources.
    For the Question Entity, a question has the attributes "QuestionPhrase <String>", "Diagram<Binary>", and "Marks
    <Decimal>".
    For the SubQuestion Entity, a subquestion has the attributes "SubQuestionPhrase <String>", "Diagram<Binary>", and "Marks <Decimal>".
    For the Answer Entity, an answer has attributes, "AnswerPhrase<String>", "Diagram <Binary>"

    Yes. I am in .Net. I sure do hope i did not ask in the wrong forum. :-|
    Hi KCWamuti,
    If you need to design the relationship between Question table and Answer table in SQL Server, as Uri’s and Visakh’s posts, you can create the foreign key to establish relationship between tables, and use join in query to get your desired result. For more
    information about JOIN in SQL Server, please review this article:
    Different Types of SQL Joins.
    However, if you need to model Questions, Subquestion, and Answer as Entities in .Net, then the issue regards data platform development. I suggest you post the question in the Data Platform Development forums at
    http://social.msdn.microsoft.com/Forums/en-US/home?category=dataplatformdev . It is appropriate and more experts will assist you.
    Thanks,
    Lydia Zhang

  • Relationship between Role id and Task id table name?

    Hi
    In which table we can find the relationship between Role id and Task id in saphcm
    Thanks a
    vibin

    Hi,
    HRP1001 --Infotype 1001 DB Table (Relationships)
    Regards,
    mohammed

  • Relationship between campaign code and BP Address

    Hi all,
    I am new to CRM. I want to know the relationship between campaign code and BP Address.
    Or how it links with GUID.
    Small query but full points.
    Thanks
    Sanket

    Hi,
    The field name for Camapign code is
    CRM_MKTPL_CAMPAIGN-SHORTCUT
    and for BP address
    COM_DYNP_PARTNER_UI-SHORT_WITH_STREET.
    Thanks
    Sanket

  • Table relationship between Profit Center and G/L account.

    Hi,
    I have an issue related to wrong profit centers. We have a workflow that updating the profit center to a G/L account regarding the business of Reverse Logistic. In that business, we shift from a G/L account to another G/L account.
    Now I have to find the tables relationship between Profit center and G/L account, which contains the correct relationship between a profit center and a G/L account, so that I can profit centers related to the moved G/L account and the original G/L account.
    Thank you.
    Moderator: Please, search before posting

    Hi
    The Posted data can be seen in BSEG & GLPCA/FAGLFLEXA
    The default assignment of GL & PC can be seen in 3KEH / FAGL3KEH
    br, Ajay M

  • What is the relationship between CGI-Executables and cgi-bin?

    I am trying to get CGIs working locally on my Mac and am having difficulty understanding the relationship between CGI-Executables/ and cgi-bin/.
    I have activated CGI in my httpd.conf file, and have the following perl test script: /Library/WebServer/CGI-Executables/test.cgi file, and have the file permissions set appropriatly
    If I call the script from the actual url: http://127.0.0.1/CGI-Executables/test.cgi, it doesn't work. If I use: http://127.0.0.1/cgi-bin/test.cgi, it works fine.
    Why cgi-bin and not CGI-Executables? What is the relationship between /Library/WebServer/CGI-Executables/ and cgi-bin?
    And how do I get CGIs working in individual users' Sites/ file? Do all CGIs go in the /Library/WebServer/CGI-Executables/ directory, or can each users' Site/ directory have it's own cgi-bin?
    Ti Powerbook G4   Mac OS X (10.4.4)  

    Now I am having trouble getting CGI to work in the user directories. I have a perl script that works for 127.0.0.1/cgi-bin/test.cgi, but not for 127.0.0.1/~joe/cgi-bin/test.cgi.
    My apache error log says:
    [Tue Feb 14 08:14:23 2006] [error] [client 127.0.0.1] Options ExecCGI is off in this directory: /Users/joe/Sites/cgi-bin/first.cgi
    Permissions for Library/WebServer/CGI-Exectuables/test.cgi and /Users/joe/Sites/cgi-bin/ are 777.
    I think the problem is somewhere in my directory configs. Apache has so many, it's hard to know what's what.
    Here's the first directory directives in httpd.conf:
    # First, we configure the "default" to be a very restrictive set of
    # permissions.
    <Directory />
    Options FollowSymLinks
    AllowOverride Options
    </Directory>
    Farther down, there's this, which I added ExecCGI and index.cgi:
    # Control access to UserDir directories. The following is an example
    # for a site where these directories are restricted to read-only.
    <Directory /Users/*/Sites>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
    DirectoryIndex index.html index.cgi
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>
    Then down at the bottom of the file is something I suspect was added automatically when the user account was created:
    Include /private/etc/httpd/users/*.conf
    <Directory "/Users/joe/Sites/">
    Options Indexes MultiViews Includes
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    To further confuse things, there is another file /etc/httpd/user/joe.conf that has additional user-directory directives:
    <Directory "/Users/joe/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    Is there something in all these directory configurations that is preventing the user from accessing cgi-bin? Can I add directives to an .htaccess file in the user directory.
    Ti Powerbook G4   Mac OS X (10.4.4)  

  • Difference between open quantity and delivery quantity

    Hi all,
    Please anybody explain me the difference between open quantity and delivery quantity My question is both are same in the value or different I need to report these 2 fields based on date.
    open quantity is available in table vbbe
    delivery quantity available in table lips.
    for open quantity i have one select statement.
    for delivery quantity i have another select statement.
    i want to club these 2 fields into a single report.
    please clarify my doubt.
    regards
    chandu

    Hi,
    Open quantity is nothing but the quantity which we have at the DAY starts.
    Delivered quantity means which was delivered on that DAY.
    So Opening qty - Delivered qty = Closing qty for a DAY.
    Again this Closing qty will be the Opening qty for next DAY.
    I think based on POSNR u need to club both the quantity in single report.
    select vbeln posnr matnr omeng mbdat into itab from VBBE where....
    select vbeln posnr matnr lfimg mbdat into itab1 from lips where....
    loop at itab.
    read table itab1 with key....
    move:....to itab2.
    endloop.
    Thanks.
    I hope this will help you.
    Message was edited by: Deepak333 k
    Message was edited by: Deepak333 k

Maybe you are looking for

  • Is there anyway to avoid having to re-enter iCloud password each time I log into my iPhone?

    I just updated to iOS5 and I want to use ICloud for backup. However, everytime I log into my iPhone, it wants me to re-enter my iCloud password. I have a passcode enabled on my iPhone so I'm hoping I don't have to re-enter the iCloud password everyti

  • Why I cannot pay by the credit card I want to use?

    I used to be able to subscribe a plan and have the recurring charge charged to a U.S. credit card.  When the credit card got upgraded, the subscription was stopped automatically, and I was never able to subscribe any plan or make any payment on Skype

  • Parental access and Time usage control

    Hi, My son has a iPhone4 iOS 8, I try to keep it upgraded. It was mine. I've turned on Restrictions. I've activated parental control on my internet access. But I have no control on usage of the iPhone (access history, time etc..) It seems that it use

  • Javax.naming.InvalidNameException when deploying JCA project

    Greetings, I have found the "JCA on EP6: Building Portal Applications with Remote Function Modules" (Mar'04) to be one of the clearest documents on how JCA from EP works. I also found the sample jca package package that comes with it to be one of the

  • Wireless Radio Connection - switches off

    My Wireless Radio Connection switches off after about 2-3 minutes.  Is there a setting I can adjust to lengthen this amount of time?  When it shuts off, all I have to do is FN5 to reconnect but I shouldn't have to do that every 3 minutes.  I have a T