Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
djmbb
Posts: 30
Registered: ‎06-14-2012
My Device: Simulator

Re: Getting app running in Simulator

Hi Stuart.

 

> Under project context menu Run As or Run you should see the Application and Application Dialog then a divider bar > then Run Configurations...   This lets you choose a different configuration if you want, or confirm which you are >          running.

 

Yes but if I select "Run Configurations... " it opens a dialog in which I see where I can set the "build configuration"!

I dont see here where I can set the run configuration to what Id expect (namely one of the same values I can set the build configuration to..."Simulator-Debug","Device-Release" etc. Do you?

 

Thanks in Advance.

Declan

BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: Getting app running in Simulator

I'm not sure what's confusing us.  Perhaps I used the wrong word somewhere.

 

There are 3 things we set:

1. What do we want to build?

2. Where do we want to run or debug?

3. What build do we want to use when we run or debug?

 

Usually, if we haven't touched any settings, we run the last build.   So if I set the build configuration to the device or switch to the simulator, debug or run just does what I expect.   I can run something else if I want by changing the build configuration in that dialog.

 

Hope this helps.  If not, perhaps simplifying by removing configurations you don't need, or obsolete IP addresses.  (e.g. if you are trying to run on the simulator and updated VMWare Player recently, you'll have to update the IP address or delete your old target and create a new one.)

 

Stuart

Contributor
djmbb
Posts: 30
Registered: ‎06-14-2012
My Device: Simulator

Re: Getting app running in Simulator

HI Stuart

 

 

>There are 3 things we set:

>1. What do we want to build?

>2. Where do we want to run or debug?

>3. What build do we want to use when we run or debug?

 

No problem here.

 

> Usually, if we haven't touched any settings...

 

Thats all good and well, but I have messed around with settings (I as getting to know the new ide) and be that as it may one wants to be clearly able to confirm whats being used/built/run and modify it if necessary. How to do this is the question. And not such any easy question as my previous post tried to explain:

 

"Yes but if I select "Run Configurations... " it opens a dialog in which I see where I can set the "build configuration"!

I dont see here where I can set the run configuration to what Id expect (namely one of the same values I can set the build configuration to..."Simulator-Debug","Device-Release" etc. Do you?"

BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: Getting app running in Simulator

Are you still stuck?

You may have to attach pictures of your steps along the way

 

For making sure you are building the right thing:

1. Right click on the Project in the 'Project Explorer'
   OR
   Select the Project in the 'Project Explorer' and select the 'Project' main menu in Momentics
2. Highlight 'Build Configurations'
3. 'Set Active >'
4. Select the one he wants

This will give a build configuration for that project when it is built.


Then set the run configuration:

1. Right click on the Project in the 'Project Explorer' then 'Run As >' then 'Run Configurations'
    OR
    Select the 'Run' main menu in Momentics then 'Run Configurations'
2. Under 'BlackBerry C/C++ Applications' select your project by name
3. Under 'Target Options' use the 'Add New Target...', 'Remove Target' and 'Target Properties...' to manage your Run Targets

From here you should be able to right click 'Run As >' then 'BlackBerry C/C++ Application'

 

Stuart

Contributor
djmbb
Posts: 30
Registered: ‎06-14-2012
My Device: Simulator

Re: Getting app running in Simulator

 

>Under project context menu Run As or Run you should see the Application and Application Dialog then a divider bar then Run Configurations...   This lets you choose a different configuration if you want, or confirm which you are running.

 

Like I said before, I can do this but

 

I dont have (as I would expect to) the same configurations available as chen choosing a build configuration

ie

"Device-Debug"

"Device-Release"

"Simulator-Debug"

 

Why should the available run configurations match the available build configurations?

Contributor
djmbb
Posts: 30
Registered: ‎06-14-2012
My Device: Simulator

Re: Getting app running in Simulator

correction ... "-not- match"
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer

Re: Getting app running in Simulator

Let's try one more time.

 

Short answer:

A build configuration builds to a target architecture.

A run configuration specifies where to run which build.

 

Long answer:

A build configuration is a representation of the architecture and debug state of the target you are working with (Simulator, or Device) (Debug, or Release)
There are 3 build configurations available in the IDE (Device-Debug, Device-Release, Simulator-Debug)

A target is a specific device or simulator instance running and connected to your IDE. A target can only be either a Device or a Simulator. A Device can run the following builds: Device-Debug and Device-Release. A Simulator can run Simulator-Debug.

A run configuration is where you tell the IDE which build you want to run on which target. By default in the Run Configuration dialog, under Target Options, Filter targets based on C/C++ Application selection is enabled. What this means is when you select the Build configuration in the Run Configuration dialog, it will automatically filter your list of connected targets so only the targets that can run that build configuration are shown.

You'll also notice in the left hand column of the Run Configuration dialog, if you've built your project with multiple Build Configurations, it will be listed more than once. For example.. if you've built for Simulator-Debug and Device-Debug, you will see your project listed twice.. Project and Project(1). In fact this list is a list of only built projects. If you leave the default settings in Run Configuration then the correct target will be automatically selected for you when you click on a built project in this list. If you disabled the option to filter your targets, then you will have to manually select the target you want to run on. So you will have to understand which target can run which build configuration.

The reason why targets aren't named according to the exact naming convention used by Build Configurations is because you can have many targets connected that can run the same Build Configuration.

Finally, the IDE won't actually allow you to run an incompatible Build on a target that it wasn't compiled for. So if I've built for both Device-Debug and Simulator-Debug and I disable the filter in Run Configuration and select Build Configuration "Device-Debug" then pick the "sim (Neutrino/x86)" the Run button is disabled and an error message "Selected binary and target do not match x86" will be displayed in the Run Configuration dialog header.

 

Hopefully this is clear enough.  If not, perhaps re-read the help on momentics basics.  If you are still completely stuck, please post a picture.

 

Stuart