Okay, so I can successfully link a UILabel in the Interface Builder to whats written in my code by dragging the blue reference line to "File's Owner" and selecting the label I referenced in my code only when using a View Based Application.
However, using the exact same code and the exact same process in a Tab Based Application (hence dragging the blue line in the interface builder to "File's Owner" in FirstView.xib) the only option that show up when connecting the UILabel to "File's Owner" is "View" rather than the other options, such as "titleLabel or albumLabel", that I wrote in my code.
Please tell me is there something I am doing wrong?
Thanks
Try control-dragging (dragging while holding ctrl key) to the actual variable definition in FirstView.h (or equivalent file).
My experience is migrating to Xcode 4 and storyboards is a much cleaner solution. Connecting outlets/view transitioning is much cleaner in storyboards instead of old interface builders.
Related
I've customized a tutorial and am trying to import it into my project. After copying one View Controller Scene from Document Outline into my main project, it's throwing an exception without any description of the issue. The View Controller is subclassed, so I've made sure to import the associated Swift file and set it in Document Attributes.
I don't know how to troubleshoot this one.
===EDIT===
I'm at a total loss here. I created a new project and was able to import, build, and run the project. The only difference between my main project and the new one is the VC is not the initial View Controller.
The tuturial was written in XCode 11 and Swift 4. I haven't upgraded yet, but again I was able to import into a new project w/o issue.
Check the Connections inspector (the last option on the right sidebar) and make sure there are no connections with exclamation marks (!) after them.
If there are errors, check in the Identity inspector (the third option from the left on the right sidebar) if the class of the view controller is correct.
If the connections are not needed anymore (you gave the outlet a new name etc.), remove them by clicking on the X next to them.
I currently have a app that manages projects. The user sees a list of projects and can select one. They can should (it would be nice) be able to click a run button and have another app open. The parameters stored in the project they selected are populated into the second application. The issue I am having is firing the second application. runApp generates the following.
ui code line:
actionButton("RunProj", "Run"),
Warning in run(timeoutMs) :
Unhandled error in observer: Key / already in use
observeEvent(input$RunProj)
I would like to trigger the second app and pass in the location of the project directory I have looked at parseQueryString and still trying to figure out a way to include that. Maybe via a redirect?
Any suggests would be much appreciated.
Regards,
Rich
I'm not 100% sure if I understand your intention correctly but here is a few things I think you may want to think about.
In one project, if you want to run a few kinds of analyses, you may want to try navbarPage
If there are many different types of analyses, you may want to try shinydashboard
If you know the link to each app and you really want to add those "run" buttons, you can add a button manually in ui.R. I think you can write some codes in server.r to generate the link based on your database.
tags$a(href="the link to your apps", class= "btn btn-default", "Run App")
Apple's technote here shows their recommend approach for moving content from beneath the iOS 7 status bar to below it (to avoid overlap). However, this technote seems to assume the use of storyboards. I'm wondering what to do if you have a legacy project that has a "View" in an .xib file... not even with a ViewController in the .xib. Just a view. Because you can't visually add constraints unless there is ALSO a ViewController in the .xib. But adding a ViewController results in an uncaught exception at runtime (see below).
To illustrate, rather than try to post all the sample code I think you might need to see from my project, you can duplicate the issue I'm having by launching XCode 4.6.x and choosing New Project. Choose "Single View project" in the iOS category, and uncheck "Use Storyboards".
After creating the project, click on the .xib file. Add a UIViewController so it, setting the existing view as a child of the ViewController. Select the ViewController, show Utilities, and click on the Identity Inspector. There, type in "ViewController" as your class. (So your new UIViewController uses the existing source code.)
When you run, you'll get this error:
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View > is associated with . Clear this association before associating this view with .'
My Question: Is there any way to add a ViewController to an existing .xib file, so I can add constraints, but not get the runtime exception seen above?
(If you look at the accepted answer here, it seems the answer may be "no"?)
I have a very complex user interface constructed using the GUI builder.
All was working as promised until I added 8 more severside functions to the code.
In the GUI Builder (when I try to attach these new functions to mouse up, The GUI Builder announces "An Unexpected Error occured" in a pink stripe across the top of the script editor.
When I clear the error, the project appears to be OK and I can save and run the application.
If I go to any previously object that triggers a server side handler and attempt to change it I get the same error.
It is my suspicion that the failure happens when the GUI builder tries to load the list of available functions from the code source. My code is running upwards of 50 Gscript functions.
If there are some limits on what the GUI Builder can handle it would be really nice to have those documented. Also a more meaningful error message would be nice.
I assume that I can still add/attach these handlers in the code base (outside of GUI Builder)?
This error message comes up when you try to getElementById using an Id that doesn't exist. Please check all the widget Ids in your GUI.I'm pretty sure your issue is not related to some systemic limitation, I've made some complex UIs with the GUI builder without issue.
you d better use a full scripted apps instead of GUI..I gave up with GUI since there is some strange stuff..as ID managment, name managment, radio button (bug as well in normal scripting..^^)..GUI is a black box for me..just try to make your app with vertical horizontal or xy panel...and you will be able to know who do wa and when... with the logger
I'm using AsUnit for unit-testing my current AS3 project. My Main() is basically:
if ( UnitTest )
runUnitTests();
else
runMainProgram();
where I change UnitTest before building depending on whether I want to run the program or run the unit tests. Is there a way that makes it easier to switch between the two modes?
Optimally, I'd use F5 for building with UnitTest=false and another hotkey for building with UnitTest=false. What is the closest I can get with FlashDevelop?
You can do the following in FlashDevelop
if(CONFIG::debug) {
trace("Debug");
} else if(CONFIG::release) {
trace("Release");
}
These correspond to the drop down in the toolbar next to the play button.
See this link: http://www.flashdevelop.org/wikidocs/index.php?title=AS3_Conditional_Compilation
In terms of the shortcut, just create a macro that switches the release mode then hits play. From there you can add any shortcut you would like to your macro. So one shortcut will launch the course into debug/release mode as required.
Also note, you can have other CONFIG::bla's - so you might want to have CONFIG:unit1, CONFIG:unit2, etc, etc. See above link.
Easy solution:
duplicate the FlashDevelop project file (.as3proj) and name it "MyProject_tests.as3proj",
open this project, create a new ProjectTests class and set it as the main class,
change the output SWF in project settings.
Add another project file. To run the test using it as the primary. "Document class" the context menu on the file.
Like Chris mentioned, you can use FlashDevelop's Compiler Constants to do what you need, though it is a bit cumbersome turning these constants on and off.
However, there is a FlashDevelop plugin called Config::Toggle that makes that significantly quicker by providing an additional panel where you can enable/disable boolean constants with 1 click. The linked website describes the value of the plugin far better than I ever could. Hope that helps.